Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determining hyperparameters for data augmentation #852

Closed
klock18 opened this issue Aug 27, 2020 · 2 comments
Closed

Determining hyperparameters for data augmentation #852

klock18 opened this issue Aug 27, 2020 · 2 comments
Labels
question Further information is requested

Comments

@klock18
Copy link

klock18 commented Aug 27, 2020

❔Question

Hi!

Just wondering if someone could please point me towards code/resources to find out where/how YOLOv5 determines the following parameters for data augmentation:

image

Additional context

@klock18 klock18 added the question Further information is requested label Aug 27, 2020
@glenn-jocher
Copy link
Member

# Hyperparameters for VOC fine-tuning
# python train.py --batch 64 --cfg '' --weights yolov5m.pt --data voc.yaml --img 512 --epochs 50
# See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
momentum: 0.94 # SGD momentum/Adam beta1
weight_decay: 0.0005 # optimizer weight decay 5e-4
giou: 0.05 # GIoU loss gain
cls: 0.4 # cls loss gain
cls_pw: 1.0 # cls BCELoss positive_weight
obj: 0.5 # obj loss gain (scale with pixels)
obj_pw: 1.0 # obj BCELoss positive_weight
iou_t: 0.20 # IoU training threshold
anchor_t: 4.0 # anchor-multiple threshold
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
degrees: 1.0 # image rotation (+/- deg)
translate: 0.1 # image translation (+/- fraction)
scale: 0.6 # image scale (+/- gain)
shear: 1.0 # image shear (+/- deg)
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
flipud: 0.01 # image flip up-down (probability)
fliplr: 0.5 # image flip left-right (probability)
mixup: 0.2 # image mixup (probability)

@klock18
Copy link
Author

klock18 commented Aug 27, 2020

Thanks for your quick reply, found this which is a great read for anyone going down a similar line of inquiry https://docs.ultralytics.com/yolov5/tutorials/hyperparameter_evolution

@klock18 klock18 closed this as completed Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants