Skip to content

Albumentations 1.4.15 Release Notes

Compare
Choose a tag to compare
@ternaus ternaus released this 13 Sep 01:54
· 113 commits to main since this release
c0af803
  • Support Our Work
  • UI Tool
  • Core
  • Transforms
  • Improvements and Bug Fixes

Support Our Work

  1. Love the library? You can contribute to its development by becoming a sponsor for the library. Your support is invaluable, and every contribution makes a difference.
  2. Haven't starred our repo yet? Show your support with a ⭐! It's just only one mouse click away.
  3. Got ideas or facing issues? We'd love to hear from you. Share your thoughts in our issues or join the conversation on our Discord server

UI Tool

For visual debug wrote a tool that allows visually inspect effects of augmentations on the image.

You can find it at https://explore.albumentations.ai/

RIght now supports only ImageOnly transforms, and not all but a subset of them.

it is work in progress. It is not stable and polished yet, but if you have feedback or proposals - just write in the Discord Server mentioned above.

Screenshot 2024-09-12 at 18 11 49

Core

Bounding box and keypoint processing was vectorized

  • You can pass numpy array to compose and not only list of lists.
  • Presumably transforms will work faster, but did not benchmark.

Transforms

Affine

  • Reflection padding correctly works In Affine and ShiftScaleRotate

CLAHE

  • Added support for float32 images

Equalize

  • Added support for float32 images

FancyPCA

  • Added support for float32 images
  • Added support for any number of channels

PixelDistributionAdaptation

  • Added support for float32
  • Added support for anyu number of channels

Flip

Still works, but deprecated. It was a very strange transform, I cannot find use case, where you needed to use it.

It was equivalent to:

OneOf([Transpose, VerticalFlip, HorizontalFlip]) 

Most likely if you needed transform that does not create artifacts, you should look at:

  • Natural images => HorizontalFlip (Symmetry group has 2 elements, meaning will effectively increase your dataset 2x)
  • Images that look natural when you vertically flip them => VerticalFlip (Symmetry group has 2 elements, meaning will effectively increase your dataset 2x)
  • Images that need to preserve parity, for example texts, but we may expect rotated documents => RandomRotate90 (Symmetry group has 2 elements, meaning will effectively increase your dataset 4x)
  • Images that you can flip and rotate as you wish => D4 (Symmetry group has 8 elements, meaning will effectively increase your dataset 8x)

ToGray

Now you can define the number of output channels in the resulting gray image. All channels will be the same.

Extended ways one can get grayscale image. Most of them can work with any number of channels as input

  • weighted_average: Uses a weighted sum of RGB channels (0.299R + 0.587G + 0.114B)
    Works only with 3-channel images. Provides realistic results based on human perception.
  • from_lab: Extracts the L channel from the LAB color space.
    Works only with 3-channel images. Gives perceptually uniform results.
  • desaturation: Averages the maximum and minimum values across channels.
    Works with any number of channels. Fast but may not preserve perceived brightness well.
  • average: Simple average of all channels.
    Works with any number of channels. Fast but may not give realistic results.
  • max: Takes the maximum value across all channels.
    Works with any number of channels. Tends to produce brighter results.
  • pca: Applies Principal Component Analysis to reduce channels.
    Works with any number of channels. Can preserve more information but is computationally intensive.

SafeRotate

Now uses Affine under the hood.

Improvements and Bug Fixes

  • Bugfix in GridElasticDeform by @4pygmalion
  • Speedups in to_float and from_float
  • Bugfix in PadIfNeeded. Did not work when empty bounding boxes were passed.