diff --git a/configs/pphuman/README.md b/configs/pphuman/README.md index 6a713b6ce390856805ff093f9b85e6b5a000218d..e267bbd73e07732c6c8ae3cbe6bf96e45224996a 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 b13f19c55645b7cb6423ad0a1e84508a3acb67c4..9d542fe6b4f20d6950edcc3a775839028ef702fb 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 0000000000000000000000000000000000000000..fd0605cfe9ec317262752766d903845e5e0555e6 --- /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 9181162900048d6c7ffd82a2ee976996be046fc8..0c09ce7bbbe022594e0c06a7515afa6cf3fa8b3a 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 815935f92f825c359d79b250e44c89ea644abda5..7ed888d7a4e0fe04fe1c68f5e8282457506597bc 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 0000000000000000000000000000000000000000..7fbf9bcdd0a199574d1592dfbc022a3c672cc734 --- /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 258ea4c0a8ee5b28ca73b4d903e9e3e4616714ca..f7d876f67667bad887acc357c7b16099510b5fae 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 a599a8e582af7d419a4122bc18d549f69431c657..43abf3851826ee6e8734b875869d2ed9cb4a525f 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 85b55ff5c7e16e5904e3f34ea7f3be45595f7439..9f8761d83bddaeb519ca392b59e20ba48aa8b703 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 b056ea7b96237c5ac838addc86e8c1aec695f213..37db828e07fd3c21fb4175b1b3f2bae19cb4ae1b 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 434b6f4249f687955d88b71fcae97dfe7af0e20e..0aef4bcfebf3772f675bcd9a87274fcde437c542 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 60d7bbc2f83fb95dbb7a1afe7be891df98ce5e76..261c0c4933b7288cbaa19750f430dc617cef2111 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