From 101c87600ad06b1678408128b8ba285109282810 Mon Sep 17 00:00:00 2001 From: Wenyu Date: Wed, 4 Jan 2023 14:22:32 +0800 Subject: [PATCH] add ppyoloe plus obj365 (#7564) --- configs/datasets/objects365_detection.yml | 21 +++++++++++++++++++ configs/ppyoloe/README.md | 12 +++++++++++ configs/ppyoloe/README_cn.md | 12 +++++++++++ configs/ppyoloe/_base_/optimizer_60e.yml | 18 ++++++++++++++++ .../ppyoloe_plus_crn_l_60e_objects365.yml | 21 +++++++++++++++++++ .../ppyoloe_plus_crn_m_60e_objects365.yml | 21 +++++++++++++++++++ .../ppyoloe_plus_crn_s_60e_objects365.yml | 21 +++++++++++++++++++ .../ppyoloe_plus_crn_x_60e_objects365.yml | 21 +++++++++++++++++++ 8 files changed, 147 insertions(+) create mode 100644 configs/datasets/objects365_detection.yml create mode 100644 configs/ppyoloe/_base_/optimizer_60e.yml create mode 100644 configs/ppyoloe/ppyoloe_plus_crn_l_60e_objects365.yml create mode 100644 configs/ppyoloe/ppyoloe_plus_crn_m_60e_objects365.yml create mode 100644 configs/ppyoloe/ppyoloe_plus_crn_s_60e_objects365.yml create mode 100644 configs/ppyoloe/ppyoloe_plus_crn_x_60e_objects365.yml diff --git a/configs/datasets/objects365_detection.yml b/configs/datasets/objects365_detection.yml new file mode 100644 index 000000000..735ebf96d --- /dev/null +++ b/configs/datasets/objects365_detection.yml @@ -0,0 +1,21 @@ +metric: COCO +num_classes: 365 + +TrainDataset: + !COCODataSet + image_dir: train + anno_path: annotations/zhiyuan_objv2_train.json + dataset_dir: dataset/objects365 + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + +EvalDataset: + !COCODataSet + image_dir: val + anno_path: annotations/zhiyuan_objv2_val.json + dataset_dir: dataset/objects365 + allow_empty: true + +TestDataset: + !ImageFolder + anno_path: annotations/zhiyuan_objv2_val.json + dataset_dir: dataset/objects365/ diff --git a/configs/ppyoloe/README.md b/configs/ppyoloe/README.md index 6f1c7f976..ba5e9c0fc 100644 --- a/configs/ppyoloe/README.md +++ b/configs/ppyoloe/README.md @@ -71,6 +71,18 @@ PP-YOLOE is composed of following methods: - If you set `--run_benchmark=True`,you should install these dependencies at first, `pip install pynvml psutil GPUtil`. - End-to-end speed test includes pre-processing + inference + post-processing and NMS time, using **Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz**, **single Tesla V100**, **CUDA 11.2**, **CUDNN 8.2.0**, **TensorRT 8.0.1.6**. +### Model Zoo on Objects365 +| Model | Epoch | Machine number | GPU number | images/GPU | backbone | input shape | Box AP0.5 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | download | config | +|:---------------:|:-----:|:-----------:|:-----------:|:-----------:|:---------:|:----------:|:--------------:|:---------:|:---------:|:-------------:|:-----------------------:| :--------:|:--------:| +| PP-YOLOE+_s | 60 | 3 | 8 | 8 | cspresnet-s | 640 | 18.1 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_s_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_s_60e_objects365.yml) | +| PP-YOLOE+_m | 60 | 4 | 8 | 8 | cspresnet-m | 640 | 25.0 | 23.43 | 49.91 | 123.4 | 208.3 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_m_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_m_60e_objects365.yml) | +| PP-YOLOE+_l | 60 | 3 | 8 | 8 | cspresnet-l | 640 | 30.8 | 52.20 | 110.07 | 78.1 | 149.2 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_l_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_l_60e_objects365.yml) | +| PP-YOLOE+_x | 60 | 4 | 8 | 8 | cspresnet-x | 640 | 32.7 | 98.42 | 206.59 | 45.0 | 95.2 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_x_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_x_60e_objects365.yml) | + + +**Notes:** +- The Details for multiple machine and multi-gpu training, see [DistributedTraining](../../docs/tutorials/DistributedTraining_en.md) + ### Model Zoo on VOC diff --git a/configs/ppyoloe/README_cn.md b/configs/ppyoloe/README_cn.md index a90b6b0bf..d73bc8415 100644 --- a/configs/ppyoloe/README_cn.md +++ b/configs/ppyoloe/README_cn.md @@ -71,6 +71,18 @@ PP-YOLOE由以下方法组成 - 如果你设置了`--run_benchmark=True`, 你首先需要安装以下依赖`pip install pynvml psutil GPUtil`。 - 端到端速度测试包含模型前处理 + 模型推理 + 模型后处理及NMS的时间,测试使用**Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz**, **单卡V100**, **CUDA 11.2**, **CUDNN 8.2.0**, **TensorRT 8.0.1.6**。 +### Objects365数据集模型库 +| 模型 | Epoch | 机器个数 | GPU个数 | 每GPU图片个数 | 骨干网络 | 输入尺寸 | Box AP0.5 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | 模型下载 | 配置文件 | +|:---------------:|:-----:|:-----------:|:-----------:|:-----------:|:---------:|:----------:|:--------------:|:---------:|:---------:|:-------------:|:-----------------------:| :--------:|:--------:| +| PP-YOLOE+_s | 60 | 3 | 8 | 8 | cspresnet-s | 640 | 18.1 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_s_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_s_60e_objects365.yml) | +| PP-YOLOE+_m | 60 | 4 | 8 | 8 | cspresnet-m | 640 | 25.0 | 23.43 | 49.91 | 123.4 | 208.3 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_m_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_m_60e_objects365.yml) | +| PP-YOLOE+_l | 60 | 3 | 8 | 8 | cspresnet-l | 640 | 30.8 | 52.20 | 110.07 | 78.1 | 149.2 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_l_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_l_60e_objects365.yml) | +| PP-YOLOE+_x | 60 | 4 | 8 | 8 | cspresnet-x | 640 | 32.7 | 98.42 | 206.59 | 45.0 | 95.2 | [model](https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_x_obj365_pretrained.pdparams) | [config](./ppyoloe_plus_crn_x_60e_objects365.yml) | + + +**注意:** +- 多机训练细节见[文档](../../docs/tutorials/DistributedTraining_cn.md) + ### VOC数据集模型库 | 模型 | Epoch | GPU个数 | 每GPU图片个数 | 骨干网络 | 输入尺寸 | Box AP0.5 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | 模型下载 | 配置文件 | diff --git a/configs/ppyoloe/_base_/optimizer_60e.yml b/configs/ppyoloe/_base_/optimizer_60e.yml new file mode 100644 index 000000000..6df9a5659 --- /dev/null +++ b/configs/ppyoloe/_base_/optimizer_60e.yml @@ -0,0 +1,18 @@ +epoch: 60 + +LearningRate: + base_lr: 0.001 + schedulers: + - !CosineDecay + max_epochs: 72 + - !LinearWarmup + start_factor: 0. + epochs: 1 + +OptimizerBuilder: + optimizer: + momentum: 0.9 + type: Momentum + regularizer: + factor: 0.0005 + type: L2 diff --git a/configs/ppyoloe/ppyoloe_plus_crn_l_60e_objects365.yml b/configs/ppyoloe/ppyoloe_plus_crn_l_60e_objects365.yml new file mode 100644 index 000000000..599df0d39 --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_l_60e_objects365.yml @@ -0,0 +1,21 @@ +_BASE_: [ + '../datasets/objects365_detection.yml', + '../runtime.yml', + './_base_/optimizer_60e.yml', + './_base_/ppyoloe_plus_crn.yml', + './_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_l_60e_objects365/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_l_pretrained.pdparams + +CSPResNet: + use_alpha: False + +PPYOLOEHead: + static_assigner_epoch: 20 + +depth_mult: 1.0 +width_mult: 1.0 diff --git a/configs/ppyoloe/ppyoloe_plus_crn_m_60e_objects365.yml b/configs/ppyoloe/ppyoloe_plus_crn_m_60e_objects365.yml new file mode 100644 index 000000000..29093ab65 --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_m_60e_objects365.yml @@ -0,0 +1,21 @@ +_BASE_: [ + '../datasets/objects365_detection.yml', + '../runtime.yml', + './_base_/optimizer_60e.yml', + './_base_/ppyoloe_plus_crn.yml', + './_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_m_60e_objects365/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_m_pretrained.pdparams + +CSPResNet: + use_alpha: False + +PPYOLOEHead: + static_assigner_epoch: 20 + +depth_mult: 0.67 +width_mult: 0.75 diff --git a/configs/ppyoloe/ppyoloe_plus_crn_s_60e_objects365.yml b/configs/ppyoloe/ppyoloe_plus_crn_s_60e_objects365.yml new file mode 100644 index 000000000..50f120a29 --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_s_60e_objects365.yml @@ -0,0 +1,21 @@ +_BASE_: [ + '../datasets/objects365_detection.yml', + '../runtime.yml', + './_base_/optimizer_60e.yml', + './_base_/ppyoloe_plus_crn.yml', + './_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_s_60e_objects365/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_s_pretrained.pdparams + +CSPResNet: + use_alpha: False + +PPYOLOEHead: + static_assigner_epoch: 20 + +depth_mult: 0.33 +width_mult: 0.50 diff --git a/configs/ppyoloe/ppyoloe_plus_crn_x_60e_objects365.yml b/configs/ppyoloe/ppyoloe_plus_crn_x_60e_objects365.yml new file mode 100644 index 000000000..372209436 --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_x_60e_objects365.yml @@ -0,0 +1,21 @@ +_BASE_: [ + '../datasets/objects365_detection.yml', + '../runtime.yml', + './_base_/optimizer_60e.yml', + './_base_/ppyoloe_plus_crn.yml', + './_base_/ppyoloe_plus_reader.yml', +] + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_plus_crn_x_60e_objects365/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_x_pretrained.pdparams + +CSPResNet: + use_alpha: False + +PPYOLOEHead: + static_assigner_epoch: 20 + +depth_mult: 1.33 +width_mult: 1.25 -- GitLab