Skip to content

Commit

Permalink
yolov8 modify
Browse files Browse the repository at this point in the history
  • Loading branch information
floveqq committed May 14, 2023
1 parent 4546815 commit 0002ef5
Show file tree
Hide file tree
Showing 8 changed files with 602 additions and 126 deletions.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

448 changes: 448 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
@@ -1,5 +1,5 @@
architecture: YOLOv8
norm_type: sync_bn
#norm_type: sync_bn
use_ema: True
ema_decay: 0.9999
ema_decay_type: "exponential"
Expand Down
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 0002ef5

Please sign in to comment.