Commit fccfdfa5 authored by dlyrm's avatar dlyrm
Browse files

update code

parent dcc7bf4f
Pipeline #681 canceled with stages
epoch: 300
LearningRate:
base_lr: 0.01
schedulers:
- !YOLOv5LRDecay
max_epochs: 300
min_lr_ratio: 0.1 #
- !ExpWarmup
epochs: 3
OptimizerBuilder:
optimizer:
type: Momentum
momentum: 0.937
use_nesterov: True
regularizer:
factor: 0.0005
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: YOLOv5Head
post_process: ~
CSPDarkNet:
arch: "P5"
return_idx: [2, 3, 4]
depthwise: false
YOLOCSPPAN:
depthwise: false
YOLOv5Head:
anchors: [[10, 13], [16, 30], [33, 23],
[30, 61], [62, 45], [59, 119],
[116, 90], [156, 198], [373, 326]]
anchor_masks: [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
stride: [8, 16, 32]
loss: YOLOv5Loss
nms:
name: MultiClassNMS
nms_top_k: 3000
keep_top_k: 300
score_threshold: 0.001
nms_threshold: 0.65
YOLOv5Loss:
downsample_ratios: [8, 16, 32]
balance: [4.0, 1.0, 0.4]
box_weight: 0.05
obj_weight: 1.0
cls_weght: 0.5
_BASE_: [
'yolov5_cspdarknet.yml',
]
YOLOv5:
backbone: CSPResNet
neck: CustomCSPPAN
yolo_head: YOLOv5Head
post_process: ~
CSPResNet:
layers: [3, 6, 6, 3]
channels: [64, 128, 256, 512, 1024]
return_idx: [1, 2, 3]
use_large_stem: True
CustomCSPPAN:
out_channels: [768, 384, 192]
stage_num: 1
block_num: 3
act: 'swish'
spp: true
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:
- 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: {}
- 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
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:
- DecodeNormResize: {target_size: *input_size, mosaic: True}
- MosaicPerspective: {mosaic_prob: 1.0, 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: {}
- 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_: [
'yolov5_cspdarknet.yml',
]
CSPDarkNet:
arch: "P5"
return_idx: [1, 2, 3, 4]
YOLOv5Head:
anchors: [[5, 6], [8, 14], [15, 11],
[10, 13], [16, 30], [33, 23],
[30, 61], [62, 45], [59, 119],
[116, 90], [156, 198], [373, 326]]
anchor_masks: [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]
stride: [4, 8, 16, 32]
YOLOv5Loss:
downsample_ratios: [4, 8, 16, 32]
balance: [4.0, 1.0, 0.25, 0.06]
_BASE_: [
'yolov5_cspdarknet.yml',
]
CSPDarkNet:
arch: "P6"
return_idx: [2, 3, 4, 5]
YOLOv5Head:
anchors: [[19, 27], [44, 40], [38, 94],
[96, 68], [86, 152], [180, 137],
[140, 301], [303, 264], [238, 542],
[436, 615], [739, 380], [925, 792]]
anchor_masks: [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]
stride: [8, 16, 32, 64]
YOLOv5Loss:
downsample_ratios: [8, 16, 32, 64]
balance: [4.0, 1.0, 0.25, 0.06]
box_weight: 0.05
obj_weight: 0.7
cls_weght: 0.3
input_height: &input_height 1280
input_width: &input_width 1280
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 300
worker_num: 4
TrainReader:
sample_transforms:
- DecodeNormResize: {target_size: *input_size, mosaic: True}
- MosaicPerspective: {mosaic_prob: 1.0, 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: {}
- BboxXYXY2XYWH: {}
- NormalizeBox: {}
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- 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: 2
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_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader_high_aug.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_l_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader_high_aug.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 5
weights: output/yolov5_l_30e_obj365_finetune_coco/model_final
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/yolov5_l_300e_obj365.pdparams
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
epoch: 30
LearningRate:
base_lr: 0.001
schedulers:
- !YOLOv5LRDecay
max_epochs: 30
min_lr_ratio: 0.1
- !ExpWarmup
epochs: 3
OptimizerBuilder:
optimizer:
type: Momentum
momentum: 0.937
use_nesterov: True
regularizer:
factor: 0.0005
type: L2
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader_high_aug.yml',
]
depth_mult: 0.67
width_mult: 0.75
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_m_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e.yml',
'_base_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader.yml',
]
depth_mult: 0.33
width_mult: 0.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_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_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader.yml',
]
depth_mult: 0.33
width_mult: 0.50
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_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.yml',
'_base_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader.yml',
]
depth_mult: 0.33
width_mult: 0.50
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_s_80e_ssod_finetune_coco/model_final
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/yolov5_s_300e_ssod_coco.pdparams
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
epoch: 80
LearningRate:
base_lr: 0.001
schedulers:
- !YOLOv5LRDecay
max_epochs: 80
min_lr_ratio: 0.01
- !ExpWarmup
epochs: 3
OptimizerBuilder:
optimizer:
type: Momentum
momentum: 0.937
use_nesterov: True
regularizer:
factor: 0.0005
type: L2
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5_cspdarknet.yml',
'_base_/yolov5_reader_high_aug.yml',
]
depth_mult: 1.33
width_mult: 1.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5_x_300e_coco/model_final
TrainReader:
batch_size: 16 # default 8 gpus, total bs = 128
YOLOv5Loss:
obj_weight: 0.7
cls_weght: 0.3
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5p6_cspdarknet.yml',
'_base_/yolov5p6_reader.yml',
]
depth_mult: 1.0
width_mult: 1.0
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5p6_l_300e_coco/model_final
TrainReader:
batch_size: 8 # default 8 gpus, total bs = 64
_BASE_: [
'../datasets/coco_detection.yml',
'../runtime.yml',
'_base_/optimizer_300e_high.yml',
'_base_/yolov5p6_cspdarknet.yml',
'_base_/yolov5p6_reader.yml',
]
depth_mult: 0.67
width_mult: 0.75
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5p6_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_high.yml',
'_base_/yolov5p6_cspdarknet.yml',
'_base_/yolov5p6_reader.yml',
]
depth_mult: 0.33
width_mult: 0.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5p6_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_high.yml',
'_base_/yolov5p6_cspdarknet.yml',
'_base_/yolov5p6_reader.yml',
]
depth_mult: 0.33
width_mult: 0.50
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5p6_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_/yolov5p6_cspdarknet.yml',
'_base_/yolov5p6_reader.yml',
]
depth_mult: 1.33
width_mult: 1.25
log_iter: 100
snapshot_epoch: 10
weights: output/yolov5p6_x_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