This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Albumentations 2.0.6 Release Notes
- Support Our Work
- Transforms
- Speedups
- Bug fixes
Support Our Work
- Help Us Grow - If you find value in Albumentations, consider becoming a sponsor. Every contribution, no matter the size, helps us maintain and improve the library for everyone.
- Show Your Support - If you enjoy using Albumentations, consider giving us a ⭐ on GitHub. It helps others discover the library and motivates our team.
- Join Our Community - Have suggestions or ran into issues? We welcome your input! Share your experience in our GitHub issues or connect with us on Discord.
Transforms
New transform Mosaic
Generalization of Mosaic from Ultralitics and YOLO4, and works per image an not on "batch" => can choose what additional images to pass, could be hard or rare classes.
Core
SomeOf
Changed functionality to a more intuituve
Now it works as:
- Select
ntransforms with equal probability - Apply each of them with the probability of each transform
Passing bounding bbox labels
Removed to pass labels when apply to bounding boxes.
In [9]: bboxes = np.array([[0.2, 0.2, 0.4, 0.4], [0.3, 0.4, 0.7, 0.9]])
In [10]: transform = A.Compose([A.HorizontalFlip(p=1)], bbox_params={"format": "albumentations"})
In [11]: image = np.random.rand(640, 640, 3)
In [12]: transformed = transform(image=image, bboxes=bboxes)=> we can just pass coordinates, without bounding box labels
Speedups
When applied to uint images on 1 CPU core Albumentations outperforms Kornia and torchvision: Image benchmark
But when we compare:
- Videos
- Albumentations on 1 CPU core vs kornia and torchvision on GTX 4090
Albumentations has a lot to improve.
Benchmark on videos
=>
Speedups on videos in this release:
- HorizontalFlip
- VerticalFlip
- RandomRotate90
- ChannelShuffle
- Crop
- RandomCrop
- CenterCrop
Bugfixes
- Bugfix in RandomRain,
drop_lengthwas not used before - BugFix in ElasticTransform Added back fill and fill_mask parameters as for extreme deformations they become useful. Also switched kernels for
exactandapproximatemode - Fix in docsting by @nicolasj92
- Cleanup in composition module by @dmsy4