From f5394864779b6f27092dc6c39e446b3e0248dd64 Mon Sep 17 00:00:00 2001 From: Feng Ni Date: Fri, 10 Feb 2023 16:58:08 +0800 Subject: [PATCH] [cherry-pick] update phuman ppvehicle tiny models (#7728) * update pphuman ppvechicle new models, test=document_fixb * update docs, test=document_fixb * update docs, test=document_fix * fix configs, test=document_fix --- configs/pphuman/README.md | 4 +- ...oe_plus_crn_t_auxhead_320_60e_pphuman.yml} | 6 +- ..._plus_crn_t_p2_auxhead_320_60e_pphuman.yml | 78 ++++++++++++++++++ configs/ppvehicle/README.md | 4 +- ..._plus_crn_t_auxhead_320_60e_ppvehicle.yml} | 6 +- ...lus_crn_t_p2_auxhead_320_60e_ppvehicle.yml | 79 +++++++++++++++++++ configs/ppyoloe/README.md | 6 +- configs/ppyoloe/README_cn.md | 6 +- ...reader.yml => ppyoloe_plus_reader_320.yml} | 0 configs/ppyoloe/distill/README.md | 5 +- ...yml => ppyoloe_crn_t_p2_320_300e_coco.yml} | 4 +- ...e_plus_crn_t_p2_auxhead_320_300e_coco.yml} | 4 +- ppdet/modeling/heads/ppyoloe_head.py | 11 ++- 13 files changed, 187 insertions(+), 26 deletions(-) rename configs/pphuman/{ppyoloe_plus_crn_t_p2_60e_pphuman.yml => ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.yml} (85%) create mode 100644 configs/pphuman/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.yml rename configs/ppvehicle/{ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml => ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.yml} (85%) create mode 100644 configs/ppvehicle/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.yml rename configs/ppyoloe/_base_/{ppyoloe_plus_tiny_reader.yml => ppyoloe_plus_reader_320.yml} (100%) rename configs/ppyoloe/{ppyoloe_crn_t_p2_300e_coco.yml => ppyoloe_crn_t_p2_320_300e_coco.yml} (94%) rename configs/ppyoloe/{ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml => ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml} (91%) diff --git a/configs/pphuman/README.md b/configs/pphuman/README.md index 6a713b6ce..e267bbd73 100644 --- a/configs/pphuman/README.md +++ b/configs/pphuman/README.md @@ -11,8 +11,8 @@ PaddleDetection团队提供了针对行人的基于PP-YOLOE的检测模型,用 |PP-YOLOE-l| CrowdHuman | 48.0 | 81.9 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_l_36e_crowdhuman.pdparams) | [配置文件](./ppyoloe_crn_l_36e_crowdhuman.yml) | |PP-YOLOE-s| 业务数据集 | 53.2 | - | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | [配置文件](./ppyoloe_crn_s_36e_pphuman.yml) | |PP-YOLOE-l| 业务数据集 | 57.8 | - | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip) | [配置文件](./ppyoloe_crn_l_36e_pphuman.yml) | -|PP-YOLOE+_t-P2(320)| 业务数据集 | 49.8 | - | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_t_p2_60e_pipeline.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_60e_pphuman.yml) | -|PP-YOLOE+_t-P2(416)| 业务数据集 | 52.2 | - | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_t_p2_60e_pipeline.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_60e_pphuman.yml) | +|PP-YOLOE+_t-P2-aux(320)| 业务数据集 | 49.8 | 85.0 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/pphuman/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.yml) | +|PP-YOLOE+_t-aux(320)| 业务数据集 | 45.7 | 81.2 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/pphuman/ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.zip) | [配置文件](./ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.yml) | **注意:** diff --git a/configs/pphuman/ppyoloe_plus_crn_t_p2_60e_pphuman.yml b/configs/pphuman/ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.yml similarity index 85% rename from configs/pphuman/ppyoloe_plus_crn_t_p2_60e_pphuman.yml rename to configs/pphuman/ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.yml index b13f19c55..9d542fe6b 100644 --- a/configs/pphuman/ppyoloe_plus_crn_t_p2_60e_pphuman.yml +++ b/configs/pphuman/ppyoloe_plus_crn_t_auxhead_320_60e_pphuman.yml @@ -3,14 +3,14 @@ _BASE_: [ '../runtime.yml', '../ppyoloe/_base_/optimizer_300e.yml', '../ppyoloe/_base_/ppyoloe_plus_crn_tiny_auxhead.yml', - '../ppyoloe/_base_/ppyoloe_plus_reader_tiny.yml', + '../ppyoloe/_base_/ppyoloe_plus_reader_320.yml', ] log_iter: 100 snapshot_epoch: 4 -weights: output/ppyoloe_plus_crn_tiny_60e_pphuman/model_final +weights: output/ppyoloe_plus_crn_t_auxhead_320_60e_pphuman/model_final -pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_tiny_auxhead_300e_coco.pdparams +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams # 640*640 COCO mAP 39.7 depth_mult: 0.33 width_mult: 0.375 diff --git a/configs/pphuman/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.yml b/configs/pphuman/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.yml new file mode 100644 index 000000000..fd0605cfe --- /dev/null +++ b/configs/pphuman/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman.yml @@ -0,0 +1,78 @@ +_BASE_: [ + '../datasets/coco_detection.yml', + '../runtime.yml', + '../ppyoloe/_base_/optimizer_300e.yml', + '../ppyoloe/_base_/ppyoloe_plus_crn_tiny_auxhead.yml', + '../ppyoloe/_base_/ppyoloe_plus_reader_320.yml', +] + +log_iter: 100 +snapshot_epoch: 4 +weights: output/ppyoloe_plus_crn_t_p2_auxhead_320_60e_pphuman/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.pdparams # 320*320 COCO mAP 36.3 +depth_mult: 0.33 +width_mult: 0.375 + + +num_classes: 1 +TrainDataset: + !COCODataSet + image_dir: "" + anno_path: annotations/train.json + dataset_dir: dataset/pphuman + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + +EvalDataset: + !COCODataSet + image_dir: "" + anno_path: annotations/val.json + dataset_dir: dataset/pphuman + +TestDataset: + !ImageFolder + anno_path: annotations/val.json + dataset_dir: dataset/pphuman + + +TrainReader: + batch_size: 8 + + +epoch: 60 +LearningRate: + base_lr: 0.001 + schedulers: + - !CosineDecay + max_epochs: 72 + - !LinearWarmup + start_factor: 0. + epochs: 1 + + +architecture: PPYOLOEWithAuxHead +PPYOLOEWithAuxHead: + backbone: CSPResNet + neck: CustomCSPPAN + yolo_head: PPYOLOEHead + aux_head: SimpleConvHead + post_process: ~ + +CSPResNet: + return_idx: [0, 1, 2, 3] # index 0 stands for P2 + +CustomCSPPAN: + out_channels: [384, 384, 384, 384] + +SimpleConvHead: + fpn_strides: [32, 16, 8, 4] + +PPYOLOEHead: + fpn_strides: [32, 16, 8, 4] + static_assigner_epoch: -1 + nms: + name: MultiClassNMS + nms_top_k: 1000 + keep_top_k: 300 + score_threshold: 0.01 + nms_threshold: 0.7 diff --git a/configs/ppvehicle/README.md b/configs/ppvehicle/README.md index 918116290..0c09ce7bb 100644 --- a/configs/ppvehicle/README.md +++ b/configs/ppvehicle/README.md @@ -19,8 +19,8 @@ PaddleDetection团队提供了针对自动驾驶场景的基于PP-YOLOE的检测 |PP-YOLOE-s| PPVehicle9cls | 9 | 35.3 | [下载链接](https://paddledet.bj.bcebos.com/models/mot_ppyoloe_s_36e_ppvehicle9cls.pdparams) | [配置文件](./mot_ppyoloe_s_36e_ppvehicle9cls.yml) | |PP-YOLOE-l| PPVehicle | 1 | 63.9 | [下载链接](https://paddledet.bj.bcebos.com/models/mot_ppyoloe_l_36e_ppvehicle.pdparams) | [配置文件](./mot_ppyoloe_l_36e_ppvehicle.yml) | |PP-YOLOE-s| PPVehicle | 1 | 61.3 | [下载链接](https://paddledet.bj.bcebos.com/models/mot_ppyoloe_s_36e_ppvehicle.pdparams) | [配置文件](./mot_ppyoloe_s_36e_ppvehicle.yml) | -|PP-YOLOE+_t-P2(320)| PPVehicle | 1 | 58.2 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_t_p2_60e_ppvehicle.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml) | -|PP-YOLOE+_t-P2(416)| PPVehicle | 1 | 60.5 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_t_p2_60e_ppvehicle.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml) | +|PP-YOLOE+_t-P2-aux(320)| PPVehicle | 1 | 58.2 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/ppvehicle/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.zip) | [配置文件](./ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.yml) | +|PP-YOLOE+_t-aux(320)| PPVehicle | 1 | 53.5 | [下载链接](https://bj.bcebos.com/v1/paddledet/models/pipeline/ppvehicle/ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.zip) | [配置文件](./ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.yml) | **注意:** diff --git a/configs/ppvehicle/ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml b/configs/ppvehicle/ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.yml similarity index 85% rename from configs/ppvehicle/ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml rename to configs/ppvehicle/ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.yml index 815935f92..7ed888d7a 100644 --- a/configs/ppvehicle/ppyoloe_plus_crn_t_p2_60e_ppvehicle.yml +++ b/configs/ppvehicle/ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle.yml @@ -3,14 +3,14 @@ _BASE_: [ '../runtime.yml', '../ppyoloe/_base_/optimizer_300e.yml', '../ppyoloe/_base_/ppyoloe_plus_crn_tiny_auxhead.yml', - '../ppyoloe/_base_/ppyoloe_plus_reader_tiny.yml', + '../ppyoloe/_base_/ppyoloe_plus_reader_320.yml', ] log_iter: 100 snapshot_epoch: 4 -weights: output/ppyoloe_plus_crn_tiny_60e_ppvehicle/model_final +weights: output/ppyoloe_plus_crn_t_auxhead_320_60e_ppvehicle/model_final -pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_tiny_auxhead_300e_coco.pdparams +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams # 640*640 COCO mAP 39.7 depth_mult: 0.33 width_mult: 0.375 diff --git a/configs/ppvehicle/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.yml b/configs/ppvehicle/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.yml new file mode 100644 index 000000000..7fbf9bcdd --- /dev/null +++ b/configs/ppvehicle/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle.yml @@ -0,0 +1,79 @@ +_BASE_: [ + '../datasets/coco_detection.yml', + '../runtime.yml', + '../ppyoloe/_base_/optimizer_300e.yml', + '../ppyoloe/_base_/ppyoloe_plus_crn_tiny_auxhead.yml', + '../ppyoloe/_base_/ppyoloe_plus_reader_320.yml', +] + +log_iter: 100 +snapshot_epoch: 4 +weights: output/ppyoloe_plus_crn_t_p2_auxhead_320_60e_ppvehicle/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.pdparams # 320*320 COCO mAP 36.3 +depth_mult: 0.33 +width_mult: 0.375 + + +num_classes: 1 +TrainDataset: + !COCODataSet + image_dir: "" + anno_path: annotations/train_all.json + dataset_dir: dataset/ppvehicle + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + allow_empty: true + +EvalDataset: + !COCODataSet + image_dir: "" + anno_path: annotations/val_all.json + dataset_dir: dataset/ppvehicle + +TestDataset: + !ImageFolder + anno_path: annotations/val_all.json + dataset_dir: dataset/ppvehicle + + +TrainReader: + batch_size: 8 + + +epoch: 60 +LearningRate: + base_lr: 0.001 + schedulers: + - !CosineDecay + max_epochs: 72 + - !LinearWarmup + start_factor: 0. + epochs: 1 + + +architecture: PPYOLOEWithAuxHead +PPYOLOEWithAuxHead: + backbone: CSPResNet + neck: CustomCSPPAN + yolo_head: PPYOLOEHead + aux_head: SimpleConvHead + post_process: ~ + +CSPResNet: + return_idx: [0, 1, 2, 3] # index 0 stands for P2 + +CustomCSPPAN: + out_channels: [384, 384, 384, 384] + +SimpleConvHead: + fpn_strides: [32, 16, 8, 4] + +PPYOLOEHead: + fpn_strides: [32, 16, 8, 4] + static_assigner_epoch: -1 + nms: + name: MultiClassNMS + nms_top_k: 1000 + keep_top_k: 300 + score_threshold: 0.01 + nms_threshold: 0.7 diff --git a/configs/ppyoloe/README.md b/configs/ppyoloe/README.md index 258ea4c0a..f7d876f67 100644 --- a/configs/ppyoloe/README.md +++ b/configs/ppyoloe/README.md @@ -48,9 +48,9 @@ PP-YOLOE is composed of following methods: | Model | Epoch | GPU number | images/GPU | backbone | input shape | Box APval
0.5:0.95 | Box APtest
0.5:0.95 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | download | config | |:--------------:|:-----:|:-------:|:----------:|:----------:| :-------:|:--------------------------:|:---------------------------:|:---------:|:--------:|:---------------:| :---------------------: |:------------------------------------------------------------------------------------:|:-------------------------------------------:| -| PP-YOLOE+_t(aux)| 300 | 8 | 8 | cspresnet-t | 640 | 39.5 | 51.7 | 4.85 | 19.15 | - | 344.8 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_auxhead_300e_coco.yml) | -| PP-YOLOE-t-P2 | 300 | 8 | 8 | cspresnet-t | 320 | 34.7 | 50.0 | 6.82 | 4.78 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_t_p2_300e_coco.pdparams) | [config](./ppyoloe_crn_t_p2_300e_coco.yml) | -| PP-YOLOE+_t-P2(aux) | 300 | 8 | 8 | cspresnet-t | 320 | 36.3 | 51.7 | 6.00 | 15.46 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml) | +| PP-YOLOE+_t-aux(640) | 300 | 8 | 8 | cspresnet-t | 640 | 39.7 | 56.4 | 4.85 | 19.15 | - | 344.8 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_auxhead_300e_coco.yml) | +| PP-YOLOE-t-P2(320) | 300 | 8 | 8 | cspresnet-t | 320 | 34.7 | 50.0 | 6.82 | 4.78 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_t_p2_320_300e_coco.pdparams) | [config](./ppyoloe_crn_t_p2_320_300e_coco.yml) | +| PP-YOLOE+_t-P2-aux(320) | 300 | 8 | 8 | cspresnet-t | 320 | 36.3 | 51.7 | 6.00 | 15.46 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml) | ### Comprehensive Metrics diff --git a/configs/ppyoloe/README_cn.md b/configs/ppyoloe/README_cn.md index a599a8e58..43abf3851 100644 --- a/configs/ppyoloe/README_cn.md +++ b/configs/ppyoloe/README_cn.md @@ -47,9 +47,9 @@ PP-YOLOE由以下方法组成 | 模型 | Epoch | GPU个数 | 每GPU图片个数 | 骨干网络 | 输入尺寸 | Box APval
0.5:0.95 | Box APtest
0.5:0.95 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | 模型下载 | 配置文件 | |:---------------:|:-----:|:---------:|:--------:|:----------:|:----------:|:--------------------------:|:---------------------------:|:---------:|:--------:|:---------------:| :---------------------: |:------------------------------------------------------------------------------------:|:-------------------------------------------:| -| PP-YOLOE+_t(aux)| 300 | 8 | 8 | cspresnet-t | 640 | 39.7 | 56.4 | 4.85 | 19.15 | - | 344.8 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_auxhead_300e_coco.yml) | -| PP-YOLOE-t-P2 | 300 | 8 | 8 | cspresnet-t | 320 | 34.7 | 50.0 | 6.82 | 4.78 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_t_p2_300e_coco.pdparams) | [config](./ppyoloe_crn_t_p2_300e_coco.yml) | -| PP-YOLOE+_t-P2(aux) | 300 | 8 | 8 | cspresnet-t | 320 | 36.3 | 51.7 | 6.00 | 15.46 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml) | +| PP-YOLOE+_t-aux(640) | 300 | 8 | 8 | cspresnet-t | 640 | 39.7 | 56.4 | 4.85 | 19.15 | - | 344.8 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_auxhead_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_auxhead_300e_coco.yml) | +| PP-YOLOE-t-P2(320) | 300 | 8 | 8 | cspresnet-t | 320 | 34.7 | 50.0 | 6.82 | 4.78 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_t_p2_320_300e_coco.pdparams) | [config](./ppyoloe_crn_t_p2_320_300e_coco.yml) | +| PP-YOLOE+_t-P2-aux(320) | 300 | 8 | 8 | cspresnet-t | 320 | 36.3 | 51.7 | 6.00 | 15.46 | - | - | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.pdparams) | [config](./ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml) | ### 综合指标 diff --git a/configs/ppyoloe/_base_/ppyoloe_plus_tiny_reader.yml b/configs/ppyoloe/_base_/ppyoloe_plus_reader_320.yml similarity index 100% rename from configs/ppyoloe/_base_/ppyoloe_plus_tiny_reader.yml rename to configs/ppyoloe/_base_/ppyoloe_plus_reader_320.yml diff --git a/configs/ppyoloe/distill/README.md b/configs/ppyoloe/distill/README.md index 85b55ff5c..9f8761d83 100644 --- a/configs/ppyoloe/distill/README.md +++ b/configs/ppyoloe/distill/README.md @@ -8,11 +8,10 @@ PaddleDetection提供了对PPYOLOE+ 进行模型蒸馏的方案,结合了logit | ----------------- | ----------- | ------ | :----: | :-----------: | :--------------: | :------------: | | PP-YOLOE+_x | teacher | 640 | 80e | 54.7 | [config](../ppyoloe_plus_crn_x_80e_coco.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_x_80e_coco.pdparams) | | PP-YOLOE+_l | student | 640 | 80e | 52.9 | [config](../ppyoloe_plus_crn_l_80e_coco.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_l_80e_coco.pdparams) | -| PP-YOLOE+_l | distill | 640 | 80e | 54.0(+1.1) | [config](./ppyoloe_plus_crn_l_80e_coco_distill.yml),[slim_config](../../slim/distill/ppyoloe_plus_distill_x_distill_l.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_l_80e_coco_distill.pdparams) | +| PP-YOLOE+_l | distill | 640 | 80e | **54.0(+1.1)** | [config](./ppyoloe_plus_crn_l_80e_coco_distill.yml),[slim_config](../../slim/distill/ppyoloe_plus_distill_x_distill_l.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_l_80e_coco_distill.pdparams) | | PP-YOLOE+_l | teacher | 640 | 80e | 52.9 | [config](../ppyoloe_plus_crn_l_80e_coco.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_l_80e_coco.pdparams) | | PP-YOLOE+_m | student | 640 | 80e | 49.8 | [config](../ppyoloe_plus_crn_m_80e_coco.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco.pdparams) | -| PP-YOLOE+_m | distill | 640 | 80e | 50.7(+0.9) | [config](./ppyoloe_plus_crn_m_80e_coco_distill.yml),[slim_config](../../slim/distill/ppyoloe_plus_distill_l_distill_m.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco_distill.pdparams) | - +| PP-YOLOE+_m | distill | 640 | 80e | **51.0(+1.2)** | [config](./ppyoloe_plus_crn_m_80e_coco_distill.yml),[slim_config](../../slim/distill/ppyoloe_plus_distill_l_distill_m.yml) | [model](https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco_distill.pdparams) | ## 快速开始 diff --git a/configs/ppyoloe/ppyoloe_crn_t_p2_300e_coco.yml b/configs/ppyoloe/ppyoloe_crn_t_p2_320_300e_coco.yml similarity index 94% rename from configs/ppyoloe/ppyoloe_crn_t_p2_300e_coco.yml rename to configs/ppyoloe/ppyoloe_crn_t_p2_320_300e_coco.yml index b056ea7b9..37db828e0 100644 --- a/configs/ppyoloe/ppyoloe_crn_t_p2_300e_coco.yml +++ b/configs/ppyoloe/ppyoloe_crn_t_p2_320_300e_coco.yml @@ -3,12 +3,12 @@ _BASE_: [ '../runtime.yml', './_base_/optimizer_300e.yml', './_base_/ppyoloe_crn.yml', - './_base_/ppyoloe_plus_tiny_reader.yml', # 320*320 + './_base_/ppyoloe_plus_reader_320.yml', ] log_iter: 100 snapshot_epoch: 10 -weights: output/ppyoloe_crn_t_p2_300e_coco/model_final +weights: output/ppyoloe_crn_t_p2_320_300e_coco/model_final pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_t_pretrained.pdparams depth_mult: 0.33 diff --git a/configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml b/configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml similarity index 91% rename from configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml rename to configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml index 434b6f424..0aef4bcfe 100644 --- a/configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_300e_coco.yml +++ b/configs/ppyoloe/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco.yml @@ -3,12 +3,12 @@ _BASE_: [ '../runtime.yml', './_base_/optimizer_300e.yml', './_base_/ppyoloe_plus_crn_tiny_auxhead.yml', - './_base_/ppyoloe_plus_tiny_reader.yml', # 320*320 + './_base_/ppyoloe_plus_reader_320.yml', ] log_iter: 100 snapshot_epoch: 10 -weights: output/ppyoloe_plus_crn_t_p2_auxhead_300e_coco/model_final +weights: output/ppyoloe_plus_crn_t_p2_auxhead_320_300e_coco/model_final pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_t_pretrained.pdparams depth_mult: 0.33 diff --git a/ppdet/modeling/heads/ppyoloe_head.py b/ppdet/modeling/heads/ppyoloe_head.py index 60d7bbc2f..261c0c493 100644 --- a/ppdet/modeling/heads/ppyoloe_head.py +++ b/ppdet/modeling/heads/ppyoloe_head.py @@ -37,8 +37,10 @@ class ESEAttn(nn.Layer): self.fc = nn.Conv2D(feat_channels, feat_channels, 1) if attn_conv == 'convbn': self.conv = ConvBNLayer(feat_channels, feat_channels, 1, act=act) - else: + elif attn_conv == 'repvgg': self.conv = RepVggBlock(feat_channels, feat_channels, act=act) + else: + self.conv = None self._init_weights() def _init_weights(self): @@ -46,7 +48,10 @@ class ESEAttn(nn.Layer): def forward(self, feat, avg_feat): weight = F.sigmoid(self.fc(avg_feat)) - return self.conv(feat * weight) + if self.conv: + return self.conv(feat * weight) + else: + return feat * weight @register @@ -526,7 +531,7 @@ class PPYOLOEHead(nn.Layer): return pred_bboxes, pred_scores, None else: bbox_pred, bbox_num, nms_keep_idx = self.nms(pred_bboxes, - pred_scores) + pred_scores) return bbox_pred, bbox_num, nms_keep_idx -- GitLab