Skip to content

Commit

Permalink
speed up yolov7 training
Browse files Browse the repository at this point in the history
  • Loading branch information
nemonameless committed Dec 13, 2022
1 parent e878f99 commit 46507d0
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 174 deletions.
10 changes: 6 additions & 4 deletions configs/yolov7/_base_/yolov7_reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ input_width: &input_width 640
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 300

worker_num: 8
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {target_size: *input_size, mosaic_prob: 1.0, mixup_prob: 0.15, paste_in_prob: 0.15, translate: 0.2, scale: 0.9}
- MosaicPerspective: {mosaic_prob: 1.0, target_size: *input_size, mixup_prob: 0.15, paste_in_prob: 0.15, translate: 0.2, scale: 0.9}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
- BboxXYXY2XYWH: {}
- NormalizeBox: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 32
shuffle: True
drop_last: False
use_shared_memory: False
collate_batch: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch


Expand Down
10 changes: 6 additions & 4 deletions configs/yolov7/_base_/yolov7_tiny_reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ input_width: &input_width 640
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 300

worker_num: 8
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {target_size: *input_size, mosaic_prob: 1.0, mixup_prob: 0.05, paste_in_prob: 0.05, translate: 0.1, scale: 0.5}
- MosaicPerspective: {mosaic_prob: 1.0, target_size: *input_size, mixup_prob: 0.05, paste_in_prob: 0.05, translate: 0.1, scale: 0.5}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
- BboxXYXY2XYWH: {}
- NormalizeBox: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 32
shuffle: True
drop_last: False
use_shared_memory: False
collate_batch: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch


Expand Down
10 changes: 6 additions & 4 deletions configs/yolov7/_base_/yolov7p6_reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ input_width: &input_width 1280
input_size: &input_size [*input_height, *input_width]
mosaic_epoch: &mosaic_epoch 300

worker_num: 8
worker_num: 4
TrainReader:
sample_transforms:
- Decode: {}
- MosaicPerspective: {target_size: *input_size, mosaic_prob: 1.0, mixup_prob: 0.15, paste_in_prob: 0.15, translate: 0.2, scale: 0.9}
- MosaicPerspective: {mosaic_prob: 1.0, target_size: *input_size, mixup_prob: 0.15, paste_in_prob: 0.15, translate: 0.2, scale: 0.9}
- RandomHSV: {hgain: 0.015, sgain: 0.7, vgain: 0.4}
- RandomFlip: {}
- BboxXYXY2XYWH: {}
- NormalizeBox: {}
batch_transforms:
- NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none}
- Permute: {}
- PadGT: {}
batch_size: 16
shuffle: True
drop_last: False
use_shared_memory: False
collate_batch: False
use_shared_memory: True
collate_batch: True
mosaic_epoch: *mosaic_epoch


Expand Down
Loading

0 comments on commit 46507d0

Please sign in to comment.