diff --git a/configs/convnext/README.md b/configs/convnext/README.md new file mode 100644 index 0000000000000000000000000000000000000000..644d66815660427d2a6cdf587c014d8cb877eb15 --- /dev/null +++ b/configs/convnext/README.md @@ -0,0 +1,20 @@ +# ConvNeXt (A ConvNet for the 2020s) + +## 模型库 +### ConvNeXt on COCO + +| 网络网络 | 输入尺寸 | 图片数/GPU | 学习率策略 | mAPval
0.5:0.95 | mAPval
0.5 | Params(M) | FLOPs(G) | 下载链接 | 配置文件 | +| :------------- | :------- | :-------: | :------: | :------------: | :---------------------: | :----------------: |:---------: | :------: |:---------------: | +| PP-YOLOE-ConvNeXt-tiny | 640 | 16 | 36e | 44.6 | 63.3 | 33.04 | 13.87 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_convnext_tiny_36e_coco.pdparams) | [配置文件](./ppyoloe_convnext_tiny_36e_coco.yml) | +| YOLOX-ConvNeXt-s | 640 | 8 | 36e | 44.6 | 65.3 | 36.20 | 27.52 | [下载链接](https://paddledet.bj.bcebos.com/models/yolox_convnext_s_36e_coco.pdparams) | [配置文件](./yolox_convnext_s_36e_coco.yml) | + + +## Citations +``` +@Article{liu2022convnet, + author = {Zhuang Liu and Hanzi Mao and Chao-Yuan Wu and Christoph Feichtenhofer and Trevor Darrell and Saining Xie}, + title = {A ConvNet for the 2020s}, + journal = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, + year = {2022}, +} +``` diff --git a/configs/convnext/ppyoloe_convnext_tiny_36e_coco.yml b/configs/convnext/ppyoloe_convnext_tiny_36e_coco.yml new file mode 100644 index 0000000000000000000000000000000000000000..360a368ec0837033ab408db59aa0d4ea5b7972dd --- /dev/null +++ b/configs/convnext/ppyoloe_convnext_tiny_36e_coco.yml @@ -0,0 +1,55 @@ +_BASE_: [ + '../datasets/coco_detection.yml', + '../runtime.yml', + '../ppyoloe/_base_/ppyoloe_crn.yml', + '../ppyoloe/_base_/ppyoloe_reader.yml', +] +depth_mult: 0.25 +width_mult: 0.50 + +log_iter: 100 +snapshot_epoch: 5 +weights: output/ppyoloe_convnext_tiny_36e_coco/model_final +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/convnext_tiny_22k_224.pdparams + + +YOLOv3: + backbone: ConvNeXt + neck: CustomCSPPAN + yolo_head: PPYOLOEHead + post_process: ~ + +ConvNeXt: + arch: 'tiny' + drop_path_rate: 0.4 + layer_scale_init_value: 1.0 + return_idx: [1, 2, 3] + + +PPYOLOEHead: + static_assigner_epoch: 12 + nms: + nms_top_k: 10000 + keep_top_k: 300 + score_threshold: 0.01 + nms_threshold: 0.7 + + +TrainReader: + batch_size: 16 + + +epoch: 36 +LearningRate: + base_lr: 0.0002 + schedulers: + - !PiecewiseDecay + gamma: 0.1 + milestones: [36] + use_warmup: false + +OptimizerBuilder: + regularizer: false + optimizer: + type: AdamW + weight_decay: 0.0005 diff --git a/configs/yolox/yolox_convnext_s_36e_coco.yml b/configs/convnext/yolox_convnext_s_36e_coco.yml similarity index 57% rename from configs/yolox/yolox_convnext_s_36e_coco.yml rename to configs/convnext/yolox_convnext_s_36e_coco.yml index 4cccb223e7057c610f120fc37fd9e830ff7d482f..b41551dee8a2e2793ac09d474c0e7d2a8868299f 100644 --- a/configs/yolox/yolox_convnext_s_36e_coco.yml +++ b/configs/convnext/yolox_convnext_s_36e_coco.yml @@ -1,8 +1,8 @@ _BASE_: [ '../datasets/coco_detection.yml', '../runtime.yml', - './_base_/yolox_convnext.yml', - './_base_/yolox_reader.yml' + '../yolox/_base_/yolox_cspdarknet.yml', + '../yolox/_base_/yolox_reader.yml' ] depth_mult: 0.33 width_mult: 0.50 @@ -10,7 +10,21 @@ width_mult: 0.50 log_iter: 100 snapshot_epoch: 5 weights: output/yolox_convnext_s_36e_coco/model_final -pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/convnext_tiny_1k_224_ema.pdparams +pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/convnext_tiny_22k_224.pdparams + + +YOLOX: + backbone: ConvNeXt + neck: YOLOCSPPAN + head: YOLOXHead + size_stride: 32 + size_range: [15, 25] # multi-scale range [480*480 ~ 800*800] + +ConvNeXt: + arch: 'tiny' + drop_path_rate: 0.4 + layer_scale_init_value: 1.0 + return_idx: [1, 2, 3] TrainReader: @@ -19,7 +33,7 @@ TrainReader: YOLOXHead: - l1_epoch: 20 + l1_epoch: 30 nms: name: MultiClassNMS nms_top_k: 10000 diff --git a/configs/yolox/README.md b/configs/yolox/README.md index 4a6cbed45ac6cec077a79a0052ccf850e1add24c..a689b2981e06d439bc212c4fbb2ba4efa6860a7c 100644 --- a/configs/yolox/README.md +++ b/configs/yolox/README.md @@ -22,13 +22,13 @@ | 网络网络 | 输入尺寸 | 图片数/GPU | 学习率策略 | 模型推理耗时(ms) | mAPval
0.5:0.95 | mAPval
0.5 | Params(M) | FLOPs(G) | 下载链接 | 配置文件 | | :------------- | :------- | :-------: | :------: | :------------: | :---------------------: | :----------------: |:---------: | :------: |:---------------: |:-----: | -| YOLOXv2-tiny | 416 | 8 | 300e | 1.9 | 32.4 | 50.2 | 5.03 | 6.33 | [下载链接](https://paddledet.bj.bcebos.com/models/yoloxv2_tiny_300e_coco.pdparams) | [配置文件](./yoloxv2_tiny_300e_coco.yml) | +| YOLOX-cdn-tiny | 416 | 8 | 300e | 1.9 | 32.4 | 50.2 | 5.03 | 6.33 | [下载链接](https://paddledet.bj.bcebos.com/models/yolox_cdn_tiny_300e_coco.pdparams) | [配置文件](./yolox_cdn_tiny_300e_coco.yml) | | YOLOX-crn-s | 640 | 8 | 300e | 3.0 | 40.4 | 59.6 | 7.7 | 24.69 | [下载链接](https://paddledet.bj.bcebos.com/models/yolox_crn_s_300e_coco.pdparams) | [配置文件](./yolox_crn_s_300e_coco.yml) | -| YOLOX-ConvNeXt-s| 640 | 8 | 36e | - | **44.6** | **65.3** | 36.2 | 27.52 | [下载链接](https://paddledet.bj.bcebos.com/models/yolox_convnext_s_36e_coco.pdparams) | [配置文件](./yolox_convnext_s_36e_coco.yml) | +| YOLOX-ConvNeXt-s| 640 | 8 | 36e | - | **44.6** | **65.3** | 36.2 | 27.52 | [下载链接](https://paddledet.bj.bcebos.com/models/yolox_convnext_s_36e_coco.pdparams) | [配置文件](../convnext/yolox_convnext_s_36e_coco.yml) | **注意:** - - YOLOX模型训练使用COCO train2017作为训练集,YOLOXv2表示使用与YOLOv5 releases v6.0之后版本相同的主干网络,YOLOX-crn表示使用与PPYOLOE相同的主干网络CSPResNet,YOLOX-ConvNeXt表示使用ConvNeXt作为主干网络; + - YOLOX模型训练使用COCO train2017作为训练集,YOLOX-cdn表示使用与YOLOv5 releases v6.0之后版本相同的主干网络,YOLOX-crn表示使用与PPYOLOE相同的主干网络CSPResNet,YOLOX-ConvNeXt表示使用ConvNeXt作为主干网络; - YOLOX模型训练过程中默认使用8 GPUs进行混合精度训练,默认每卡batch_size为8,默认lr为0.01为8卡总batch_size=64的设置,如果**GPU卡数**或者每卡**batch size**发生了改变,你需要按照公式 **lrnew = lrdefault * (batch_sizenew * GPU_numbernew) / (batch_sizedefault * GPU_numberdefault)** 调整学习率; - 为保持高mAP的同时提高推理速度,可以将[yolox_cspdarknet.yml](_base_/yolox_cspdarknet.yml)中的`nms_top_k`修改为`1000`,将`keep_top_k`修改为`100`,将`score_threshold`修改为`0.01`,mAP会下降约0.1~0.2%; - 为快速的demo演示效果,可以将[yolox_cspdarknet.yml](_base_/yolox_cspdarknet.yml)中的`score_threshold`修改为`0.25`,将`nms_threshold`修改为`0.45`,但mAP会下降较多; diff --git a/configs/yolox/_base_/yolox_convnext.yml b/configs/yolox/_base_/yolox_convnext.yml deleted file mode 100644 index e8d790babaee2b000e0a8dc07a0f106c0f3d426c..0000000000000000000000000000000000000000 --- a/configs/yolox/_base_/yolox_convnext.yml +++ /dev/null @@ -1,16 +0,0 @@ -_BASE_: [ - './yolox_cspdarknet.yml', -] - -YOLOX: - backbone: ConvNeXt - neck: YOLOCSPPAN - head: YOLOXHead - size_stride: 32 - size_range: [15, 25] # multi-scale range [480*480 ~ 800*800] - -ConvNeXt: - arch: 'tiny' - drop_path_rate: 0.4 - layer_scale_init_value: 1.0 - return_idx: [1, 2, 3] diff --git a/configs/yolox/yoloxv2_tiny_300e_coco.yml b/configs/yolox/yolox_cdn_tiny_300e_coco.yml similarity index 59% rename from configs/yolox/yoloxv2_tiny_300e_coco.yml rename to configs/yolox/yolox_cdn_tiny_300e_coco.yml index 9a3c2646c24ce16b2892cae723a1f0b3e5f16327..81c6c075d3620caa98dce2ebcd3b45bd694cef8d 100644 --- a/configs/yolox/yoloxv2_tiny_300e_coco.yml +++ b/configs/yolox/yolox_cdn_tiny_300e_coco.yml @@ -1,7 +1,12 @@ _BASE_: [ 'yolox_tiny_300e_coco.yml' ] -weights: output/yoloxv2_tiny_300e_coco/model_final +depth_mult: 0.33 +width_mult: 0.375 + +log_iter: 100 +snapshot_epoch: 10 +weights: output/yolox_cdn_tiny_300e_coco/model_final CSPDarkNet: arch: "P5" # using the same backbone of YOLOv5 releases v6.0 and later version diff --git a/configs/yolox/yolox_crn_s_300e_coco.yml b/configs/yolox/yolox_crn_s_300e_coco.yml index c8f85e0641f218194a504c2d7ab429634ae5821c..ae463113e5909f76905b70409ae75794a66430d7 100644 --- a/configs/yolox/yolox_crn_s_300e_coco.yml +++ b/configs/yolox/yolox_crn_s_300e_coco.yml @@ -11,6 +11,8 @@ width_mult: 0.50 log_iter: 100 snapshot_epoch: 10 weights: output/yolox_crn_s_300e_coco/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_s_pretrained.pdparams + YOLOX: backbone: CSPResNet