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 @@
"source": [
"## Variables\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 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": true
},
"outputs": [],
......@@ -272,7 +273,8 @@
" np.squeeze(classes).astype(np.int32),\n",
" np.squeeze(scores),\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.imshow(image_np)"
]
......@@ -303,7 +305,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
"version": "2.7.12"
}
},
"nbformat": 4,
......
......@@ -156,7 +156,10 @@ def draw_bounding_box_on_image(image,
(left, right, top, bottom) = (xmin, xmax, ymin, ymax)
draw.line([(left, top), (left, bottom), (right, bottom),
(right, top), (left, top)], width=thickness, fill=color)
font = ImageFont.load_default()
try:
font = ImageFont.truetype('arial.ttf', 24)
except IOError:
font = ImageFont.load_default()
text_bottom = top
# Reverse list and print from bottom to 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