From 212fc079bd6083a4584f424ac129c818fe0bb8cf Mon Sep 17 00:00:00 2001 From: pk_hk <82303451+pkhk-1@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:50:51 +0800 Subject: [PATCH] [ppyoloe-plus] add task reademe and base config, test=document_fix (#6722) * [ppyoloe-plus] add downstream tasks * [ppyoloe-plus] add task reademe and base config, test=document_fix * [ppyoloe-plus] fix config * Update README.md * [ppyoloe+] fix readne and name, test=document_fix * [ppyoloe+] fix base cofig --- configs/ppyoloe/application/README.md | 48 +++++++++++++++++++ .../application/_base_/exdark_detection.yml | 20 ++++++++ .../application/_base_/pcb_detection.yml | 20 ++++++++ .../application/_base_/wgisd_detection.yml | 20 ++++++++ .../application/ppyoloe_crn_m_80e_exdark.yml | 15 ++++++ .../application/ppyoloe_crn_m_80e_pcb.yml | 15 ++++++ .../application/ppyoloe_crn_m_80e_wgisd.yml | 15 ++++++ ..._plus_crn_m_80e_coco_pretrained_exdark.yml | 15 ++++++ ...loe_plus_crn_m_80e_coco_pretrained_pcb.yml | 15 ++++++ ...e_plus_crn_m_80e_coco_pretrained_wgisd.yml | 15 ++++++ ...lus_crn_m_80e_obj365_pretrained_exdark.yml | 15 ++++++ ...e_plus_crn_m_80e_obj365_pretrained_pcb.yml | 15 ++++++ ...plus_crn_m_80e_obj365_pretrained_wgisd.yml | 15 ++++++ 13 files changed, 243 insertions(+) create mode 100644 configs/ppyoloe/application/README.md create mode 100644 configs/ppyoloe/application/_base_/exdark_detection.yml create mode 100644 configs/ppyoloe/application/_base_/pcb_detection.yml create mode 100644 configs/ppyoloe/application/_base_/wgisd_detection.yml create mode 100644 configs/ppyoloe/application/ppyoloe_crn_m_80e_exdark.yml create mode 100644 configs/ppyoloe/application/ppyoloe_crn_m_80e_pcb.yml create mode 100644 configs/ppyoloe/application/ppyoloe_crn_m_80e_wgisd.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.yml create mode 100644 configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.yml diff --git a/configs/ppyoloe/application/README.md b/configs/ppyoloe/application/README.md new file mode 100644 index 000000000..5dd8283fa --- /dev/null +++ b/configs/ppyoloe/application/README.md @@ -0,0 +1,48 @@ +# PP-YOLOE+ 下游任务 + +我们验证了PP-YOLOE+模型强大的泛化能力,在农业、低光、工业等不同场景下游任务检测效果稳定提升! + +农业数据集采用[Embrapa WGISD](https://github.com/thsant/wgisd),该数据集用于葡萄栽培中基于图像的监测和现场机器人技术,提供了来自5种不同葡萄品种的实地实例, +处理后的COCO格式,包含图片训练集242张,测试集58张,5个类别,[Embrapa WGISD COCO格式下载](https://bj.bcebos.com/v1/paddledet/data/wgisd.zip); + +低光数据集使用[ExDark](https://github.com/cs-chan/Exclusively-Dark-Image-Dataset/tree/master/Dataset),该数据集是一个专门在低光照环境下拍摄出针对低光目标检测的数据集,包括从极低光环境到暮光环境等10种不同光照条件下的图片, +处理后的COCO格式,包含图片训练集5891张,测试集1472张,12个类别,[ExDark COCO格式下载](https://bj.bcebos.com/v1/paddledet/data/Exdark.zip); + +工业数据集使用[PKU-Market-PCB](https://robotics.pkusz.edu.cn/resources/dataset/),该数据集用于印刷电路板(PCB)的瑕疵检测,提供了6种常见的PCB缺陷, +处理后的COCO格式,包含图片训练集555张,测试集138张,6个类别,[PKU-Market-PCB COCO格式下载](https://bj.bcebos.com/v1/paddledet/data/PCB_coco.zip)。 + + +## 实验结果: + +| 模型 | 数据集 | mAPval
0.5:0.95 | 下载链接 | 配置文件 | +|:---------|:---------------:|:-----------------------:|:---------:| :-----: | +|PP-YOLOE_m| Embrapa WGISD | 52.7 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_80e_wgisd.pdparams) | [配置文件](./ppyoloe_crn_m_80e_wgisd.yml) | +|PP-YOLOE+_m
(obj365_pretrained)| Embrapa WGISD | 60.8(+8.1) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.yml) | +|PP-YOLOE+_m
(coco_pretrained)| Embrapa WGISD | 59.7(+7.0) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.yml) | +|PP-YOLOE_m| ExDark | 56.4 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_80e_exdark.pdparams) | [配置文件](./ppyoloe_crn_m_80e_exdark.yml) | +|PP-YOLOE+_m
(obj365_pretrained)| ExDark | 57.7(+1.3) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.yml) | +|PP-YOLOE+_m
(coco_pretrained)| ExDark | 58.1(+1.7) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.yml) | +|PP-YOLOE_m| PKU-Market-PCB | 50.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_80e_pcb.pdparams) | [配置文件](./ppyoloe_crn_m_80e_pcb.yml) | +|PP-YOLOE+_m
(obj365_pretrained)| PKU-Market-PCB | 52.7(+1.9) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.yml) | +|PP-YOLOE+_m
(coco_pretrained)| PKU-Market-PCB | 52.4(+1.6) | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.pdparams) | [配置文件](./ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.yml) | + +**注意:** +- PP-YOLOE模型训练过程中使用8 GPUs进行训练,如果**GPU卡数**或者**batch size**发生了改变,你需要按照公式 **lrnew = lrdefault * (batch_sizenew * GPU_numbernew) / (batch_sizedefault * GPU_numberdefault)** 调整学习率。 +- 具体使用教程请参考[ppyoloe](../ppyoloe#getting-start)。 + + + + + +## 引用 +``` +@article{Exdark, +title={Getting to Know Low-light Images with The Exclusively Dark Dataset}, +author={Loh, Yuen Peng and Chan, Chee Seng}, +journal={Computer Vision and Image Understanding}, +volume={178}, +pages={30-42}, +year={2019}, +doi={https://doi.org/10.1016/j.cviu.2018.10.010} +} +``` diff --git a/configs/ppyoloe/application/_base_/exdark_detection.yml b/configs/ppyoloe/application/_base_/exdark_detection.yml new file mode 100644 index 000000000..07585bc5d --- /dev/null +++ b/configs/ppyoloe/application/_base_/exdark_detection.yml @@ -0,0 +1,20 @@ +metric: COCO +num_classes: 12 + +TrainDataset: + !COCODataSet + image_dir: images + anno_path: coco_annotations/train.json + dataset_dir: dataset/Exdark/ + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + +EvalDataset: + !COCODataSet + image_dir: images + anno_path: coco_annotations/val.json + dataset_dir: dataset/Exdark/ + +TestDataset: + !ImageFolder + anno_path: coco_annotations/val.json # also support txt (like VOC's label_list.txt) + dataset_dir: dataset/Exdark/ # if set, anno_path will be 'dataset_dir/anno_path' diff --git a/configs/ppyoloe/application/_base_/pcb_detection.yml b/configs/ppyoloe/application/_base_/pcb_detection.yml new file mode 100644 index 000000000..53f5f3744 --- /dev/null +++ b/configs/ppyoloe/application/_base_/pcb_detection.yml @@ -0,0 +1,20 @@ +metric: COCO +num_classes: 6 + +TrainDataset: + !COCODataSet + image_dir: images + anno_path: pcb_cocoanno/train.json + dataset_dir: dataset/PCB_coco/ + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + +EvalDataset: + !COCODataSet + image_dir: images + anno_path: pcb_cocoanno/val.json + dataset_dir: dataset/PCB_coco/ + +TestDataset: + !ImageFolder + anno_path: pcb_cocoanno/val.json # also support txt (like VOC's label_list.txt) + dataset_dir: dataset/PCB_coco/ # if set, anno_path will be 'dataset_dir/anno_path' diff --git a/configs/ppyoloe/application/_base_/wgisd_detection.yml b/configs/ppyoloe/application/_base_/wgisd_detection.yml new file mode 100644 index 000000000..a2721bbd1 --- /dev/null +++ b/configs/ppyoloe/application/_base_/wgisd_detection.yml @@ -0,0 +1,20 @@ +metric: COCO +num_classes: 5 + +TrainDataset: + !COCODataSet + image_dir: data + anno_path: coco_annotations/new_train_bbox_instances.json + dataset_dir: dataset/wgisd/ + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + +EvalDataset: + !COCODataSet + image_dir: data + anno_path: coco_annotations/new_test_bbox_instances.json + dataset_dir: dataset/wgisd/ + +TestDataset: + !ImageFolder + anno_path: coco_annotations/new_test_bbox_instances.json # also support txt (like VOC's label_list.txt) + dataset_dir: dataset/wgisd/ # if set, anno_path will be 'dataset_dir/anno_path' diff --git a/configs/ppyoloe/application/ppyoloe_crn_m_80e_exdark.yml b/configs/ppyoloe/application/ppyoloe_crn_m_80e_exdark.yml new file mode 100644 index 000000000..4de0d95cc --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_crn_m_80e_exdark.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/exdark_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../legacy_model/_base_/ppyoloe_crn.yml', + '../legacy_model/_base_/ppyoloe_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_crn_m_80e_exdark/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_300e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_crn_m_80e_pcb.yml b/configs/ppyoloe/application/ppyoloe_crn_m_80e_pcb.yml new file mode 100644 index 000000000..a03bd1c16 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_crn_m_80e_pcb.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/pcb_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../legacy_model/_base_/ppyoloe_crn.yml', + '../legacy_model/_base_/ppyoloe_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_crn_m_80e_pcb/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_300e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_crn_m_80e_wgisd.yml b/configs/ppyoloe/application/ppyoloe_crn_m_80e_wgisd.yml new file mode 100644 index 000000000..458e77cee --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_crn_m_80e_wgisd.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/wgisd_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../legacy_model/_base_/ppyoloe_crn.yml', + '../legacy_model/_base_/ppyoloe_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_crn_m_80e_wgisd/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_crn_m_300e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.yml new file mode 100644 index 000000000..66fc8b52d --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/exdark_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_coco_pretrained_exdark/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.yml new file mode 100644 index 000000000..7b0e3abd8 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/pcb_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_coco_pretrained_pcb/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.yml new file mode 100644 index 000000000..3e813cb09 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/wgisd_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_coco_pretrained_wgisd/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_m_80e_coco.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.yml new file mode 100644 index 000000000..d97f2a115 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/exdark_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_obj365_pretrained_exdark/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_m_obj365_pretrained.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.yml new file mode 100644 index 000000000..72d5620c2 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/pcb_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_obj365_pretrained_pcb/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_m_obj365_pretrained.pdparams +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.yml b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.yml new file mode 100644 index 000000000..6cebc6d47 --- /dev/null +++ b/configs/ppyoloe/application/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd.yml @@ -0,0 +1,15 @@ +_BASE_: [ + './_base_/wgisd_detection.yml', + '../../runtime.yml', + '../_base_/optimizer_80e.yml', + '../_base_/ppyoloe_plus_crn.yml', + '../_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_80e_obj365_pretrained_wgisd/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_m_obj365_pretrained.pdparams +depth_mult: 0.67 +width_mult: 0.75 -- GitLab