Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSlim
提交
2b20f174
P
PaddleSlim
项目概览
PaddlePaddle
/
PaddleSlim
大约 2 年 前同步成功
通知
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看板
未验证
提交
2b20f174
编写于
12月 02, 2022
作者:
G
Guanghua Yu
提交者:
GitHub
12月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add PPYOLOE+ act demo (#1573)
上级
044909e7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
79 addition
and
8 deletion
+79
-8
example/auto_compression/detection/README.md
example/auto_compression/detection/README.md
+1
-0
example/auto_compression/detection/configs/ppyoloe_l_qat_dis.yaml
...auto_compression/detection/configs/ppyoloe_l_qat_dis.yaml
+2
-1
example/auto_compression/detection/configs/ppyoloe_plus_reader.yml
...uto_compression/detection/configs/ppyoloe_plus_reader.yml
+26
-0
example/auto_compression/detection/configs/ppyoloe_plus_s_qat_dis.yaml
...compression/detection/configs/ppyoloe_plus_s_qat_dis.yaml
+34
-0
example/auto_compression/detection/configs/ppyoloe_s_qat_dis.yaml
...auto_compression/detection/configs/ppyoloe_s_qat_dis.yaml
+2
-1
example/auto_compression/detection/eval.py
example/auto_compression/detection/eval.py
+7
-3
example/auto_compression/detection/run.py
example/auto_compression/detection/run.py
+7
-3
未找到文件。
example/auto_compression/detection/README.md
浏览文件 @
2b20f174
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
| :-------- |:-------- |:--------: | :---------------------: | :----------------: | :----------------: | :---------------: | :----------------------: | :---------------------: |
| :-------- |:-------- |:--------: | :---------------------: | :----------------: | :----------------: | :---------------: | :----------------------: | :---------------------: |
| PP-YOLOE-l | 50.9 | - | 50.6 | 11.2ms | 7.7ms |
**6.7ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ppyoloe_l_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_crn_l_300e_coco_quant.tar
)
|
| PP-YOLOE-l | 50.9 | - | 50.6 | 11.2ms | 7.7ms |
**6.7ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ppyoloe_l_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_crn_l_300e_coco_quant.tar
)
|
| PP-YOLOE-s | 43.1 | 41.2 | 42.6 | 6.51ms | 2.77ms |
**2.12ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ppyoloe_s_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_s_quant.tar
)
|
| PP-YOLOE-s | 43.1 | 41.2 | 42.6 | 6.51ms | 2.77ms |
**2.12ms**
|
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ppyoloe_s_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_s_quant.tar
)
|
| PP-YOLOE+ s | 43.7 | - | 42.7 | - | - | - |
[
config
](
https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/configs/ppyoloe_plus_s_qat_dis.yaml
)
|
[
Model
](
https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_plus_crn_s_80e_coco_no_nms_quant.tar
)
|
-
mAP的指标均在COCO val2017数据集中评测得到,IoU=0.5:0.95。
-
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-l模型在Tesla V100的GPU环境下测试,并且开启TensorRT,batch_size=1,包含NMS,测试脚本是
[
benchmark demo
](
https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.4/deploy/python
)
。
...
...
example/auto_compression/detection/configs/ppyoloe_l_qat_dis.yaml
浏览文件 @
2b20f174
Global
:
Global
:
reader_config
:
configs/yolo_reader.yml
reader_config
:
configs/yolo_reader.yml
arch
:
YOLO
arch
:
PPYOLOE
include_nms
:
True
Evaluation
:
True
Evaluation
:
True
model_dir
:
./ppyoloe_crn_l_300e_coco
model_dir
:
./ppyoloe_crn_l_300e_coco
model_filename
:
model.pdmodel
model_filename
:
model.pdmodel
...
...
example/auto_compression/detection/configs/ppyoloe_plus_reader.yml
0 → 100644
浏览文件 @
2b20f174
metric
:
COCO
num_classes
:
80
# Datset configuration
TrainDataset
:
!COCODataSet
image_dir
:
train2017
anno_path
:
annotations/instances_train2017.json
dataset_dir
:
dataset/coco/
EvalDataset
:
!COCODataSet
image_dir
:
val2017
anno_path
:
annotations/instances_val2017.json
dataset_dir
:
dataset/coco/
worker_num
:
0
# preprocess reader in test
EvalReader
:
sample_transforms
:
-
Decode
:
{}
-
Resize
:
{
target_size
:
[
640
,
640
],
keep_ratio
:
False
,
interp
:
2
}
-
NormalizeImage
:
{
mean
:
[
0.
,
0.
,
0.
],
std
:
[
1.
,
1.
,
1.
],
norm_type
:
none
}
-
Permute
:
{}
batch_size
:
4
example/auto_compression/detection/configs/ppyoloe_plus_s_qat_dis.yaml
0 → 100644
浏览文件 @
2b20f174
Global
:
reader_config
:
configs/ppyoloe_plus_reader.yml
arch
:
PPYOLOE
include_nms
:
False
Evaluation
:
True
model_dir
:
./ppyoloe_plus_crn_s_80e_coco_no_nms
# https://bj.bcebos.com/v1/paddle-slim-models/act/ppyoloe_plus_crn_s_80e_coco_no_nms.tar
model_filename
:
model.pdmodel
params_filename
:
model.pdiparams
Distillation
:
alpha
:
1.0
loss
:
soft_label
QuantAware
:
onnx_format
:
true
use_pact
:
true
activation_quantize_type
:
'
moving_average_abs_max'
quantize_op_types
:
-
conv2d
-
depthwise_conv2d
TrainConfig
:
train_iter
:
5000
eval_iter
:
1000
learning_rate
:
type
:
CosineAnnealingDecay
learning_rate
:
0.00003
T_max
:
6000
optimizer_builder
:
optimizer
:
type
:
SGD
weight_decay
:
4.0e-05
example/auto_compression/detection/configs/ppyoloe_s_qat_dis.yaml
浏览文件 @
2b20f174
Global
:
Global
:
reader_config
:
configs/yolo_reader.yml
reader_config
:
configs/yolo_reader.yml
arch
:
PPYOLOE
# When export exclude_nms=True, need set arch: PPYOLOE
arch
:
PPYOLOE
include_nms
:
False
Evaluation
:
True
Evaluation
:
True
model_dir
:
./ppyoloe_crn_s_300e_coco
model_dir
:
./ppyoloe_crn_s_300e_coco
model_filename
:
model.pdmodel
model_filename
:
model.pdmodel
...
...
example/auto_compression/detection/eval.py
浏览文件 @
2b20f174
...
@@ -85,9 +85,13 @@ def eval():
...
@@ -85,9 +85,13 @@ def eval():
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'keypoint'
:
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'keypoint'
:
res
=
keypoint_post_process
(
data
,
data_input
,
exe
,
val_program
,
res
=
keypoint_post_process
(
data
,
data_input
,
exe
,
val_program
,
fetch_targets
,
outs
)
fetch_targets
,
outs
)
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'PPYOLOE'
:
elif
'include_nms'
in
global_config
and
not
global_config
[
postprocess
=
PPYOLOEPostProcess
(
'include_nms'
]:
score_threshold
=
0.01
,
nms_threshold
=
0.6
)
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'PPYOLOE'
:
postprocess
=
PPYOLOEPostProcess
(
score_threshold
=
0.01
,
nms_threshold
=
0.6
)
else
:
assert
"Not support arch={} now."
.
format
(
global_config
[
'arch'
])
res
=
postprocess
(
np
.
array
(
outs
[
0
]),
data_all
[
'scale_factor'
])
res
=
postprocess
(
np
.
array
(
outs
[
0
]),
data_all
[
'scale_factor'
])
else
:
else
:
for
out
in
outs
:
for
out
in
outs
:
...
...
example/auto_compression/detection/run.py
浏览文件 @
2b20f174
...
@@ -100,9 +100,13 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list):
...
@@ -100,9 +100,13 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list):
res
=
keypoint_post_process
(
data
,
data_input
,
exe
,
res
=
keypoint_post_process
(
data
,
data_input
,
exe
,
compiled_test_program
,
test_fetch_list
,
compiled_test_program
,
test_fetch_list
,
outs
)
outs
)
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'PPYOLOE'
:
elif
'include_nms'
in
global_config
and
not
global_config
[
postprocess
=
PPYOLOEPostProcess
(
'include_nms'
]:
score_threshold
=
0.01
,
nms_threshold
=
0.6
)
if
'arch'
in
global_config
and
global_config
[
'arch'
]
==
'PPYOLOE'
:
postprocess
=
PPYOLOEPostProcess
(
score_threshold
=
0.01
,
nms_threshold
=
0.6
)
else
:
assert
"Not support arch={} now."
.
format
(
global_config
[
'arch'
])
res
=
postprocess
(
np
.
array
(
outs
[
0
]),
data_all
[
'scale_factor'
])
res
=
postprocess
(
np
.
array
(
outs
[
0
]),
data_all
[
'scale_factor'
])
else
:
else
:
for
out
in
outs
:
for
out
in
outs
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录