移动paddle_detection

This commit is contained in:
2024-09-24 17:02:56 +08:00
parent 90a6d5ec75
commit 3438cf6e0e
2025 changed files with 11 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
# YOLOF (You Only Look One-level Feature)
## ModelZOO
| 网络网络 | 输入尺寸 | 图片数/GPU | Epochs | 模型推理耗时(ms) | mAP<sup>val<br>0.5:0.95 | Params(M) | FLOPs(G) | 下载链接 | 配置文件 |
| :--------------------- | :------- | :-------: | :----: | :----------: | :---------------------: | :----------------: |:---------: | :------: |:---------------: |
| YOLOF-R_50_C5 (paper) | 800x1333 | 4 | 12 | - | 37.7 | - | - | - | - |
| YOLOF-R_50_C5 | 800x1333 | 4 | 12 | - | 38.1 | 44.16 | 241.64 | [下载链接](https://paddledet.bj.bcebos.com/models/yolof_r50_c5_1x_coco.pdparams) | [配置文件](./yolof_r50_c5_1x_coco.yml) |
**注意:**
- YOLOF模型训练过程中默认使用8 GPUs进行混合精度训练总batch_size默认为32。
## Citations
```
@inproceedings{chen2021you,
title={You Only Look One-level Feature},
author={Chen, Qiang and Wang, Yingming and Yang, Tong and Zhang, Xiangyu and Cheng, Jian and Sun, Jian},
booktitle={IEEE Conference on Computer Vision and Pattern Recognition},
year={2021}
}
```

View File

@@ -0,0 +1,19 @@
epoch: 12
LearningRate:
base_lr: 0.06
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [8, 11]
- !LinearWarmup
start_factor: 0.00066
steps: 1500
OptimizerBuilder:
optimizer:
momentum: 0.9
type: Momentum
regularizer:
factor: 0.0001
type: L2

View File

@@ -0,0 +1,54 @@
architecture: YOLOF
find_unused_parameters: True
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
YOLOF:
backbone: ResNet
neck: DilatedEncoder
head: YOLOFHead
ResNet:
depth: 50
variant: b # resnet-va in paper
freeze_at: 0 # res2
return_idx: [3] # only res5 feature
lr_mult_list: [0.3333, 0.3333, 0.3333, 0.3333]
DilatedEncoder:
in_channels: [2048]
out_channels: [512]
block_mid_channels: 128
num_residual_blocks: 4
block_dilations: [2, 4, 6, 8]
YOLOFHead:
conv_feat:
name: YOLOFFeat
feat_in: 512
feat_out: 512
num_cls_convs: 2
num_reg_convs: 4
norm_type: bn
anchor_generator:
name: AnchorGenerator
anchor_sizes: [[32, 64, 128, 256, 512]]
aspect_ratios: [1.0]
strides: [32]
bbox_assigner:
name: UniformAssigner
pos_ignore_thr: 0.15
neg_ignore_thr: 0.7
match_times: 4
loss_class:
name: FocalLoss
gamma: 2.0
alpha: 0.25
loss_bbox:
name: GIoULoss
nms:
name: MultiClassNMS
nms_top_k: 1000
keep_top_k: 100
score_threshold: 0.05
nms_threshold: 0.6

View File

@@ -0,0 +1,38 @@
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- RandomShift: {prob: 0.5, max_shift: 32}
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
- NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- RandomFlip: {}
- Permute: {}
batch_transforms:
- PadBatch: {pad_to_stride: 32}
batch_size: 4
shuffle: True
drop_last: True
collate_batch: False
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
- NormalizeImage: {is_scale: True, mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]}
- Permute: {}
batch_transforms:
- PadBatch: {pad_to_stride: 32}
batch_size: 1
TestReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
- NormalizeImage: {is_scale: True, mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]}
- Permute: {}
batch_transforms:
- PadBatch: {pad_to_stride: 32}
batch_size: 1
fuse_normalize: True

View File

@@ -0,0 +1,10 @@
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'./_base_/optimizer_1x.yml',
'./_base_/yolof_r50_c5.yml',
'./_base_/yolof_reader.yml'
]
log_iter: 50
snapshot_epoch: 1
weights: output/yolof_r50_c5_1x_coco/model_final