Skip to content

Releases: albumentations-team/albumentations

0.5.0

19 Oct 18:34
0ddc83b
Compare
Choose a tag to compare

Breaking changes

  • Albumentations now explicitly checks that all inputs to augmentations are named arguments and raise an exception otherwise. So if an augmentation receives input like aug(image) instead of aug(image=image), Albumentations will raise an exception. (#560)
  • Dropped support of Python 3.5 (#709)
  • Keypoints and bboxes are checked for visibility after each transform (#566)

New transformations

  • A.FDA transform for Fourier-based domain adaptation. (#685)
  • A.HistogramMatching transform that applies histogram matching. (#708)
  • A.ColorJitter transform that behaves similarly to ColorJitter from torchvision (though there are some minor differences due to different internal logic for working with HSV colorspace in Pillow, which is used in torchvision and OpenCV, which is used in Albumentations). (#705)

Minor changes

  • A.PadIfNeeded now accepts additional pad_width_divisor, pad_height_divisor (None by default) to ensure image has width & height that is dividable by given values. (#700)
  • Added support to apply A.CoarseDropout to masks via mask_fill_value. (#699)
  • A.GaussianBlur now supports the sigma parameter that sets standard deviation for Gaussian kernel. (#674, #673) .

Bugfixes

0.4.6

19 Jul 14:49
70452cd
Compare
Choose a tag to compare

Improvements

  • Change the ImgAug dependency version from “imgaug>=0.2.5,<0.2.7” to “imgaug>=0.4.0". Now Albumentations won’t downgrade your existing ImgAug installation to the old version. PR #658.
  • Do not try to resize an image if it already has the required height and width. That eliminates the redundant call to the OpenCV function that requires additional copying of the input data. PR #639.
    ReplayCompose is now serializable. PR #623 by IlyaOvodov
  • Documentation fixes and updates.

Bug Fixes

  • Fix a bug that causes some keypoints and bounding boxes to lie outside the visible part of the augmented image if an augmentation pipeline contained augmentations that increase the height and width of an image (such as PadIfNeeded). That happened because Albumentations checked which bounding boxes and keypoints lie outside the image only after applying all augmentations. Now Albumentations will check and remove keypoints and bounding boxes that lie outside the image after each augmentation. If, for some reason, you need the old behavior, pass check_each_transform=False in your KeypointParams or BboxParams. Issue #565 and PR #566.
  • Fix a bug that causes an exception when Albumentations received images with the number of color channels that are even but are not multiples of 4 (such as 6, 10, etc.). PR #638.
  • Fix the off-by-one error in applying steps for GridDistortion. Commit 9c225a9
  • Fix bugs that prevent serialization of ImageCompression and GaussNoise. PR #569
  • Fix a bug that causes errors with some values for label_fields in BboxParams. PR #504 by IlyaOvodov
  • Fix a bug that prevents HueSaturationValue for working with grayscale images. PR #500.

0.4.0

14 Oct 17:02
Compare
Choose a tag to compare

Table of Contents

New transforms

ISONoise

2e25667
Target: image

This transform mimics the noise that images will have if the ISO parameter of the camera is high. Wiki

Solarize

e365b52
Targets: image

Solarize inverts all pixels above some threshold. It is an essential part of the work AutoAugment: Learning Augmentation Policies from Data.

Equilize

9f71038
Target: image

Equalizes image histogram. It is an essential part of the work AutoAugment: Learning Augmentation Policies from Data.

Posterize

ad95fa0
Target: image

Reduce the number of bits for each pixel. It is an essential part of the work AutoAugment: Learning Augmentation Policies from Data.

ImageCompression

Target: image
b612786
Decrease Jpeg or WebP compression to the image.

Downscale

df831d6
Target: image

Decreases image quality by downscaling and upscaling back.

RandomResizedCrop

4dbe41e
Targets: image, mask, bboxes, keypoints

Crop the given Image to the random size and aspect ratio. This transform is an essential part of many image classification pipelines. Very popular for ImageNet classification.

It has the same API as RandomResizedCrop in torchvision.

RandomGridShuffle

4cf6c36
Targets: image, mask

Partition an image into tiles. Shuffle them and merge back.

CropNonEmptyMaskIfExists

Targets: image, mask, bboxes, keypoints

Crop area with a mask if the mask is non-empty, else make a random crop.

ToTensorV2

a502680
Targets: image, mask

Convert image and mask to torch.Tensor

New features

Added YOLO format to bounding boxes.

d05db9e

The Yolo format of a bounding box has a format [x, y, width, height], where values normalized to the size of the image. Ex: [0.3, 0.1, 0.05, 0.07]

Added Deterministic / Replay mode

9942689

Augmentations pipeline has a lot of randomnesses, which is hard to debug. We added Determentsic / Replay mode in which you can track what parameters were applied to the input and use precisely the same transform to another input if necessary.

Jupyter notebook with an example.

Added fill_value to the Cutout transform.

d85bab5

Separated fill_value for images and masks

2c1a148

One of the use cases is it to use mask_value, which is equal to the ignore_index of your loss. This will decrease the level of noise and may improve convergence.

Speedup in the RGBShift

c3cc277

3.2 times faster for uint8 images.

Speedup in HueSaturationValue

448761d

2 times faster for uint8 images.

Speedup in [RandomBrightnessContrast](https://albumentations.readthedocs.io/en/latest/api/augmentations.html#albumentations.augmentations.transforms.RandomBrightnessCont...

Read more

0.3.0 Release

26 Jun 19:35
eec2097
Compare
Choose a tag to compare

Added serialization / deserialization

  • Now we can define transformations in a python dictionary, json, yaml files and they will be deserialized and used in the code.
  • Now we can define transformations in the code and serialize them in python dictionary, json and yaml files.

Jupyter notebook with an example

Special thanks to @creafz

Added new transformations

Special thanks to @vfdev-5 @ternaus @BloodAxe @kirillbobyrev

Bugfixes and improvements

Special thanks to @qubvel @ternaus @albu @BloodAxe

0.2.0 Release

04 Mar 19:31
Compare
Choose a tag to compare

Added support for the keypoint transformations to

Notebook with an example

Special thanks to the Evegene Khvedchenya (@BloodAxe) for the work.

Added an option to apply the same transformation to the more than one target of the same type.

The possible use case are image2image or stereo-image pipelines.

Notebook with an example

Special thanks to Alexander Buslaev (@albu) for the work.

Added new transformations

Speed up in

Bug fixes

And many others.

Additional

  • Performance benchmark was extended to the Augmentor and Solt libraries.
  • Added table to Readme that shows all implemented transformations with the set of possible targets: images, bounding boxes, masks, key points. (Special thanks to Alex Parinov @creafz )
  • The library can be installed in anaconda.

Contributors

@BloodAxe @albu @creafz @ternaus @erikgaas @marcocaccin @libfun @DBusAI @alexobednikov @StrikerRUS @IlyaOvodov @ZFTurbo @Vcv85 @georgymironov @LinaShiryaeva @vfdev-5 @daisukelab @cdicle

Extended bounding boxes support. New transformations. New notebooks with examples. A lot of bugfixes.

26 Sep 12:06
c16c15d
Compare
Choose a tag to compare

Bounding boxes support

Transformations that support bounding boxes

The main change in this release is the addition of the operations on bounding boxes to the

Supported formats

Currently supported the following formats for the bounding boxes:

  1. COCO: [x_min, y_min, width, height], ex [97, 12, 150, 200]
  2. Pascal VOC: [x_min, y_min, x_max, y_max], ex [97, 12, 247, 212]

Bounding box filtering

It may happen that after the transformation a big part of the bounding box was cropped and it is needed to exclude such boxes.

We support such a bounding box filtering based on the:

  • Bounding box area, measured in pixels.
  • Visible box area, measured in percent.

Smaller changes

  • Added support for 8-bit images.
  • We changed all np.random occurrences to random due to the numpy behavior reported in pytorch/pytorch#5059
  • Multiple bugfixes.

Added notebooks with examples