Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSlim
提交
da3ef32e
P
PaddleSlim
项目概览
PaddlePaddle
/
PaddleSlim
大约 1 年 前同步成功
通知
51
Star
1434
Fork
344
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
16
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSlim
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
16
合并请求
16
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
da3ef32e
编写于
5月 08, 2023
作者:
X
xiaoluomi
提交者:
GitHub
5月 08, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add more rtdetr ACT demo (#1747)
上级
c4ee247a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
122 addition
and
2 deletion
+122
-2
example/auto_compression/detection/README.md
example/auto_compression/detection/README.md
+23
-0
example/auto_compression/detection/configs/rtdetr_hgnetv2_l_qat_dis.yaml
...mpression/detection/configs/rtdetr_hgnetv2_l_qat_dis.yaml
+32
-0
example/auto_compression/detection/configs/rtdetr_hgnetv2_x_qat_dis.yaml
...mpression/detection/configs/rtdetr_hgnetv2_x_qat_dis.yaml
+32
-0
example/auto_compression/detection/configs/rtdetr_r101vd_qat_dis.yaml
..._compression/detection/configs/rtdetr_r101vd_qat_dis.yaml
+32
-0
example/auto_compression/detection/configs/rtdetr_r50vd_qat_dis.yaml
...o_compression/detection/configs/rtdetr_r50vd_qat_dis.yaml
+3
-2
未找到文件。
example/auto_compression/detection/README.md
浏览文件 @
da3ef32e
...
...
@@ -44,6 +44,29 @@
| :-------- |:-------- | :---------------------: | :----------------: | :---------------: | :----------------------: | :---------------------: |
| 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.
### RT-DETR
| 模型 | Base mAP | 离线量化mAP | ACT量化mAP | TRT-FP32 | TRT-FP16 | TRT-INT8 | 配置文件 | 量化模型 |
| :---------------- | :------- | :---------: | :--------: | :------: | :------: | :--------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
| RT-DETR-R50 | 53.1 | 52.9 | 53.0 | 32.05ms | 9.12ms |
**6.96ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_r50vd_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_r50vd_6x_coco_quant.tar
)
|
| RT-DETR-R101 | 54.3 | - | 54.1 | 54.13ms | 12.68ms |
**9.20ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_r101vd_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_r101vd_6x_coco_quant.tar
)
|
| RT-DETR-HGNetv2-L | 53.0 | - | 52.9 | 26.16ms | 8.54ms |
**6.65ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_hgnetv2_l_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_hgnetv2_l_6x_coco_quant.tar
)
|
| RT-DETR-HGNetv2-X | 54.8 | - | 54.6 | 49.22ms | 12.50ms |
**9.24ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_hgnetv2_x_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_hgnetv2_x_6x_coco_quant.tar
)
|
-
上表测试环境:Tesla T4,TensorRT 8.6.0,CUDA 11.7,batch_size=1。
| 模型 | Base mAP | 离线量化mAP | ACT量化mAP | TRT-FP32 | TRT-FP16 | TRT-INT8 | 配置文件 | 量化模型 |
| :---------------- | :------- | :---------: | :--------: | :------: | :------: | :--------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
| RT-DETR-R50 | 53.1 | 52.9 | 53.0 | 9.64ms | 5.00ms |
**3.99ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_r50vd_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_r50vd_6x_coco_quant.tar
)
|
| RT-DETR-R101 | 54.3 | - | 54.1 | 14.93ms | 7.15ms |
**5.12ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_r101vd_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_r101vd_6x_coco_quant.tar
)
|
| RT-DETR-HGNetv2-L | 53.0 | - | 52.9 | 8.17ms | 4.77ms |
**4.00ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_hgnetv2_l_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_hgnetv2_l_6x_coco_quant.tar
)
|
| RT-DETR-HGNetv2-X | 54.8 | - | 54.6 | 12.81ms | 6.97ms |
**5.32ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/rtdetr_hgnetv2_x_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/rtdetr_hgnetv2_x_6x_coco_quant.tar
)
|
-
上表测试环境:A10,TensorRT 8.6.0,CUDA 11.6,batch_size=1。
-
mAP的指标均在COCO val2017数据集中评测得到,IoU=0.5:0.95。
-
两个表中的离线量化只量化模型中的conv2d,ACT量化模型中的conv2d和matmul。
## 3. 自动压缩流程
#### 3.1 准备环境
...
...
example/auto_compression/detection/configs/rtdetr_hgnetv2_l_qat_dis.yaml
0 → 100644
浏览文件 @
da3ef32e
Global
:
reader_config
:
configs/rtdetr_reader.yml
include_nms
:
True
Evaluation
:
True
model_dir
:
./rtdetr_hgnetv2_l_6x_coco/
model_filename
:
model.pdmodel
params_filename
:
model.pdiparams
Distillation
:
alpha
:
1.0
loss
:
soft_label
QuantAware
:
onnx_format
:
true
activation_quantize_type
:
'
moving_average_abs_max'
quantize_op_types
:
-
conv2d
-
depthwise_conv2d
-
matmul_v2
TrainConfig
:
train_iter
:
200
eval_iter
:
50
learning_rate
:
type
:
CosineAnnealingDecay
learning_rate
:
0.00003
T_max
:
10000
optimizer_builder
:
optimizer
:
type
:
SGD
weight_decay
:
4.0e-05
example/auto_compression/detection/configs/rtdetr_hgnetv2_x_qat_dis.yaml
0 → 100644
浏览文件 @
da3ef32e
Global
:
reader_config
:
configs/rtdetr_reader.yml
include_nms
:
True
Evaluation
:
True
model_dir
:
./rtdetr_r50vd_6x_coco/
model_filename
:
model.pdmodel
params_filename
:
model.pdiparams
Distillation
:
alpha
:
1.0
loss
:
soft_label
QuantAware
:
onnx_format
:
true
activation_quantize_type
:
'
moving_average_abs_max'
quantize_op_types
:
-
conv2d
-
depthwise_conv2d
-
matmul_v2
TrainConfig
:
train_iter
:
500
eval_iter
:
100
learning_rate
:
type
:
CosineAnnealingDecay
learning_rate
:
0.00003
T_max
:
10000
optimizer_builder
:
optimizer
:
type
:
SGD
weight_decay
:
4.0e-05
example/auto_compression/detection/configs/rtdetr_r101vd_qat_dis.yaml
0 → 100644
浏览文件 @
da3ef32e
Global
:
reader_config
:
configs/rtdetr_reader.yml
include_nms
:
True
Evaluation
:
True
model_dir
:
./rtdetr_hgnetv2_x_6x_coco/
model_filename
:
model.pdmodel
params_filename
:
model.pdiparams
Distillation
:
alpha
:
1.0
loss
:
soft_label
QuantAware
:
onnx_format
:
true
activation_quantize_type
:
'
moving_average_abs_max'
quantize_op_types
:
-
conv2d
-
depthwise_conv2d
-
matmul_v2
TrainConfig
:
train_iter
:
200
eval_iter
:
50
learning_rate
:
type
:
CosineAnnealingDecay
learning_rate
:
0.00003
T_max
:
10000
optimizer_builder
:
optimizer
:
type
:
SGD
weight_decay
:
4.0e-05
example/auto_compression/detection/configs/rtdetr_r50vd_qat_dis.yaml
浏览文件 @
da3ef32e
...
...
@@ -17,10 +17,11 @@ QuantAware:
quantize_op_types
:
-
conv2d
-
depthwise_conv2d
-
matmul_v2
TrainConfig
:
train_iter
:
1
0
eval_iter
:
10
train_iter
:
50
0
eval_iter
:
10
0
learning_rate
:
type
:
CosineAnnealingDecay
learning_rate
:
0.00003
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录