From 3ef7245dec515fbc3d40d17da9d63641f78929eb Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Wed, 3 Nov 2021 21:19:00 +0800 Subject: [PATCH] add PicoDet voc config (#4443) --- configs/picodet/README.md | 59 +++++++++++++++++++++++++-- configs/picodet/picodet_s_320_voc.yml | 37 +++++++++++++++++ 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 configs/picodet/picodet_s_320_voc.yml diff --git a/configs/picodet/README.md b/configs/picodet/README.md index 0b7b3901a..e74d98cb4 100644 --- a/configs/picodet/README.md +++ b/configs/picodet/README.md @@ -20,9 +20,6 @@ We developed a series of lightweight models, named `PP-PicoDet`. Because of the - [ ] Pretrained models for more scenarios. - [ ] More features in need. -## Requirements -- PaddlePaddle >= 2.1.2 - ## Benchmark | Model | Input size | mAPval
0.5:0.95 | mAPval
0.5 | Params
(M) | FLOPS
(G) | Latency[NCNN](#latency)
(ms) | Latency[Lite](#latency)
(ms) | download | config | @@ -69,6 +66,62 @@ We developed a series of lightweight models, named `PP-PicoDet`. Because of the | YOLOv5s | 640*640 | 37.2 | 56.0 | 7.2 | 16.5 | 78.05 | +## Quick Start + +
+Requirements: + +- PaddlePaddle >= 2.1.2 + +
+ +
+Installation + +- [Installation guide](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.3/docs/tutorials/INSTALL.md) +- [Prepare dataset](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.3/docs/tutorials/PrepareDataSet_en.md) + +
+ +
+Training and Evaluation + +- Training model on single-GPU: + +```shell +# training on single-GPU +export CUDA_VISIBLE_DEVICES=0 +python tools/train.py -c configs/picodet/picodet_s_320_coco.yml --eval +``` + +- Training model on multi-GPU: + + +```shell +# training on single-GPU +export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 +python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/picodet/picodet_s_320_coco.yml --eval +``` + +- Evaluation: + +```shell +python tools/eval.py -c configs/picodet/picodet_s_320_coco.yml \ + -o weights=https://paddledet.bj.bcebos.com/models/picodet_s_320_coco.pdparams +``` + +- Infer: + +```shell +python tools/infer.py -c configs/picodet/picodet_s_320_coco.yml \ + -o weights=https://paddledet.bj.bcebos.com/models/picodet_s_320_coco.pdparams +``` + +Detail also can refer to [Quick start guide](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.3/docs/tutorials/GETTING_STARTED.md). + +
+ + ## Deployment ### Export and Convert Model diff --git a/configs/picodet/picodet_s_320_voc.yml b/configs/picodet/picodet_s_320_voc.yml new file mode 100644 index 000000000..ed93fb636 --- /dev/null +++ b/configs/picodet/picodet_s_320_voc.yml @@ -0,0 +1,37 @@ +_BASE_: [ + '../datasets/voc.yml', + '../runtime.yml', + '_base_/picodet_esnet.yml', + '_base_/optimizer_300e.yml', + '_base_/picodet_320_reader.yml', +] + +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ESNet_x0_75_pretrained.pdparams +weights: output/picodet_s_320_coco/model_final +find_unused_parameters: True +use_ema: true +cycle_epoch: 40 +snapshot_epoch: 10 + +ESNet: + scale: 0.75 + feature_maps: [4, 11, 14] + act: hard_swish + channel_ratio: [0.875, 0.5, 0.5, 0.5, 0.625, 0.5, 0.625, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5] + +CSPPAN: + out_channels: 96 + +PicoHead: + conv_feat: + name: PicoFeat + feat_in: 96 + feat_out: 96 + num_convs: 2 + num_fpn_stride: 4 + norm_type: bn + share_cls_reg: True + feat_in_chan: 96 + +EvalReader: + collate_batch: false -- GitLab