diff --git a/configs/ppyoloe/README.md b/configs/ppyoloe/README.md index b53a43639f034df7102ff3abbb6d0ada5f43d582..72bcc985355866c5ffc8468bc55d03141292ba58 100644 --- a/configs/ppyoloe/README.md +++ b/configs/ppyoloe/README.md @@ -33,6 +33,9 @@ PP-YOLOE is composed of following methods: - [SiLU(Swish) activation function](https://arxiv.org/abs/1710.05941) ## Model Zoo + +### Model Zoo on COCO + | 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+_s | 80 | 8 | 8 | cspresnet-s | 640 | 43.7 | 43.9 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_80e_coco.pdparams) | [config](./ppyoloe_plus_crn_s_80e_coco.yml) | @@ -68,6 +71,15 @@ 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 VOC + +| Model | Epoch | 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 | 30 | 8 | 8 | cspresnet-s | 640 | 86.7 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_30e_voc.pdparams) | [config](./ppyoloe_plus_crn_s_30e_voc.yml) | +| PP-YOLOE+_l | 30 | 8 | 8 | cspresnet-l | 640 | 89.0 | 52.20 | 110.07 | 78.1 | 149.2 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_l_30e_voc.pdparams) | [config](./ppyoloe_plus_crn_l_30e_voc.yml) | + + ### Feature Models The PaddleDetection team provides configs and weights of various feature detection models based on PP-YOLOE, which users can download for use: @@ -76,11 +88,35 @@ The PaddleDetection team provides configs and weights of various feature detecti | :--------: | :---------: | :------: | |Pedestrian Detection | CrowdHuman | [pphuman](../pphuman) | |Vehicle Detection | BDD100K, UA-DETRAC | [ppvehicle](../ppvehicle) | -|Small Object Detection | VisDrone | [visdrone](../visdrone) | +|Small Object Detection | VisDrone、DOTA、xView | [smalldet](../smalldet) | ## Getting Start +### Datasets and Metrics + +PaddleDetection team provides **COCO and VOC dataset** , decompress and place it under `PaddleDetection/dataset/`: + +``` +wget https://bj.bcebos.com/v1/paddledet/data/coco.tar +# tar -xvf coco.tar + +wget https://bj.bcebos.com/v1/paddledet/data/voc.zip +# unzip voc.zip +``` + +**Note:** + - For the format of COCO style dataset, please refer to [format-data](https://cocodataset.org/#format-data) and [format-results](https://cocodataset.org/#format-results). + - For the evaluation metric of COCO, please refer to [detection-eval](https://cocodataset.org/#detection-eval), and install [cocoapi](https://github.com/cocodataset/cocoapi) at first. + - For the evaluation metric of VOC, please refer to [VOC2012](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html). + +### Custom dataset + +1.For the annotation of custom dataset, please refer to [DetAnnoTools](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/docs/tutorials/data/DetAnnoTools_en.md); + +2.For training preparation of custom dataset,please refer to [PrepareDataSet](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/docs/tutorials/data/PrepareDetDataSet_en.md). + + ### Training Training PP-YOLOE+ on 8 GPUs with following command diff --git a/configs/ppyoloe/README_cn.md b/configs/ppyoloe/README_cn.md index d6baaa9ec34d77b0866f45b94fc0b2d766d8d1f6..55a26fa7bab48c9bcfb71d5ad92037177ef1f448 100644 --- a/configs/ppyoloe/README_cn.md +++ b/configs/ppyoloe/README_cn.md @@ -33,6 +33,9 @@ PP-YOLOE由以下方法组成 - [SiLU(Swish)激活函数](https://arxiv.org/abs/1710.05941) ## 模型库 + +### COCO数据集模型库 + | 模型 | 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+_s | 80 | 8 | 8 | cspresnet-s | 640 | 43.7 | 43.9 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_80e_coco.pdparams) | [config](./ppyoloe_plus_crn_s_80e_coco.yml) | @@ -69,6 +72,13 @@ PP-YOLOE由以下方法组成 - 端到端速度测试包含模型前处理 + 模型推理 + 模型后处理及NMS的时间,测试使用**Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz**, **单卡V100**, **CUDA 11.2**, **CUDNN 8.2.0**, **TensorRT 8.0.1.6**。 +### VOC数据集模型库 +| 模型 | Epoch | GPU个数 | 每GPU图片个数 | 骨干网络 | 输入尺寸 | Box AP0.5 | Params(M) | FLOPs(G) | V100 FP32(FPS) | V100 TensorRT FP16(FPS) | 模型下载 | 配置文件 | +|:---------------:|:-----:|:-----------:|:-----------:|:---------:|:----------:|:--------------:|:---------:|:---------:|:-------------:|:-----------------------:| :-------: |:--------:| +| PP-YOLOE+_s | 30 | 8 | 8 | cspresnet-s | 640 | 86.7 | 7.93 | 17.36 | 208.3 | 333.3 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_30e_voc.pdparams) | [config](./ppyoloe_plus_crn_s_30e_voc.yml) | +| PP-YOLOE+_l | 30 | 8 | 8 | cspresnet-l | 640 | 89.0 | 52.20 | 110.07 | 78.1 | 149.2 | [model](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_l_30e_voc.pdparams) | [config](./ppyoloe_plus_crn_l_30e_voc.yml) | + + ### 垂类应用模型 PaddleDetection团队提供了基于PP-YOLOE的各种垂类检测模型的配置文件和权重,用户可以下载进行使用: @@ -77,11 +87,34 @@ PaddleDetection团队提供了基于PP-YOLOE的各种垂类检测模型的配置 | :--------: | :---------: | :------: | | 行人检测 | CrowdHuman | [pphuman](../pphuman) | | 车辆检测 | BDD100K、UA-DETRAC | [ppvehicle](../ppvehicle) | -| 小目标检测 | VisDrone | [visdrone](../visdrone) | +| 小目标检测 | VisDrone、DOTA、xView | [smalldet](../smalldet) | ## 使用说明 +### 数据集和评价指标 + +下载PaddleDetection团队提供的**COCO和VOC数据**,并解压放置于`PaddleDetection/dataset/`下: + +``` +wget https://bj.bcebos.com/v1/paddledet/data/coco.tar +# tar -xvf coco.tar + +wget https://bj.bcebos.com/v1/paddledet/data/voc.zip +# unzip voc.zip +``` + +**注意:** + - COCO风格格式,请参考 [format-data](https://cocodataset.org/#format-data) 和 [format-results](https://cocodataset.org/#format-results)。 + - COCO风格评测指标,请参考 [detection-eval](https://cocodataset.org/#detection-eval) ,并首先安装 [cocoapi](https://github.com/cocodataset/cocoapi)。 + - VOC风格格式和评测指标,请参考 [VOC2012](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html)。 + +### 自定义数据集 + +1.自定义数据集的标注制作,请参考 [DetAnnoTools](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/docs/tutorials/data/DetAnnoTools.md); +2.自定义数据集的训练准备,请参考 [PrepareDataSet](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/docs/tutorials/data/PrepareDetDataSet.md). + + ### 训练 请执行以下指令训练PP-YOLOE+ diff --git a/configs/ppyoloe/ppyoloe_plus_crn_l_30e_voc.yml b/configs/ppyoloe/ppyoloe_plus_crn_l_30e_voc.yml new file mode 100644 index 0000000000000000000000000000000000000000..512ab0a02fb8869d0397b13d8aefa8485f1865c7 --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_l_30e_voc.yml @@ -0,0 +1,43 @@ +_BASE_: [ + '../datasets/voc.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_l_30e_voc/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_l_80e_coco.pdparams +depth_mult: 1.0 +width_mult: 1.0 + + +TrainReader: + batch_size: 8 # default 8 gpus, total bs = 64 + +EvalReader: + batch_size: 4 + + +epoch: 30 +LearningRate: + base_lr: 0.001 + schedulers: + - !CosineDecay + max_epochs: 36 + - !LinearWarmup + start_factor: 0. + epochs: 1 + + +PPYOLOEHead: + 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/ppyoloe_plus_crn_s_30e_voc.yml b/configs/ppyoloe/ppyoloe_plus_crn_s_30e_voc.yml new file mode 100644 index 0000000000000000000000000000000000000000..8efa5ee4b5e7671a6962ad53d9b8279661b416be --- /dev/null +++ b/configs/ppyoloe/ppyoloe_plus_crn_s_30e_voc.yml @@ -0,0 +1,43 @@ +_BASE_: [ + '../datasets/voc.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_s_30e_voc/model_final + +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/ppyoloe_plus_crn_s_80e_coco.pdparams +depth_mult: 0.33 +width_mult: 0.50 + + +TrainReader: + batch_size: 8 # default 8 gpus, total bs = 64 + +EvalReader: + batch_size: 4 + + +epoch: 30 +LearningRate: + base_lr: 0.001 + schedulers: + - !CosineDecay + max_epochs: 36 + - !LinearWarmup + start_factor: 0. + epochs: 1 + + +PPYOLOEHead: + static_assigner_epoch: -1 + nms: + name: MultiClassNMS + nms_top_k: 1000 + keep_top_k: 300 + score_threshold: 0.01 + nms_threshold: 0.7