Skip to content

Commit 9ad15d2

Browse files
mhbuehlerashahba
authored andcommitted
RFCN readme fixes
1 parent 67052a8 commit 9ad15d2

File tree

1 file changed

+28
-33
lines changed
  • benchmarks/object_detection/tensorflow/rfcn

1 file changed

+28
-33
lines changed

benchmarks/object_detection/tensorflow/rfcn/README.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ better performance results for Int8 precision models with smaller batch sizes.
1515
If you want to disable the use of TCMalloc, set `--disable-tcmalloc=True`
1616
when calling `launch_benchmark.py` and the script will run without TCMalloc.
1717

18-
1. Clone the [tensorflow/models](https://github.com/tensorflow/models) as `tensorflow-models` and [cocodataset/cocoapi](https://github.com/cocodataset/cocoapi) repositories:
18+
1. Clone [intelai/models](https://github.com/intelai/models), [tensorflow/models](https://github.com/tensorflow/models) as `tensorflow-models`, and [cocodataset/cocoapi](https://github.com/cocodataset/cocoapi) repositories:
1919

2020
```
21+
$ git clone https://github.com/IntelAI/models.git intel-models
2122
$ git clone https://github.com/tensorflow/models.git tensorflow-models
2223
$ cd tensorflow-models
2324
$ git checkout 6c21084503b27a9ab118e1db25f79957d5ef540b
24-
$ git apply models/object_detection/tensorflow/rfcn/inference/tf-2.0.patch
25+
$ git apply ../intel-models/models/object_detection/tensorflow/rfcn/inference/tf-2.0.patch
2526
$ git clone https://github.com/cocodataset/cocoapi.git
2627
2728
```
@@ -70,9 +71,7 @@ The `--output_dir` is the location where the TF record files will be
7071
located after the script has completed.
7172

7273
```
73-
7474
# We are going to use an older version of the conversion script to checkout the git commit
75-
$ cd models
7675
$ git checkout 7a9934df2afdf95be9405b4e9f1f2480d748dc40
7776
7877
$ cd research/object_detection/dataset_tools/
@@ -98,18 +97,16 @@ $ git checkout master
9897

9998
The `coco_val.record` file is what we will use in this inference example.
10099

101-
4. Download the pretrained model:
102-
Int8 Graph
100+
4. Download the pre-trained model (Int8 graph):
101+
103102
```
104103
$ wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_6/rfcn_resnet101_int8_coco_pretrained_model.pb
105104
```
106105

107-
5. Clone the [intelai/models](https://github.com/intelai/models) repo
108-
and then run the scripts for either batch/online inference performance or accuracy.
106+
5. Go to the Model Zoo benchmarks directory and run the scripts for either batch/online inference performance or accuracy.
109107

110108
```
111-
$ git clone https://github.com/IntelAI/models.git
112-
$ cd models/benchmarks
109+
$ cd /home/<user>/intel-models/benchmarks
113110
```
114111

115112
Run for batch and online inference where the `--data-location`
@@ -122,7 +119,7 @@ python launch_benchmark.py \
122119
--mode inference \
123120
--precision int8 \
124121
--framework tensorflow \
125-
--docker-image intel/intel-optimized-tensorflow:2.1.0 \
122+
--docker-image intel/intel-optimized-tensorflow:tensorflow-2.2-bf16-nightly \
126123
--model-source-dir /home/<user>/tensorflow-models \
127124
--data-location /home/<user>/val/val2017 \
128125
--in-graph /home/<user>/rfcn_resnet101_int8_coco_pretrained_model.pb \
@@ -139,7 +136,7 @@ python launch_benchmark.py \
139136
--mode inference \
140137
--precision int8 \
141138
--framework tensorflow \
142-
--docker-image intel/intel-optimized-tensorflow:2.1.0 \
139+
--docker-image intel/intel-optimized-tensorflow:tensorflow-2.2-bf16-nightly \
143140
--model-source-dir /home/<user>/tensorflow-models \
144141
--data-location /home/<user>/coco/output/coco_val.record \
145142
--in-graph /home/<user>/rfcn_resnet101_int8_coco_pretrained_model.pb \
@@ -151,19 +148,20 @@ Note that the `--verbose` or `--output-dir` flag can be added to any of the abov
151148
to get additional debug output or change the default output location.
152149

153150
6. Log files are located at the value of `--output-dir` (or
154-
`models/benchmarks/common/tensorflow/logs` if no path has been specified):
151+
`intel-models/benchmarks/common/tensorflow/logs` if no path has been specified):
155152

156153
Below is a sample log file tail when running for batch
157154
and online inference:
158155
```
159-
Step 0: 11.4450089931 seconds
160-
Step 10: 0.25656080246 seconds
156+
Step 0: ... seconds
157+
Step 10: ... seconds
158+
...
159+
Step 460: ... seconds
160+
Step 470: ... seconds
161+
Step 480: ... seconds
162+
Step 490: ... seconds
163+
Avg. Duration per Step: ...
161164
...
162-
Step 460: 0.256786823273 seconds
163-
Step 470: 0.267828941345 seconds
164-
Step 480: 0.141321897507 seconds
165-
Step 490: 0.127830982208 seconds
166-
Avg. Duration per Step:0.195356227875
167165
Ran inference with batch size -1
168166
Log location outside container: {--output-dir}/benchmark_rfcn_inference_int8_20190416_182445.log
169167
```
@@ -196,13 +194,14 @@ better performance results for FP32 precision models with smaller batch sizes.
196194
If you want to disable the use of TCMalloc, set `--disable-tcmalloc=True`
197195
when calling `launch_benchmark.py` and the script will run without TCMalloc.
198196

199-
1. Clone the [tensorflow/models](https://github.com/tensorflow/models) as `tensorflow-models` and [cocodataset/cocoapi](https://github.com/cocodataset/cocoapi) repositories:
197+
Clone [intelai/models](https://github.com/intelai/models), [tensorflow/models](https://github.com/tensorflow/models) as `tensorflow-models`, and [cocodataset/cocoapi](https://github.com/cocodataset/cocoapi) repositories:
200198

201199
```
200+
$ git clone https://github.com/IntelAI/models.git intel-models
202201
$ git clone https://github.com/tensorflow/models.git tensorflow-models
203202
$ cd tensorflow-models
204203
$ git checkout 6c21084503b27a9ab118e1db25f79957d5ef540b
205-
$ git apply models/object_detection/tensorflow/rfcn/inference/tf-2.0.patch
204+
$ git apply ../intel-models/models/object_detection/tensorflow/rfcn/inference/tf-2.0.patch
206205
$ git clone https://github.com/cocodataset/cocoapi.git
207206
```
208207

@@ -272,21 +271,17 @@ $ git checkout master
272271

273272
The `coco_val.record` file is what we will use in this inference example.
274273

275-
4. Download the pretrained model:
274+
4. Download the pre-trained model (FP32 graph):
276275

277-
FP32 Graph
278276
```
279277
$ wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_6/rfcn_resnet101_fp32_coco_pretrained_model.tar.gz
280278
$ tar -xzvf rfcn_resnet101_fp32_coco_pretrained_model.tar.gz
281279
```
282280

283-
284-
5. Clone the [intelai/models](https://github.com/intelai/models) repo
285-
and then run the scripts for either batch/online inference performance or accuracy.
281+
5. Go to the Model Zoo benchmarks directory and run the scripts for either batch/online inference performance or accuracy.
286282

287283
```
288-
$ git clone https://github.com/IntelAI/models.git
289-
$ cd models/benchmarks
284+
$ cd /home/<user>/intel-models/benchmarks
290285
```
291286

292287
Run for batch and online inference where the `--data-location`
@@ -299,7 +294,7 @@ python launch_benchmark.py \
299294
--mode inference \
300295
--precision fp32 \
301296
--framework tensorflow \
302-
--docker-image intel/intel-optimized-tensorflow:2.1.0 \
297+
--docker-image intel/intel-optimized-tensorflow:tensorflow-2.2-bf16-nightly \
303298
--model-source-dir /home/<user>/tensorflow-models \
304299
--data-location /home/<user>/val/val2017 \
305300
--in-graph /home/<user>/rfcn_resnet101_fp32_coco_pretrained_model \
@@ -317,7 +312,7 @@ python launch_benchmark.py \
317312
--mode inference \
318313
--precision fp32 \
319314
--framework tensorflow \
320-
--docker-image intel/intel-optimized-tensorflow:2.1.0 \
315+
--docker-image intel/intel-optimized-tensorflow:tensorflow-2.2-bf16-nightly \
321316
--model-source-dir /home/<user>/tensorflow-models \
322317
--data-location /home/<user>/coco/output/coco_val.record \
323318
--in-graph /home/<user>/rfcn_resnet101_fp32_coco_pretrained_model.pb \
@@ -329,12 +324,12 @@ Note that the `--verbose` or `--output-dir` flag can be added to any of the abov
329324
to get additional debug output or change the default output location.
330325

331326
6. Log files are located at the value of `--output-dir` (or
332-
`models/benchmarks/common/tensorflow/logs` if no path has been specified):
327+
`intel-models/benchmarks/common/tensorflow/logs` if no path has been specified):
333328

334329
Below is a sample log file tail when running for batch
335330
and online inference:
336331
```
337-
Average time per step: 0.262 sec
332+
Average time per step: ... sec
338333
Received these standard args: Namespace(accuracy_only=False, batch_size=1, benchmark_only=False, checkpoint='/checkpoints', data_location='/dataset', framework='tensorflow', input_graph=None, intelai_models='/workspace/intelai_models', mode='inference', model_args=[], model_name='rfcn', model_source_dir='/workspace/models', num_cores=-1, num_inter_threads=2, num_intra_threads=56, precision='fp32, socket_id=0, use_case='object_detection', verbose=True)
339334
Received these custom args: ['--config_file=rfcn_pipeline.config']
340335
Run model here.

0 commit comments

Comments
 (0)