github albumentations-team/albumentations 1.4.5
Albumentations 1.4.5 Release Notes

latest releases: 1.4.21, 1.4.20, 1.4.19...
6 months ago
  • Support our work
  • Highlights
  • Deprecations
  • 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.
  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 for Albumentations

Highlights

Bbox clipping

Before version 1.4.5 it was assumed that bounding boxes that are fed into the augmentation pipeline should not extend outside of the image.

Now we added an option to clip boxes to the image size before augmenting them. This makes pipeline more robust to inaccurate labeling

Example:

Will fail if boxes extend outside of the image:

transform = A.Compose([    
    A.HorizontalFlip(p=0.5)    
], bbox_params=A.BboxParams(format='coco'))

Clipping bounding boxes to the image size:

transform = A.Compose([    
    A.HorizontalFlip(p=0.5)    
], bbox_params=A.BboxParams(format='coco', clip=True))

by @ternaus

SelectiveChannelTransform

Added SelectiveChannelTransform that allows to apply transforms to a selected number of channels.

For example it could be helpful when working with multispectral images, when RGB is a subset of the overall multispectral stack which is common when working with satellite imagery.

Example:

aug = A.Compose(
        [A.HorizontalFlip(p=0.5),
        A.SelectiveChannelTransform(transforms=[A.ColorJItter(p=0.5),
        A.ChromaticAberration(p=0.5))], channels=[1, 2, 18], p=1)],
    )

Here HorizontalFlip applied to the whole multispectral image, but pipeline of ColorJitter and ChromaticAberration only to channels [1, 2, 18]

by @ternaus

Deprecations

CoarseDropout

Old way:

transform = A.Compose([A.CoarseDropout(
  min_holes = 5,
  max_holes = 8,
  min_width = 3,
  max_width = 12,
  min_height = 4,
  max_height = 5
)])

New way:

transform = A.Compose([A.CoarseDropout(
  num_holes_range=(5, 8),
  hole_width_range=(3, 12),
  hole_height_range=(4, 5)
)])

As of now both ways work and will provide the same result, but old functionality will be removed in later releases.

@ternaus

Improvements and bug fixes

Don't miss a new albumentations release

NewReleases is sending notifications on new releases.