Commit ae2c506e authored by Jonathan Huang's avatar Jonathan Huang Committed by Sergio Guadarrama
Browse files

Change visualizer font and jupyter notebook line thickness (#1589)

parent e76190e8
...@@ -94,7 +94,9 @@ ...@@ -94,7 +94,9 @@
"source": [ "source": [
"## Variables\n", "## Variables\n",
"\n", "\n",
"See the [detection model zoo](g3doc/detection_model_zoo.md) for a list of all models to try." "Any model exported using the `export_inference_graph.py` tool can be loaded here simply by changing `PATH_TO_CKPT` to point to a new .pb file. \n",
"\n",
"By default we use an \"SSD with Mobilenet\" model here. See the [detection model zoo](g3doc/detection_model_zoo.md) for a list of other models that can be run out-of-the-box with varying speeds and accuracies."
] ]
}, },
{ {
...@@ -239,7 +241,6 @@ ...@@ -239,7 +241,6 @@
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true,
"scrolled": true "scrolled": true
}, },
"outputs": [], "outputs": [],
...@@ -272,7 +273,8 @@ ...@@ -272,7 +273,8 @@
" np.squeeze(classes).astype(np.int32),\n", " np.squeeze(classes).astype(np.int32),\n",
" np.squeeze(scores),\n", " np.squeeze(scores),\n",
" category_index,\n", " category_index,\n",
" use_normalized_coordinates=True)\n", " use_normalized_coordinates=True,\n",
" line_thickness=8)\n",
" plt.figure(figsize=IMAGE_SIZE)\n", " plt.figure(figsize=IMAGE_SIZE)\n",
" plt.imshow(image_np)" " plt.imshow(image_np)"
] ]
...@@ -303,7 +305,7 @@ ...@@ -303,7 +305,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython2", "pygments_lexer": "ipython2",
"version": "2.7.13" "version": "2.7.12"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -156,6 +156,9 @@ def draw_bounding_box_on_image(image, ...@@ -156,6 +156,9 @@ def draw_bounding_box_on_image(image,
(left, right, top, bottom) = (xmin, xmax, ymin, ymax) (left, right, top, bottom) = (xmin, xmax, ymin, ymax)
draw.line([(left, top), (left, bottom), (right, bottom), draw.line([(left, top), (left, bottom), (right, bottom),
(right, top), (left, top)], width=thickness, fill=color) (right, top), (left, top)], width=thickness, fill=color)
try:
font = ImageFont.truetype('arial.ttf', 24)
except IOError:
font = ImageFont.load_default() font = ImageFont.load_default()
text_bottom = top text_bottom = top
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment