Commit 522a602f authored by wangkx1's avatar wangkx1
Browse files

siton bug

parent abb99c90
input_height: &input_height 640
input_width: &input_width 640
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 300
worker_num: 4
TrainReader:
sample_transforms:
- DecodeNormResizeMask: {target_size: *input_size, mosaic: True}
- MosaicPerspective: {mosaic_prob: 0.0, target_size: *input_size, scale: 0.9, mixup_prob: 0.1, copy_paste_prob: 0.1, with_mask: True}
- Poly2Mask: {del_poly: True}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
- BboxXYXY2XYWH: {}
- NormalizeBox: {}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- RGBReverse: {} # bgr->rgb
- Permute: {}
batch_size: 8
shuffle: True
drop_last: False
use_shared_memory: False
collate_batch: False
mosaic_epoch: *mosaic_epoch
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
TestReader:
inputs_def:
image_shape: [3, 640, 640]
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
fuse_normalize: False
_BASE_: [
'../datasets/coco_instance.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_seg_cspdarknet.yml',
'_base_/yolov5_seg_reader_high_aug.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_seg_l_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
EvalReader:
batch_size: 1
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
_BASE_: [
'../datasets/coco_instance.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_seg_cspdarknet.yml',
'_base_/yolov5_seg_reader_high_aug.yml',
]
depth_mult: 0.67
width_mult: 0.75
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_seg_m_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
EvalReader:
batch_size: 1
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
_BASE_: [
'../datasets/coco_instance.yml',
'../runtime.yml',
'_base_/optimizer_300e.yml',
'_base_/yolov5_seg_cspdarknet.yml',
'_base_/yolov5_seg_reader.yml',
]
depth_mult: 0.33
width_mult: 0.25
log_iter: 50
snapshot_epoch: 10
weights: output/yolov5_seg_n_300e_coco/model_final
_BASE_: [
'../datasets/coco_instance.yml',
'../runtime.yml',
'_base_/optimizer_300e.yml',
'_base_/yolov5_seg_cspdarknet.yml',
'_base_/yolov5_seg_reader.yml',
]
depth_mult: 0.33
width_mult: 0.50
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_seg_s_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
EvalReader:
batch_size: 1
_BASE_: [
'../datasets/coco_instance.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_seg_cspdarknet.yml',
'_base_/yolov5_seg_reader_high_aug.yml',
]
depth_mult: 1.33
width_mult: 1.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_seg_x_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
EvalReader:
batch_size: 1
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
# YOLOv5u
## 模型库
### 基础模型
| 网络网络 | 输入尺寸 | 图片数/GPU | 学习率策略 | 模型推理耗时(ms) | mAP<sup>val<br>0.5:0.95 | mAP<sup>val<br>0.5 | Params(M) | FLOPs(G) | 下载链接 | 配置文件 |
| :------------- | :------- | :-------: | :------: | :------------: | :---------------------: | :----------------: |:---------: | :------: |:---------------: |:-----: |
| YOLOv5u-n | 640 | 16 | 300e | 1.61 | 34.5 | 49.7 | 2.65 | 7.79 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5u_n_300e_coco.pdparams) | [配置文件](./yolov5u_n_300e_coco.yml) |
| YOLOv5u-s | 640 | 16 | 300e | 2.66 | 43.0 | 59.7 | 9.15 | 24.12 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5u_s_300e_coco.pdparams) | [配置文件](./yolov5u_s_300e_coco.yml) |
| YOLOv5u-m | 640 | 16 | 300e | 5.50 | 49.0 | 65.7 | 25.11 | 64.42 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5u_m_300e_coco.pdparams) | [配置文件](./yolov5u_m_300e_coco.yml) |
| YOLOv5u-l | 640 | 16 | 300e | 8.73 | 52.2 | 69.0 | 53.23 | 135.34 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5u_l_300e_coco.pdparams) | [配置文件](./yolov5u_l_300e_coco.yml) |
| YOLOv5u-x | 640 | 16 | 300e | 15.49 | 53.1 | 69.9 | 97.28 | 246.89 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5u_x_300e_coco.pdparams) | [配置文件](./yolov5u_x_300e_coco.yml) |
### P6大尺度模型
| 网络网络 | 输入尺寸 | 图片数/GPU | 学习率策略 | 模型推理耗时(ms) | mAP<sup>val<br>0.5:0.95 | mAP<sup>val<br>0.5 | Params(M) | FLOPs(G) | 下载链接 | 配置文件 |
| :------------- | :------- | :-------: | :------: | :------------: | :---------------------: | :----------------: |:---------: | :------: |:---------------: |:-----: |
| YOLOv5u_p6-n | 1280 | 16 | 300e | - | 42.2 | 58.6 | 4.33 | 15.79 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5up6_n_300e_coco.pdparams) | [配置文件](./yolov5up6_n_300e_coco.yml) |
| YOLOv5u_p6-s | 1280 | 16 | 300e | - | 48.6 | 65.8 | 15.31 | 49.02 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5up6_s_300e_coco.pdparams) | [配置文件](./yolov5up6_s_300e_coco.yml) |
| YOLOv5u_p6-m | 1280 | 16 | 300e | - | 53.3 | 70.3 | 41.22 | 131.06 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5up6_m_300e_coco.pdparams) | [配置文件](./yolov5up6_m_300e_coco.yml) |
| YOLOv5u_p6-l | 1280 | 8 | 300e | - | 55.4 | 72.2 | 86.10 | 275.38 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5up6_l_300e_coco.pdparams) | [配置文件](./yolov5up6_l_300e_coco.yml) |
| YOLOv5u_p6-x | 1280 | 8 | 300e | - | 56.4 | 73.1 | 155.54 | 502.38 | [下载链接](https://paddledet.bj.bcebos.com/models/yolov5up6_x_300e_coco.pdparams) | [配置文件](./yolov5p6_x_3yolov5up6_x_300e_coco00e_coco.yml) |
**注意:**
- YOLOv5u 模型表示YOLOv5使用YOLOv8的head和loss,是Anchor Free的检测方案;
- YOLOv5u 模型训练使用COCO train2017作为训练集,Box AP为在COCO val2017上的`mAP(IoU=0.5:0.95)`结果;
- 使用教程可参照[YOLOv5](../yolov5)
epoch: 300
LearningRate:
base_lr: 0.01
schedulers:
- !YOLOv5LRDecay
max_epochs: 300
min_lr_ratio: 0.01
- !ExpWarmup
epochs: 5 #3
OptimizerBuilder:
optimizer:
type: Momentum
momentum: 0.937
use_nesterov: True
regularizer:
factor: 0.001 # 0.0005 in yolov8
type: L2
epoch: 300
LearningRate:
base_lr: 0.01
schedulers:
- !YOLOv5LRDecay
max_epochs: 300
min_lr_ratio: 0.1 #
- !ExpWarmup
epochs: 5 #3
OptimizerBuilder:
optimizer:
type: Momentum
momentum: 0.937
use_nesterov: True
regularizer:
factor: 0.001 # 0.0005 in yolov8
type: L2
architecture: YOLOv5
norm_type: sync_bn
use_ema: True
ema_decay: 0.9999
ema_decay_type: "exponential"
act: silu
find_unused_parameters: True
depth_mult: 1.0
width_mult: 1.0
YOLOv5:
backbone: CSPDarkNet
neck: YOLOCSPPAN
yolo_head: YOLOv8Head
post_process: ~
CSPDarkNet:
arch: "P5"
return_idx: [2, 3, 4]
depthwise: false
YOLOCSPPAN:
depthwise: false
YOLOv8Head:
fpn_strides: [8, 16, 32]
loss_weight: {class: 0.5, iou: 7.5, dfl: 1.5}
assigner:
name: TaskAlignedAssigner
topk: 10
alpha: 0.5
beta: 6.0
nms:
name: MultiClassNMS
nms_top_k: 3000
keep_top_k: 300
score_threshold: 0.001
nms_threshold: 0.7
input_height: &input_height 640
input_width: &input_width 640
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 290 # last 10 epochs close mosaic, totally 300 epochs as default
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {mosaic_prob: 1.0, boxes_normed: False, target_size: *input_size}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 8
shuffle: True
drop_last: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 8
TestReader:
inputs_def:
image_shape: [3, 640, 640]
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
fuse_normalize: False
input_height: &input_height 640
input_width: &input_width 640
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 290 # last 10 epochs close mosaic, totally 300 epochs as default
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {mosaic_prob: 1.0, boxes_normed: False, target_size: *input_size, scale: 0.9, mixup_prob: 0.1, copy_paste_prob: 0.1}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 8
shuffle: True
drop_last: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
TestReader:
inputs_def:
image_shape: [3, 640, 640]
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
fuse_normalize: False
_BASE_: [
'yolov5u_cspdarknet.yml',
]
CSPDarkNet:
arch: "P6"
return_idx: [2, 3, 4, 5]
YOLOCSPPAN:
depthwise: false
YOLOv8Head:
fpn_strides: [8, 16, 32, 64]
input_height: &input_height 1280
input_width: &input_width 1280
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 290 # last 10 epochs close mosaic, totally 300 epochs as default
worker_num: 4
TrainReader:
sample_transforms:
- DecodeNormResize: {target_size: *input_size, mosaic: True}
- MosaicPerspective: {mosaic_prob: 1.0, target_size: *input_size}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 8
shuffle: True
drop_last: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
TestReader:
inputs_def:
image_shape: [3, 1280, 1280]
sample_transforms:
- Decode: {}
- Resize: {target_size: *input_size, keep_ratio: True, interp: 1}
- Pad: {size: *input_size, fill_value: [114., 114., 114.]}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
batch_size: 1
fuse_normalize: False
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5u_cspdarknet.yml',
'_base_/yolov5u_reader_high_aug.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5u_l_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5u_cspdarknet.yml',
'_base_/yolov5u_reader_high_aug.yml',
]
depth_mult: 0.67
width_mult: 0.75
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5u_m_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e.yml',
'_base_/yolov5u_cspdarknet.yml',
'_base_/yolov5u_reader.yml',
]
depth_mult: 0.33
width_mult: 0.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5u_n_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e.yml',
'_base_/yolov5u_cspdarknet.yml',
'_base_/yolov5u_reader.yml',
]
depth_mult: 0.33
width_mult: 0.50
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5u_s_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5u_cspdarknet.yml',
'_base_/yolov5u_reader_high_aug.yml',
]
depth_mult: 1.33
width_mult: 1.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5u_x_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5up6_cspdarknet.yml',
'_base_/yolov5up6_reader.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5up6_l_300e_coco/model_final
TrainReader:
batch_size: 8 # default 8 gpus, total bs = 64
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment