Closed wwdok closed 3 years ago
Hello @wwdok, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com.
Augmentation hyperparameters are located here: https://github.com/ultralytics/yolov5/blob/83deec133d62021b496ba6cc475c38e717098053/data/hyp.scratch.yaml#L1-L33
@glenn-jocher Sorry, i find my repo is out of date, the newest repo already has fliplr hypeparameter ! Thanks !
@wwdok ah, you should git pull
often, as repo changes nightly.
@wwdok ah, you should
git pull
often, as repo changes nightly.
Hi, bro, I find in the train.py
of 3 months ago, there is mixed_precision
, but now i find the latest train.py
does not include mixed_precision
, why was it cancelled ?
@wwdok mixed precision is integrated by default now.
@glenn-jocher Great ! π
So in every epochs the data will be augmented according to the probability?
@LogicNg yes every mosaic.
I have a question about the augmentations. I don't understand how the HSV augmentations are generated. For example, we have: hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
What does this do? Is this changing the saturation to 70% of the original? Or is it Β± 70%, so 30% and 170%? Or is it a 0.7 probability that the saturation will change? If so, how much will it change by? Will it both increase and decrease? Will it affect every image?
Also, for the image rotations, if I put 90, will that be clockwise or anticlockwise?
Thank you
@julian-douglas augmentations are defined in your hyperparameter file and implemented in datasets.py. Albumentations may be added additionally, see Albumentations PR.
Thanks for your code.
Does the "degree" in hyperparameter files mean rotation augmentation? And what is the range of "degree"?
Thanks.
@RainbowSun11Q2H π Hello! Thanks for asking about image augmentation. degree
limits are +/- 180
YOLOv5 π applies online imagespace and colorspace augmentations in the trainloader (but not the val_loader) to present a new and unique augmented Mosaic (original image + 3 random images) each time an image is loaded for training. Images are never presented twice in the same way.
The hyperparameters used to define these augmentations are in your hyperparameter file (default data/hyp.scratch.yaml
) defined when training:
python train.py --hyp hyp.scratch-low.yaml
You can view the effect of your augmentation policy in your train_batch*.jpg images once training starts. These images will be in your train logging directory, typically yolov5/runs/train/exp
:
train_batch0.jpg
shows train batch 0 mosaics and labels:
YOLOv5 π is now fully integrated with Albumentations, a popular open-source image augmentation package. Now you can train the world's best Vision AI models even better with custom Albumentations π!
PR https://github.com/ultralytics/yolov5/pull/3882 implements this integration, which will automatically apply Albumentations transforms during YOLOv5 training if albumentations>=1.0.3
is installed in your environment. See https://github.com/ultralytics/yolov5/pull/3882 for full details.
Example train_batch0.jpg
on COCO128 dataset with Blur, MedianBlur and ToGray. See the YOLOv5 Notebooks to reproduce:
Good luck π and let us know if you have any other questions!
Can I indicate how many images exactly to be generated. I have a small dataset and I want to augment it *10, I searched in the code and didn't find where to do it. is there a possibility to do so ?
@Bara-Elba π Hello! Thanks for asking about image augmentation. YOLOv5 π applies online imagespace and colorspace augmentations in the trainloader (but not the val_loader) to present a new and unique augmented Mosaic (original image + 3 random images) each time an image is loaded for training. Images are never presented twice in the same way.
The hyperparameters used to define these augmentations are in your hyperparameter file (default data/hyp.scratch.yaml
) defined when training:
python train.py --hyp hyp.scratch-low.yaml
You can view the effect of your augmentation policy in your train_batch*.jpg images once training starts. These images will be in your train logging directory, typically yolov5/runs/train/exp
:
train_batch0.jpg
shows train batch 0 mosaics and labels:
YOLOv5 π is now fully integrated with Albumentations, a popular open-source image augmentation package. Now you can train the world's best Vision AI models even better with custom Albumentations π!
PR https://github.com/ultralytics/yolov5/pull/3882 implements this integration, which will automatically apply Albumentations transforms during YOLOv5 training if albumentations>=1.0.3
is installed in your environment. See https://github.com/ultralytics/yolov5/pull/3882 for full details.
Example train_batch0.jpg
on COCO128 dataset with Blur, MedianBlur and ToGray. See the YOLOv5 Notebooks to reproduce:
Good luck π and let us know if you have any other questions!
βQuestion
I see some basic data augmentations in train.py, but i don't see flip horizontally and mosaic and so on, so does yolov5 support other more data augmentations ?