Release notes¶
Albumentations 1.4.1 Release Notes (4 March 2024)¶
- Request
- Highlights
- New transform
- Improvements
- Bug fixes
Request¶
- If you enjoy using the library as an individual developer or during the day job as a part of the company, please consider becoming a sponsor for the library. Every dollar helps.
- If you did not give our repo a ⭐, it is only one mouse click
- If you have feature requests or proposals or encounter issues - submit your request to issues or our new initiative, - Discord server for albumentations
New transform¶
- Added
MixUp
transform: which linearly combines an input (image, mask, and class label) with another set from a predefined reference dataset. The mixing degree is controlled by a parameter λ (lambda), sampled from a Beta distribution. This method is known for improving model generalization by promoting linear behavior between classes and smoothing decision boundaries.
Minor changes and Bug Fixes¶
- Moved from
isort
,flake8
,black
toruff
- Added extra checks for docstrings to match Google Style.
- Updated Who's using
- Removed quidda dependency, which addresses
opencv
library inconsistencies issues - New, updated version of benchmark.
Albumentations 1.4.0 Release Notes (17 February 2024)¶
- Request
- Highlights
- New transform
- Backwards Incompatible Changes
- Improvements
- Bug fixes
Request¶
- If you enjoy using the library as an individual developer or during the day job as a part of the company, please consider becoming a sponsor for the library. Every dollar helps.
- If you did not give our repo a ⭐, it is [only one mouse click].(https://github.com/albumentations-team/albumentations)
- If you have feature requests, proposals, or encounter issues - submit your request to issues or, our new initiative, - Discord server for albumentations
Highlights¶
In this release, we mainly focused on the technical debt as its decrease allows faster iterations and bug fixes in the codebase. We added only one new transform, did not work on speeding up transforms, and other changes are minor.
- We are removing the dependency on the imgaug library. The library was one of our inspirations when we created Albumentations, but maintainers of imgaug ceased its support which caused inconsistencies in library versions. It was done in 2021, say commit https://github.com/albumentations-team/albumentations/commit/ba44effb0369ba5eae1e8eb4909105eac9709230 by @Dipet .
But, somehow, we are cutting this dependency only in 2024.
- Added typing in all of the codebase. When we started the library, Python 2 was still widely used; hence, none of the original codebases had types specified for function arguments and return types. Since the end of the support for Python 2, we added types to the new or updated code, but only now have we covered all the codebase.
New transform¶
- Added
XYMasking
transform: applies masking strips to an image, either horizontally (X axis) or vertically (Y axis), simulating occlusions. This transform is helpful for training models to recognize images with varied visibility conditions. It's particularly effective for spectrogram images, allowing spectral and frequency masking to improve model robustness. As other dropout transforms CoarseDropout, MaskDropout, GridDropout it supports images, masks and keypoints as targets. (https://github.com/albumentations-team/albumentations/commit/004fabbf90794fbc21ee356e2dde6637b7fecbd4 by @ternaus )
Backward Incompatible Changes¶
The deprecated code, including 15 transforms, was removed. Dependency on the imgaug library was removed.
(https://github.com/albumentations-team/albumentations/commit/be6a217b207b3d7ebe792caabb438d660b45f2a5 by @ternaus )
Deleted Transforms¶
JpegCompression
. Use ImageCompression instead.RandomBrightness
. Use RandomBrigtnessContrast instead.RandomContrast
. Use RandomBrigtnessContrast instead.Cutout
. Use CoarseDropout instead.ToTensor
. Use ToTensorV2 instead.IAAAdditiveGaussianNoise
. Use GaussNoise instead.IAAAffine
. Use Affine instead.- IAACropAndPad. Use CropAndPad instead.
IAAEmboss
. Use Emboss instead.IAAFliplr
. Use HorizontalFlip instead.IAAFlipud
. Use VerticalFlip instead.IAAPerspective
. Use Perspective instead.IAAPiecewiseAffine
. Use PiecewiseAffine instead.IAASharpen
. Use Sharpen instead.IAASuperpixels
. Use Superpixels instead.
Other deprecated functionality¶
- Removed
eps
parameter in RandomGamma - Removed
lambda_transforms
inserialization.from_dict
function.
## Minor changes and Bug Fixes
* Added details Contributor's guide
* Added support for matrix=None
case for Piecewise affine transform (https://github.com/albumentations-team/albumentations/commit/c70e664e060bfd7463c20674927aed217f72d437 @Dipet )
* Bugfix - Eliminated the possibility of the Perspective transform collapsing (https://github.com/albumentations-team/albumentations/commit/a919a772d763e0c62b674ca490a97c89e0b9c5a3 @alicangok )
* Fixes in docstrings (@domef, @aaronzs, @Dipet, @ternaus )
* Added checks for python 3.12
0.5.2 (29 November 2020)¶
Minor changes¶
- ToTensorV2 now automatically expands grayscale images with the shape
[H, W]
to the shape[H, W, 1]
. PR #604 by @Ingwar. - CropNonEmptyMaskIfExists now also works with multiple masks that are provided by the
masks
argument to the transform function. Previously this augmentation worked only with a single mask provided by themask
argument. PR #761.
0.5.1 (2 November 2020)¶
Breaking changes¶
- API for
A.FDA
is changed to resemble API ofA.HistogramMatching
. Now, both transformations expect to receive a list of reference images, a function to read those image, and additional augmentation parameters. (#734) A.HistogramMatching
now usesread_rgb_image
as a defaultread_fn
. This function reads an image from the disk as an RGB NumPy array. Previously, the defaultread_fn
wascv2.imread
which read an image as a BGR NumPy array. (#734)
New transformations¶
A.Sequential
transform that can apply augmentations in a sequence. This transform is not intended to be a replacement forA.Compose
. Instead, it should be used insideA.Compose
the same wayA.OneOf
orA.OneOrOther
. For instance, you can combineA.OneOf
withA.Sequential
to create an augmentation pipeline containing multiple sequences of augmentations and apply one randomly chosen sequence to input data. (#735)
Minor changes¶
A.ShiftScaleRotate
now has two additional optional parameters:shift_limit_x
andshift_limit_y
. If either of those parameters (or both of them) is setA.ShiftScaleRotate
will use the set values to shift images on the respective axis. (#735)A.ToTensorV2
now supports an additional argumenttranspose_mask
(False
by default). If the argument is set toTrue
and an input mask has 3 dimensions,A.ToTensorV2
will transpose dimensions of a mask tensor in addition to transposing dimensions of an image tensor. (#735)
Bugfixes¶
A.FDA
now correctly uses coordinates of the center of an image. (#730)- Fixed problems with grayscale images for
A.HistogramMatching
. (#734) - Fixed a bug that led to an exception when
A.load()
was called to deserialize a pipeline that containedA.ToTensor
orA.ToTensorV2
, but those transforms were not imported in the code before the call. (#735)
0.5.0 (19 October 2020)¶
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 toColorJitter
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 additionalpad_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 viamask_fill_value
. (#699) A.GaussianBlur
now supports the sigma parameter that sets standard deviation for Gaussian kernel. (#674, #673) .
Bugfixes¶
- Fixed bugs in
A.HueSaturationValue
for float dtype. (#696, #710) - Fixed incorrect rounding error on bboxes in
YOLO
format. (#688)
0.4.6 (19 July 2020)¶
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, passcheck_each_transform=False
in yourKeypointParams
orBboxParams
. 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
andGaussNoise
. PR #569 - Fix a bug that causes errors with some values for
label_fields
inBboxParams
. PR #504 by IlyaOvodov - Fix a bug that prevents HueSaturationValue for working with grayscale images. PR #500.