Skip to content

Commit 8399671

Browse files
committed
Update the frozen pb path for ssd_resnet50_v1.
1 parent 5f421e0 commit 8399671

File tree

1 file changed

+11
-11
lines changed
  • examples/tensorflow/object_detection

1 file changed

+11
-11
lines changed

examples/tensorflow/object_detection/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ Download CoCo Dataset from [Official Website](https://cocodataset.org/#download)
2727
### 5. Download Frozen PB
2828
```shell
2929
wget http://download.tensorflow.org/models/object_detection/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz
30-
tar -xvzf ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz
30+
tar -xvzf ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz -C /tmp
3131
```
3232

3333
## Run Command
3434
```Shell
3535
# The cmd of running ssd_resnet50_v1
36-
python infer_detections.py --batch-size 1 --input-graph /path/to/fp32_frozen.pb --data-location /path/to/dataset/coco_val.record --accuracy-only --config ssd_resnet50_v1.yaml
36+
python infer_detections.py --batch-size 1 --input-graph /tmp/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/frozen_inference_graph.pb --data-location /path/to/dataset/coco_val.record --accuracy-only --config ssd_resnet50_v1.yaml
3737
```
3838

39-
Details of enabling iLiT on ssd_resnet50_v1 for Tensorflow.
39+
Details of enabling iLiT on ssd_resnet50_v1 for Tensorflow.
4040
=========================
4141

4242
This is a tutorial of how to enable ssd_resnet50_v1 model with iLiT.
@@ -73,7 +73,7 @@ def __iter__(self):
7373
### Evaluation Part Adaption
7474
The Class model_infer has the run_accuracy function which actually could be re-used as the eval_func.
7575

76-
Compare with the original version, we added the additional parameter **input_graph** as the iLiT would call this interface with the graph to be evaluated. The following code snippet also need to be added into the run_accuracy function to update the class members like self.input_tensor and self.output_tensors.
76+
Compare with the original version, we added the additional parameter **input_graph** as the iLiT would call this interface with the graph to be evaluated. The following code snippet also need to be added into the run_accuracy function to update the class members like self.input_tensor and self.output_tensors.
7777
```python
7878
if input_graph:
7979
self.infer_graph = input_graph
@@ -87,25 +87,25 @@ if input_graph:
8787
```
8888

8989
### Write Yaml config file
90-
In examples directory, there is a ssd_resnet50_v1.yaml. We could remove most of items and only keep mandatory item for tuning.
90+
In examples directory, there is a ssd_resnet50_v1.yaml. We could remove most of items and only keep mandatory item for tuning.
9191

9292
```yaml
9393
framework:
94-
- name: tensorflow
94+
- name: tensorflow
9595
inputs: image_tensor
9696
outputs: num_detections,detection_boxes,detection_scores,detection_classes
9797

98-
calibration:
98+
calibration:
9999
- iterations: 1, 5, 10, 20
100-
algorithm:
100+
algorithm:
101101
- weight: minmax
102102
activation: minmax
103103

104104
tuning:
105105
accuracy_criterion:
106-
- relative: 0.01
107-
timeout: 0
108-
random_seed: 9527
106+
- relative: 0.01
107+
timeout: 0
108+
random_seed: 9527
109109
```
110110
Here we set the input tensor and output tensors name into *inputs* and *outputs* field. Meanwhile, we set mAp target as tolerating 0.01 relative mAp of baseline. The default tuning strategy is basic strategy. The timeout 0 means early stop as well as a tuning config meet accuracy target.
111111

0 commit comments

Comments
 (0)