Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 141ed95

Browse files
authored
Merge pull request tensorflow#2637 from tombstone/nasnet_release
nasnet config, model and release info.
2 parents 74a0364 + 6c75caa commit 141ed95

File tree

4 files changed

+185
-20
lines changed

4 files changed

+185
-20
lines changed

research/object_detection/README.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,58 @@ https://scholar.googleusercontent.com/scholar.bib?q=info:l291WsrB-hQJ:scholar.go
3131

3232
## Table of contents
3333

34-
Before You Start:
35-
* <a href='g3doc/installation.md'>Installation</a><br>
36-
3734
Quick Start:
38-
* <a href='object_detection_tutorial.ipynb'>
35+
36+
* <a href='object_detection_tutorial.ipynb'>
3937
Quick Start: Jupyter notebook for off-the-shelf inference</a><br>
40-
* <a href="g3doc/running_pets.md">Quick Start: Training a pet detector</a><br>
38+
* <a href="g3doc/running_pets.md">Quick Start: Training a pet detector</a><br>
4139

4240
Setup:
43-
* <a href='g3doc/configuring_jobs.md'>
41+
42+
* <a href='g3doc/installation.md'>Installation</a><br>
43+
* <a href='g3doc/configuring_jobs.md'>
4444
Configuring an object detection pipeline</a><br>
45-
* <a href='g3doc/preparing_inputs.md'>Preparing inputs</a><br>
45+
* <a href='g3doc/preparing_inputs.md'>Preparing inputs</a><br>
4646

4747
Running:
48-
* <a href='g3doc/running_locally.md'>Running locally</a><br>
49-
* <a href='g3doc/running_on_cloud.md'>Running on the cloud</a><br>
48+
49+
* <a href='g3doc/running_locally.md'>Running locally</a><br>
50+
* <a href='g3doc/running_on_cloud.md'>Running on the cloud</a><br>
5051

5152
Extras:
52-
* <a href='g3doc/detection_model_zoo.md'>Tensorflow detection model zoo</a><br>
53-
* <a href='g3doc/exporting_models.md'>
53+
54+
* <a href='g3doc/detection_model_zoo.md'>Tensorflow detection model zoo</a><br>
55+
* <a href='g3doc/exporting_models.md'>
5456
Exporting a trained model for inference</a><br>
55-
* <a href='g3doc/defining_your_own_model.md'>
57+
* <a href='g3doc/defining_your_own_model.md'>
5658
Defining your own model architecture</a><br>
57-
* <a href='g3doc/using_your_own_dataset.md'>
59+
* <a href='g3doc/using_your_own_dataset.md'>
5860
Bringing in your own dataset</a><br>
5961

6062
## Getting Help
6163

62-
Please report bugs to the tensorflow/models/ Github
64+
To get help with issues you may encounter using the Tensorflow Object Detection
65+
API, create a new question on [StackOverflow](https://stackoverflow.com/) with
66+
the tags "tensorflow" and "object-detection".
67+
68+
Please report bugs (actually broken code, not usage questions) to the
69+
tensorflow/models Github
6370
[issue tracker](https://github.com/tensorflow/models/issues), prefixing the
64-
issue name with "object_detection". To get help with issues you may encounter
65-
using the Tensorflow Object Detection API, create a new question on
66-
[StackOverflow](https://stackoverflow.com/) with the tags "tensorflow" and
67-
"object-detection".
71+
issue name with "object_detection".
6872

6973
## Release information
7074

75+
### October 31, 2017
76+
77+
We have released a new state-of-the-art model for object detection using
78+
the Faster-RCNN with the
79+
[NASNet-A image featurization](https://arxiv.org/abs/1707.07012). This
80+
model achieves mAP of 43.1% on the test-dev validation dataset for COCO,
81+
improving on the best available model in the zoo by 6% in terms
82+
of absolute mAP.
83+
84+
<b>Thanks to contributors</b>: Barret Zoph, Vijay Vasudevan, Jonathon Shlens, Quoc Le
85+
7186
### August 11, 2017
7287

7388
We have released an update to the [Android Detect

research/object_detection/g3doc/detection_model_zoo.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ Inside the un-tar'ed directory, you will find:
4040
| [rfcn_resnet101_coco](http://download.tensorflow.org/models/object_detection/rfcn_resnet101_coco_11_06_2017.tar.gz) | medium | 30 | Boxes |
4141
| [faster_rcnn_resnet101_coco](http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_coco_11_06_2017.tar.gz) | medium | 32 | Boxes |
4242
| [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_17_10_2017.tar.gz) | slow | 43 | Boxes |

research/object_detection/g3doc/running_pets.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,11 @@ python object_detection/export_inference_graph.py \
298298
--input_type image_tensor \
299299
--pipeline_config_path object_detection/samples/configs/faster_rcnn_resnet101_pets.config \
300300
--trained_checkpoint_prefix model.ckpt-${CHECKPOINT_NUMBER} \
301-
--output_directory output_inference_graph.pb
301+
--output_directory exported_graphs
302302
```
303303

304-
Afterwards, you should see a graph named `output_inference_graph.pb`.
304+
Afterwards, you should see a directory named `exported_graphs` containing the
305+
SavedModel and frozen graph.
305306

306307
## What's Next
307308

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Faster R-CNN with NASNet-A featurization
2+
# Configured for MSCOCO Dataset.
3+
# Users should configure the fine_tune_checkpoint field in the train config as
4+
# well as the label_map_path and input_path fields in the train_input_reader and
5+
# eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that
6+
# should be configured.
7+
model {
8+
faster_rcnn {
9+
num_classes: 90
10+
image_resizer {
11+
# TODO: Only fixed_shape_resizer is currently supported for NASNet
12+
# featurization. The reason for this is that nasnet.py only supports
13+
# inputs with fully known shapes. We need to update nasnet.py to handle
14+
# shapes not known at compile time.
15+
fixed_shape_resizer {
16+
height: 1200
17+
width: 1200
18+
}
19+
}
20+
feature_extractor {
21+
type: 'faster_rcnn_nas'
22+
}
23+
first_stage_anchor_generator {
24+
grid_anchor_generator {
25+
scales: [0.25, 0.5, 1.0, 2.0]
26+
aspect_ratios: [0.5, 1.0, 2.0]
27+
height_stride: 16
28+
width_stride: 16
29+
}
30+
}
31+
first_stage_box_predictor_conv_hyperparams {
32+
op: CONV
33+
regularizer {
34+
l2_regularizer {
35+
weight: 0.0
36+
}
37+
}
38+
initializer {
39+
truncated_normal_initializer {
40+
stddev: 0.01
41+
}
42+
}
43+
}
44+
first_stage_nms_score_threshold: 0.0
45+
first_stage_nms_iou_threshold: 0.7
46+
first_stage_max_proposals: 50
47+
first_stage_localization_loss_weight: 2.0
48+
first_stage_objectness_loss_weight: 1.0
49+
initial_crop_size: 17
50+
maxpool_kernel_size: 1
51+
maxpool_stride: 1
52+
second_stage_box_predictor {
53+
mask_rcnn_box_predictor {
54+
use_dropout: false
55+
dropout_keep_probability: 1.0
56+
fc_hyperparams {
57+
op: FC
58+
regularizer {
59+
l2_regularizer {
60+
weight: 0.0
61+
}
62+
}
63+
initializer {
64+
variance_scaling_initializer {
65+
factor: 1.0
66+
uniform: true
67+
mode: FAN_AVG
68+
}
69+
}
70+
}
71+
}
72+
}
73+
second_stage_post_processing {
74+
batch_non_max_suppression {
75+
score_threshold: 0.0
76+
iou_threshold: 0.6
77+
max_detections_per_class: 100
78+
max_total_detections: 100
79+
}
80+
score_converter: SOFTMAX
81+
}
82+
second_stage_localization_loss_weight: 2.0
83+
second_stage_classification_loss_weight: 1.0
84+
}
85+
}
86+
87+
train_config: {
88+
batch_size: 1
89+
optimizer {
90+
momentum_optimizer: {
91+
learning_rate: {
92+
manual_step_learning_rate {
93+
initial_learning_rate: 0.0003
94+
schedule {
95+
step: 0
96+
learning_rate: .0003
97+
}
98+
schedule {
99+
step: 900000
100+
learning_rate: .00003
101+
}
102+
schedule {
103+
step: 1200000
104+
learning_rate: .000003
105+
}
106+
}
107+
}
108+
momentum_optimizer_value: 0.9
109+
}
110+
use_moving_average: false
111+
}
112+
gradient_clipping_by_norm: 10.0
113+
fine_tune_checkpoint: "PATH_TO_BE_CONFIGURED/model.ckpt"
114+
from_detection_checkpoint: true
115+
# Note: The below line limits the training process to 200K steps, which we
116+
# empirically found to be sufficient enough to train the pets dataset. This
117+
# effectively bypasses the learning rate schedule (the learning rate will
118+
# never decay). Remove the below line to train indefinitely.
119+
num_steps: 200000
120+
data_augmentation_options {
121+
random_horizontal_flip {
122+
}
123+
}
124+
}
125+
126+
train_input_reader: {
127+
tf_record_input_reader {
128+
input_path: "PATH_TO_BE_CONFIGURED/mscoco_train.record"
129+
}
130+
label_map_path: "PATH_TO_BE_CONFIGURED/mscoco_label_map.pbtxt"
131+
}
132+
133+
eval_config: {
134+
metrics_set: "pascal_voc_metrics"
135+
num_examples: 8000
136+
# Note: The below line limits the evaluation process to 10 evaluations.
137+
# Remove the below line to evaluate indefinitely.
138+
max_evals: 10}
139+
140+
eval_input_reader: {
141+
tf_record_input_reader {
142+
input_path: "PATH_TO_BE_CONFIGURED/mscoco_val.record"
143+
}
144+
label_map_path: "PATH_TO_BE_CONFIGURED/mscoco_label_map.pbtxt"
145+
shuffle: false
146+
num_readers: 1
147+
num_epochs: 1
148+
}

0 commit comments

Comments
 (0)