Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Albumentations 2.0.6 Release Notes

Choose a tag to compare

@ternaus ternaus released this 29 Apr 01:37
· 38 commits to main since this release
649fa0d
  • Support Our Work
  • Transforms
  • Speedups
  • Bug fixes

Support Our Work

  1. 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.
  2. Show Your Support - If you enjoy using Albumentations, consider giving us a ⭐ on GitHub. It helps others discover the library and motivates our team.
  3. 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

Screenshot 2025-04-28 at 6 33 47 PM

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.

by @Shysto and @ternaus

Core

SomeOf

Changed functionality to a more intuituve

Now it works as:

  1. Select n transforms with equal probability
  2. 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_length was not used before
  • BugFix in ElasticTransform Added back fill and fill_mask parameters as for extreme deformations they become useful. Also switched kernels for exact and approximate mode
  • Fix in docsting by @nicolasj92
  • Cleanup in composition module by @dmsy4