Skip to content

Commit

Permalink
add focalnet ppyoloe+ model (#7923)
Browse files Browse the repository at this point in the history
  • Loading branch information
nemonameless authored Mar 13, 2023
1 parent 08a0d75 commit a0b35c7
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/convnext/ppyoloe_convnext_tiny_36e_coco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ConvNeXt:
PPYOLOEHead:
static_assigner_epoch: 12
nms:
nms_top_k: 10000
nms_top_k: 1000
keep_top_k: 300
score_threshold: 0.01
nms_threshold: 0.7
Expand Down
19 changes: 19 additions & 0 deletions configs/focalnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# FocalNet (Focal Modulation Networks)

## 模型库
### FocalNet on COCO

| 网络网络 | 输入尺寸| 图片数/GPU | 学习率策略 | mAP<sup>val<br>0.5:0.95 | mAP<sup>val<br>0.5 | 下载链接 | 配置文件 |
| :--------- | :---- | :-------: | :------: | :---------------------: | :----------------: | :-------: |:------: |
| PP-YOLOE+ FocalNet-tiny | 640 | 8 | 36e | - | 46.6 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_focalnet_tiny_36e_coco.pdparams) | [配置文件](./ppyoloe_plus_focalnet_tiny_36e_coco.yml) |


## Citations
```
@misc{yang2022focal,
title={Focal Modulation Networks},
author={Jianwei Yang and Chunyuan Li and Xiyang Dai and Jianfeng Gao},
journal={Advances in Neural Information Processing Systems (NeurIPS)},
year={2022}
}
```
61 changes: 61 additions & 0 deletions configs/focalnet/ppyoloe_plus_focalnet_tiny_36e_coco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'../ppyoloe/_base_/ppyoloe_plus_crn.yml',
'../ppyoloe/_base_/ppyoloe_plus_reader.yml',
]
depth_mult: 0.33 # s version
width_mult: 0.50

log_iter: 100
snapshot_epoch: 4
weights: output/ppyoloe_plus_focalnet_tiny_36e_coco/model_final
pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/focalnet_tiny_lrf_pretrained.pdparams


architecture: PPYOLOE
norm_type: sync_bn
use_ema: true
ema_decay: 0.9998
ema_black_list: ['proj_conv.weight']
custom_black_list: ['reduce_mean']

PPYOLOE:
backbone: FocalNet
neck: CustomCSPPAN
yolo_head: PPYOLOEHead
post_process: ~

FocalNet:
arch: 'focalnet_T_224_1k_lrf'
out_indices: [1, 2, 3]

PPYOLOEHead:
static_assigner_epoch: 12
nms:
nms_top_k: 1000
keep_top_k: 300
score_threshold: 0.01
nms_threshold: 0.7


TrainReader:
batch_size: 8


epoch: 36
LearningRate:
base_lr: 0.0001
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [36]
- !LinearWarmup
start_factor: 0.1
steps: 1000

OptimizerBuilder:
regularizer: false
optimizer:
type: AdamW
weight_decay: 0.0005
2 changes: 1 addition & 1 deletion configs/swin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 |推理时间(fps) | Box AP | 下载 | 配置文件 |
| :------------------- | :------------- | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: |
| swin_T_224 | Faster R-CNN | 2 | 36e | ---- | 45.3 | [下载链接](https://paddledet.bj.bcebos.com/models/faster_rcnn_swin_tiny_fpn_3x_coco.pdparams) | [配置文件](./faster_rcnn_swin_tiny_fpn_3x_coco.yml) |
| swin_T_224 | PP-YOLOE+ | 8 | 36e | ---- | 43.6 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_swin_tiny_36e_coco.pdparams) | [配置文件](./ppyoloe_plus_swin_tiny_36e_coco.yml) |
| swin_T_224 | PP-YOLOE+ | 8 | 36e | ---- | 44.7 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_swin_tiny_36e_coco.pdparams) | [配置文件](./ppyoloe_plus_swin_tiny_36e_coco.yml) |


## Citations
Expand Down
2 changes: 1 addition & 1 deletion configs/swin/ppyoloe_plus_swin_tiny_36e_coco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SwinTransformer:
PPYOLOEHead:
static_assigner_epoch: 12
nms:
nms_top_k: 10000
nms_top_k: 1000
keep_top_k: 300
score_threshold: 0.01
nms_threshold: 0.7
Expand Down

0 comments on commit a0b35c7

Please sign in to comment.