-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
YOLOv5 + Albumentations integration #3882
Conversation
/rebase |
4139fec
to
21c96cf
Compare
/rebase |
Something like this if I just want mosaic, right? |
yes |
* Albumentations integration * ToGray p=0.01 * print confirmation * create instance in dataloader init method * improved version handling * transform not defined fix * assert string update * create check_version() * add spaces * update class comment
I'm super excited to announce our new YOLOv5 🚀 + Albumentations integration!! Now you can train the world's best Vision AI models even better with custom Albumentations automatically applied 😃!
PR #3882 implements this integration, which will automatically apply Albumentations transforms during YOLOv5 training if
albumentations>=1.0.3
is installed in your environment.Get Started
To use albumentations simply
pip install -U albumentations
and then update the augmentation pipeline as you see fit in the newAlbumentations
class inyolov5/utils/augmentations.py
. Note these Albumentations operations run in addition to the YOLOv5 hyperparameter augmentations, i.e. defined in hyp.scratch.yaml.Here's an example that applies Blur, MedianBlur and ToGray albumentations in addition to the YOLOv5 hyperparameter augmentations normally applied to your training mosaics :)
Example Result
Example
train_batch0.jpg
on COCO128 dataset with Blur, MedianBlur and ToGray. See the YOLOv5 Notebooks to reproduce:Update
To receive this YOLOv5 update:
git pull
from within youryolov5/
directory orgit clone https://github.com/ultralytics/yolov5
againmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
sudo docker pull ultralytics/yolov5:latest
to update your imageThank you for your feedback and let us know if this update works for you, and of course feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀 + Albumentations!
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced image augmentation with Albumentations integration in YOLOv5
📊 Key Changes
requirements.txt
as an optional dependency.Albumentations
class created inaugmentations.py
to handle advanced image augmentation techniques.utils/datasets.py
if augmentations are enabled.utils/general.py
.🎯 Purpose & Impact