Repository navigation
YOLOv5 + Albumentations integration - #3882
Merged
Merged
Conversation
Closed
Closed
Closed
This was referenced Jul 4, 2021
Closed
Member
Author
|
/rebase |
github-actions
Bot
force-pushed
the
feature/albumentations
branch
from
July 5, 2021 10:53
4139fec to
21c96cf
Compare
Member
Author
|
/rebase |
|
Something like this if I just want mosaic, right? |
Member
Author
|
yes |
This was referenced Apr 24, 2022
This was referenced May 8, 2022
1 task done
This was referenced May 28, 2022
Closed
This was referenced Jun 6, 2022
This was referenced Jun 13, 2022
1 task done
This was referenced Jul 7, 2022
1 task done
1 task done
1 task done
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
* 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
Closed
1 task done
1 task done
Closed
1 task done
1 task done
1 task done
1 task done
1 task done
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.3is installed in your environment.Get Started
To use albumentations simply
pip install -U albumentationsand then update the augmentation pipeline as you see fit in the newAlbumentationsclass 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.jpgon COCO128 dataset with Blur, MedianBlur and ToGray. See the YOLOv5 Notebooks to reproduce:Update
To receive this YOLOv5 update:
git pullfrom within youryolov5/directory orgit clone https://github.com/ultralytics/yolov5againmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)sudo docker pull ultralytics/yolov5:latestto 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.txtas an optional dependency.Albumentationsclass created inaugmentations.pyto handle advanced image augmentation techniques.utils/datasets.pyif augmentations are enabled.utils/general.py.🎯 Purpose & Impact