Skip to content

Commit

Permalink
Hackathon YOLOv8 training
Browse files Browse the repository at this point in the history
【飞桨黑客松 Hackathon + No.155】Yolov8 模型训练复现
  • Loading branch information
nemonameless authored May 18, 2023
2 parents 2dae336 + 048bc3f commit 8fbce85
Show file tree
Hide file tree
Showing 8 changed files with 586 additions and 142 deletions.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

440 changes: 440 additions & 0 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions configs/yolov8/_base_/optimizer_500e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ OptimizerBuilder:
regularizer:
factor: 0.0005
type: L2
clip_grad_by_value: 10.
1 change: 1 addition & 0 deletions configs/yolov8/_base_/optimizer_500e_high.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ OptimizerBuilder:
regularizer:
factor: 0.0005
type: L2
clip_grad_by_value: 10.
2 changes: 1 addition & 1 deletion configs/yolov8/_base_/yolov8_cspdarknet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ YOLOv8Head:
beta: 6.0
nms:
name: MultiClassNMS
nms_top_k: 1000
nms_top_k: 3000
keep_top_k: 300
score_threshold: 0.001
nms_threshold: 0.7
2 changes: 1 addition & 1 deletion configs/yolov8/_base_/yolov8_reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ EvalReader:
- 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
batch_size: 8


TestReader:
Expand Down
4 changes: 2 additions & 2 deletions configs/yolov8/_base_/yolov8_reader_high_aug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {mosaic_prob: 1.0, target_size: *input_size, scale: 0.9, mixup_prob: 0.15}
- 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: {}
batch_transforms:
Expand All @@ -29,7 +29,7 @@ EvalReader:
- 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
batch_size: 8


TestReader:
Expand Down
3 changes: 1 addition & 2 deletions ppdet/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def __init__(self, cfg, mode='train'):
self.custom_white_list = self.cfg.get('custom_white_list', None)
self.custom_black_list = self.cfg.get('custom_black_list', None)

if self.cfg.architecture in ['RTMDet', 'YOLOv6', 'YOLOv8'
] and self.mode == 'train':
if self.cfg.architecture in ['RTMDet', 'YOLOv6'] and self.mode == 'train':
raise NotImplementedError('{} training not supported yet.'.format(
self.cfg.architecture))

Expand Down
Loading

0 comments on commit 8fbce85

Please sign in to comment.