Skip to content

Commit 3543f02

Browse files
committed
update model zoo to fix tensorflow#2674.
* add configs corresponding to new models in the zoo. * add warinings aboud version in notebook.
1 parent bc8c71c commit 3543f02

6 files changed

+523
-47
lines changed

research/object_detection/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Tensorflow Object Detection API
23
Creating accurate machine learning models capable of localizing and identifying
34
multiple objects in a single image remains a core challenge in computer vision.
@@ -72,6 +73,18 @@ issue name with "object_detection".
7273

7374
## Release information
7475

76+
77+
### November 6, 2017
78+
79+
We have re-released faster versions of our (pre-trained) models in the
80+
<a href='g3doc/detection_model_zoo.md'>model zoo</a>. In addition to what
81+
was available before, we are also adding Faster R-CNN models trained on COCO
82+
with Inception V2 and Resnet-50 feature extractors, as well as a Faster R-CNN
83+
with Resnet-101 model trained on the KITTI dataset.
84+
85+
<b>Thanks to contributors</b>: Jonathan Huang, Vivek Rathod, Derek Chow,
86+
Tal Remez, Chen Sun.
87+
7588
### October 31, 2017
7689

7790
We have released a new state-of-the-art model for object detection using
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# Tensorflow detection model zoo
22

3-
We provide a collection of detection models pre-trained on the
4-
[COCO dataset](http://mscoco.org).
5-
These models can be useful for out-of-the-box inference if you are interested
6-
in categories already in COCO (e.g., humans, cars, etc).
7-
They are also useful for initializing your models when training on novel
8-
datasets.
3+
We provide a collection of detection models pre-trained on the [COCO
4+
dataset](http://mscoco.org) and the [Kitti dataset](http://www.cvlibs.net/datasets/kitti/).
5+
These models can be useful for
6+
out-of-the-box inference if you are interested in categories already in COCO
7+
(e.g., humans, cars, etc). They are also useful for initializing your models when
8+
training on novel datasets.
99

1010
In the table below, we list each such pre-trained model including:
1111

1212
* a model name that corresponds to a config file that was used to train this
1313
model in the `samples/configs` directory,
1414
* a download link to a tar.gz file containing the pre-trained model,
15-
* model speed (one of {slow, medium, fast}),
16-
* detector performance on COCO data as measured by the COCO mAP measure.
15+
* model speed --- we report running time in ms per 600x600 image (including all
16+
pre and post-processing), but please be
17+
aware that these timings depend highly on one's specific hardware
18+
configuration (these timings were performed using an Nvidia
19+
GeForce GTX TITAN X card) and should be treated more as relative timings in
20+
many cases.
21+
* detector performance on subset of the COCO validation set.
1722
Here, higher is better, and we only report bounding box mAP rounded to the
1823
nearest integer.
1924
* Output types (currently only `Boxes`)
@@ -32,12 +37,54 @@ Inside the un-tar'ed directory, you will find:
3237
* a frozen graph proto with weights baked into the graph as constants
3338
(`frozen_inference_graph.pb`) to be used for out of the box inference
3439
(try this out in the Jupyter notebook!)
40+
* a config file (`pipeline.config`) which was used to generate the graph. These
41+
directly correspond to a config file in the
42+
[samples/configs](https://github.com/tensorflow/models/tree/master/research/object_detection/samples/configs)) directory but often with a modified score threshold. In the case
43+
of the heavier Faster R-CNN models, we also provide a version of the model
44+
that uses a highly reduced number of proposals for speed.
3545

36-
| Model name | Speed | COCO mAP | Outputs |
46+
Some remarks on frozen inference graphs:
47+
48+
* If you try to evaluate the frozen graph, you may find performance numbers for
49+
some of the models to be slightly lower than what we report in the below
50+
tables. This is because we discard detections with scores below a
51+
threshold (typically 0.3) when creating the frozen graph. This corresponds
52+
effectively to picking a point on the precision recall curve of
53+
a detector (and discarding the part past that point), which negatively impacts
54+
standard mAP metrics.
55+
* Our frozen inference graphs are generated using the
56+
[v1.4.0](https://github.com/tensorflow/tensorflow/tree/v1.4.0)
57+
release version of Tensorflow and we do not guarantee that these will work
58+
with other versions; this being said, each frozen inference graph can be
59+
regenerated using your current version of Tensorflow by re-running the
60+
[exporter](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/exporting_models.md),
61+
pointing it at the model directory as well as the config file inside of it.
62+
63+
64+
## COCO-trained models {#coco-models}
65+
66+
| Model name | Speed (ms) | COCO mAP[^1] | Outputs |
3767
| ------------ | :--------------: | :--------------: | :-------------: |
38-
| [ssd_mobilenet_v1_coco](http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz) | fast | 21 | Boxes |
39-
| [ssd_inception_v2_coco](http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_11_06_2017.tar.gz) | fast | 24 | Boxes |
40-
| [rfcn_resnet101_coco](http://download.tensorflow.org/models/object_detection/rfcn_resnet101_coco_11_06_2017.tar.gz) | medium | 30 | Boxes |
41-
| [faster_rcnn_resnet101_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_coco_11_06_2017.tar.gz) | medium | 32 | Boxes |
42-
| [faster_rcnn_inception_resnet_v2_atrous_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_resnet_v2_atrous_coco_11_06_2017.tar.gz) | slow | 37 | Boxes |
43-
| [faster_rcnn_nas](http://download.tensorflow.org/models/object_detection/faster_rcnn_nas_coco_24_10_2017.tar.gz) | slow | 43 | Boxes |
68+
| [ssd_mobilenet_v1_coco](http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2017_11_08.tar.gz) | 30 | 21 | Boxes |
69+
| [ssd_inception_v2_coco](http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_2017_11_08.tar.gz) | 42 | 24 | Boxes |
70+
| [faster_rcnn_inception_v2_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_v2_coco_2017_11_08.tar.gz) | 58 | 28 | Boxes |
71+
| [faster_rcnn_resnet50_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet50_coco_2017_11_08.tar.gz) | 89 | 30 | Boxes |
72+
| [faster_rcnn_resnet50_lowproposals_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet50_lowproposals_coco_2017_11_08.tar.gz) | 64 | | Boxes |
73+
| [rfcn_resnet101_coco](http://download.tensorflow.org/models/object_detection/rfcn_resnet101_coco_2017_11_08.tar.gz) | 92 | 30 | Boxes |
74+
| [faster_rcnn_resnet101_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_coco_2017_11_08.tar.gz) | 106 | 32 | Boxes |
75+
| [faster_rcnn_resnet101_lowproposals_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_lowproposals_coco_2017_11_08.tar.gz) | 82 | | Boxes |
76+
| [faster_rcnn_inception_resnet_v2_atrous_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_resnet_v2_atrous_coco_2017_11_08.tar.gz) | 620 | 37 | Boxes |
77+
| [faster_rcnn_inception_resnet_v2_atrous_lowproposals_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_resnet_v2_atrous_lowproposals_coco_2017_11_08.tar.gz) | 241 | | Boxes |
78+
| [faster_rcnn_nas](http://download.tensorflow.org/models/object_detection/faster_rcnn_nas_lowproposals_coco_2017_11_08.tar.gz) | 1833 | 43 | Boxes |
79+
| [faster_rcnn_nas_lowproposals_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_nas_lowproposals_coco_2017_11_08.tar.gz) | 540 | | Boxes |
80+
81+
82+
83+
## Kitti-trained models {#kitti-models}
84+
85+
Model name | Speed (ms) | Pascal [email protected] (ms) | Outputs
86+
----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---: | :-------------: | :-----:
87+
[faster_rcnn_resnet101_kitti](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_kitti_2017_11_08.tar.gz) | 79 | 87 | Boxes
88+
89+
[^1]: See [MSCOCO evaluation protocol](http://cocodataset.org/#detections-eval).
90+

research/object_detection/object_detection_tutorial.ipynb

+15-32
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"cell_type": "code",
2020
"execution_count": null,
2121
"metadata": {
22-
"collapsed": true,
2322
"scrolled": true
2423
},
2524
"outputs": [],
@@ -35,7 +34,10 @@
3534
"from collections import defaultdict\n",
3635
"from io import StringIO\n",
3736
"from matplotlib import pyplot as plt\n",
38-
"from PIL import Image"
37+
"from PIL import Image\n",
38+
"\n",
39+
"if tf.__version__ != '1.4.0':\n",
40+
" raise ImportError('Please upgrade your tensorflow installation to v1.4.0!')\n"
3941
]
4042
},
4143
{
@@ -48,9 +50,7 @@
4850
{
4951
"cell_type": "code",
5052
"execution_count": null,
51-
"metadata": {
52-
"collapsed": true
53-
},
53+
"metadata": {},
5454
"outputs": [],
5555
"source": [
5656
"# This is needed to display the images.\n",
@@ -71,9 +71,7 @@
7171
{
7272
"cell_type": "code",
7373
"execution_count": null,
74-
"metadata": {
75-
"collapsed": true
76-
},
74+
"metadata": {},
7775
"outputs": [],
7876
"source": [
7977
"from utils import label_map_util\n",
@@ -102,13 +100,11 @@
102100
{
103101
"cell_type": "code",
104102
"execution_count": null,
105-
"metadata": {
106-
"collapsed": true
107-
},
103+
"metadata": {},
108104
"outputs": [],
109105
"source": [
110106
"# What model to download.\n",
111-
"MODEL_NAME = 'ssd_mobilenet_v1_coco_11_06_2017'\n",
107+
"MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_08'\n",
112108
"MODEL_FILE = MODEL_NAME + '.tar.gz'\n",
113109
"DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/'\n",
114110
"\n",
@@ -131,9 +127,7 @@
131127
{
132128
"cell_type": "code",
133129
"execution_count": null,
134-
"metadata": {
135-
"collapsed": true
136-
},
130+
"metadata": {},
137131
"outputs": [],
138132
"source": [
139133
"opener = urllib.request.URLopener()\n",
@@ -155,9 +149,7 @@
155149
{
156150
"cell_type": "code",
157151
"execution_count": null,
158-
"metadata": {
159-
"collapsed": true
160-
},
152+
"metadata": {},
161153
"outputs": [],
162154
"source": [
163155
"detection_graph = tf.Graph()\n",
@@ -180,9 +172,7 @@
180172
{
181173
"cell_type": "code",
182174
"execution_count": null,
183-
"metadata": {
184-
"collapsed": true
185-
},
175+
"metadata": {},
186176
"outputs": [],
187177
"source": [
188178
"label_map = label_map_util.load_labelmap(PATH_TO_LABELS)\n",
@@ -200,9 +190,7 @@
200190
{
201191
"cell_type": "code",
202192
"execution_count": null,
203-
"metadata": {
204-
"collapsed": true
205-
},
193+
"metadata": {},
206194
"outputs": [],
207195
"source": [
208196
"def load_image_into_numpy_array(image):\n",
@@ -221,9 +209,7 @@
221209
{
222210
"cell_type": "code",
223211
"execution_count": null,
224-
"metadata": {
225-
"collapsed": true
226-
},
212+
"metadata": {},
227213
"outputs": [],
228214
"source": [
229215
"# For the sake of simplicity we will use only 2 images:\n",
@@ -241,7 +227,6 @@
241227
"cell_type": "code",
242228
"execution_count": null,
243229
"metadata": {
244-
"collapsed": true,
245230
"scrolled": true
246231
},
247232
"outputs": [],
@@ -284,9 +269,7 @@
284269
{
285270
"cell_type": "code",
286271
"execution_count": null,
287-
"metadata": {
288-
"collapsed": true
289-
},
272+
"metadata": {},
290273
"outputs": [],
291274
"source": []
292275
}
@@ -307,7 +290,7 @@
307290
"name": "python",
308291
"nbconvert_exporter": "python",
309292
"pygments_lexer": "ipython2",
310-
"version": "2.7.13"
293+
"version": "2.7.10"
311294
}
312295
},
313296
"nbformat": 4,

0 commit comments

Comments
 (0)