Skip to content

Commit

Permalink
fix the config of ssd_mobilenet_v1 (PaddlePaddle#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzjjay authored Oct 8, 2022
1 parent d2acb14 commit 253c09b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions example/auto_compression/detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
- mAP的指标均在COCO val2017数据集中评测得到,IoU=0.5:0.95。
- PP-YOLOE-l模型在Tesla V100的GPU环境下测试,并且开启TensorRT,batch_size=1,包含NMS,测试脚本是[benchmark demo](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.4/deploy/python)
- PP-YOLOE-s模型在Tesla T4,TensorRT 8.4.1,CUDA 11.2,batch_size=1,不包含NMS,测试脚本是[cpp_infer_ppyoloe](./cpp_infer_ppyoloe)
### SSD on Pascal VOC
| 模型 | Box AP | ACT量化Box AP | TRT-FP32 | TRT-INT8 | 配置文件 | 量化模型 |
| :-------- |:-------- | :---------------------: | :----------------: | :---------------: | :----------------------: | :---------------------: |
| SSD-MobileNetv1 | 73.8 | 73.52 | 4.0ms | 1.7ms | [config](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ssd_mbv1_voc_qat_dis.yaml) | [Model](https://bj.bcebos.com/v1/paddle-slim-models/act/ssd_mobilenet_v1_quant.tar) |
- 测速环境:Tesla T4,TensorRT 8.4.1,CUDA 11.2,batch_size=1,包含NMS.
## 3. 自动压缩流程

#### 3.1 准备环境
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@ Global:
reader_config: configs/ssd_reader.yml
input_list: ['image', 'scale_factor', 'im_shape']
Evaluation: True
model_dir: ./ssd_mobilenet_v1_300_120e_voc
model_dir: ./ssd_mobilenet_v1_300_120e_voc # Model Link: https://bj.bcebos.com/v1/paddle-slim-models/act/ssd_mobilenet_v1_300_120e_voc.tar
model_filename: model.pdmodel
params_filename: model.pdiparams

Distillation:
alpha: 1.0
loss: l2
loss: soft_label
node:
- concat_0.tmp_0
- concat_2.tmp_0
- concat_1.tmp_0

Quantization:
activation_quantize_type: 'range_abs_max'
use_pact: True
weight_quantize_type: 'channel_wise_abs_max'
activation_quantize_type: 'moving_average_abs_max'
quantize_op_types:
- conv2d
- depthwise_conv2d
onnx_format: True

TrainConfig:
train_iter: 80000
eval_iter: 1000
learning_rate:
type: CosineAnnealingDecay
learning_rate: 0.00001
T_max: 120000
epochs: 5
eval_iter: 300
learning_rate: 0.001
optimizer_builder:
optimizer:
type: SGD
weight_decay: 4.0e-05

origin_metric: 0.738
2 changes: 1 addition & 1 deletion example/auto_compression/image_classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
| MobileNetV3_large_x1_0 | Baseline | 75.32 | - | 16.62 | - | [Model](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV3_large_x1_0_infer.tar) |
| MobileNetV3_large_x1_0 | 量化+蒸馏 | 74.04 | - | 9.85 | [Config](./configs/MobileNetV3_large_x1_0/qat_dis.yaml) | [Model](https://paddle-slim-models.bj.bcebos.com/act/MobileNetV3_large_x1_0_QAT.tar) |
| MobileNetV3_large_x1_0_ssld | Baseline | 78.96 | - | 16.62 | - | [Model](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV3_large_x1_0_ssld_infer.tar) |
| MobileNetV3_large_x1_0_ssld | 量化+蒸馏 | 77.17 | - | 9.85 | [Config](./configs/MobileNetV3_large_x1_0/qat_dis.yaml) | [Model](https://paddle-slim-models.bj.bcebos.com/act/MobileNetV3_large_x1_0_ssld_QAT.tar) |
| MobileNetV3_large_x1_0_ssld | 量化+蒸馏 | 78.17 | - | 9.85 | [Config](./configs/MobileNetV3_large_x1_0/qat_dis.yaml) | [Model](https://paddle-slim-models.bj.bcebos.com/act/MobileNetV3_large_x1_0_ssld_QAT.tar) |

- ARM CPU 测试环境:`SDM865(4xA77+4xA55)`
- Nvidia GPU 测试环境:
Expand Down

0 comments on commit 253c09b

Please sign in to comment.