Albumentations Versions Save

Fast image augmentation library and an easy-to-use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about the library: https://www.mdpi.com/2078-2489/11/2/125

1.4.3

2 weeks ago

Albumentations 1.4.3 Release Notes

  • Request
  • Highlights
  • New transform
  • Minor 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

New transform

Screenshot 2024-04-02 at 18 43 51
  • Added Morphological transform that modifies the structure of the image. Dilation expands the white (foreground) regions in a binary or grayscale image, while erosion shrinks them.

Minor improvements and bug fixes

  • Updated benchmark for uint8 images, processed on CPU. Added Kornia and Augly. LINK by @ternaus
  • Bugfix in FDA transform by @ternaus
  • Now RandomSizedCrop supports the same signature as analogous transform in torchvision by @zetyquickly

1.4.2

1 month ago

Albumentations 1.4.2 Release Notes

  • Request
  • Highlights
  • New transform
  • New functionality
  • Improvements and bug fixes

Request

  1. If you enjoy using the library as an individual developer or as a representative of the company please consider becoming a sponsor for the library. Every dollar helps.
  2. If you did not give our repo a ⭐, it is only one mouse click
  3. If you have feature requests or proposals or encounter issues - submit your request to issues or ask in Discord server for Albumentations

New transform

Left: Original, Middle: Chromatic aberration (default args, mode="green_purple"), Right: Chromatic aberration (default args, mode="red_blue")
(Image is from our internal mobile mapping dataset)

  • Added ChromaticAbberation transform that adds chromatic distortion to the image. Wiki by @mrsmrynk

New functionality

  • Return mixing parameter for MixUp transform by @Dipet. For more details Tutorial on MixUp

Improvements and Bugfixes

  • Do not throw deprecation warning when people do not use deprecated parameters in AdvancedBlur by @Aloqeely
  • Updated CONTRIBUTORS.md for Windows users by @Aloqeely
  • Fixed Docstring for DownScale transform by @ryoryon66
  • Bugfix in PadIfNeeded serialization @ternaus

1.4.1

1 month ago

Albumentations 1.4.1 Release Notes

  • Request
  • Highlights
  • New transform
  • Improvements
  • Bug fixes

Request

  1. 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.
  2. If you did not give our repo a ⭐, it is only one mouse click
  3. 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

Screenshot 2024-03-04 at 14 52 15
  • 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 to ruff
  • 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.

1.4.0

2 months ago

Albumentations 1.4.0 Release Notes

  • Request
  • Highlights
  • New transform
  • Backwards Incompatible Changes
  • Improvements
  • Bug fixes

Request

  1. 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.
  2. If you did not give our repo a ⭐, it is [only one mouse click].(https://github.com/albumentations-team/albumentations)
  3. 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.

  1. 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.

  1. 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

Screenshot 2024-02-17 at 13 09 01

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

  1. JpegCompression. Use ImageCompression instead.
  2. RandomBrightness. Use RandomBrigtnessContrast instead.
  3. RandomContrast. Use RandomBrigtnessContrast instead.
  4. Cutout. Use CoarseDropout instead.
  5. ToTensor. Use ToTensorV2 instead.
  6. IAAAdditiveGaussianNoise. Use GaussNoise instead.
  7. IAAAffine. Use Affine instead.
  8. IAACropAndPad. Use CropAndPad instead.
  9. IAAEmboss. Use Emboss instead.
  10. IAAFliplr. Use HorizontalFlip instead.
  11. IAAFlipud. Use VerticalFlip instead.
  12. IAAPerspective. Use Perspective instead.
  13. IAAPiecewiseAffine. Use PiecewiseAffine instead.
  14. IAASharpen. Use Sharpen instead.
  15. IAASuperpixels. Use Superpixels instead.

Other deprecated functionality

  • Removed eps parameter in RandomGamma
  • Removed lambda_transformsin serialization.from_dict function.

Minor changes and Bug Fixes

1.3.1

10 months ago

image

New augmentations

  • ToRGB transform (#1323 by @kinoooshnik)
  • RandomGravel transform (#1365 by @onurtore)

Minor changes

  • Color parameter for Spatter (#1305 by @Andredance)
  • Check for image and masks shape equality (#1310 by @Andredance)
  • Filter out bounding boxes with width or height below parameters (#1327 by @jangop)
  • Added rotate_method in Affine (#1394 by @i-aki-y)

Bugfixes

  • Docs and types fixes (#1314 by @oguz-hanoglu, #1320 by @jangop, #1379 by @Dipet, #1403 by @NatanBagrov, #1400 by @ajinkyakhadilkar, #1343 by @plashchynski)
  • Fixed check when mask is ndarrray (#1326 by @farizrahman4u)
  • Fixed keypoint detection in hole for CoarseDropout (#1330 by @domef)
  • Fixed deprecated imports of scipy.ndimage.gaussian_filter (#1311 by @rbu)
  • Changed the sampling procedure of circles for RandomSunFlare (#1333 by @jasonrock-a3)
  • Fixed deprecationwarning in ToSepia transform (#1397 by @ifeherva)
  • Fixed skimage deprecetions (#1421 by @Dipet)
  • Python3.11 support fixes (#1426 by @Erotemic)

1.3.0

1 year ago

albu_1_3_0

Breaking changes

  • Renamed method to rotate_method inside Rotate to keep consistency between naming parameters. (#1258 by @Dipet, thanks to @MichaelMonashev)

New augmentations

  • RandomCropFromBorders - Crops image based on indents from image borders. (#1240 by @Dipet based on #476 by @ZFTurbo)
  • BBoxSafeRandomCrop - Crops image without loss of bboxes. Instead of RandomSizedBBoxSafeCrop this implementation do not apply resize to target size. (#579 by @SunQpark)
  • Spatter - Simulates corruption which can occlude a lens in the form of rain or mud. (#573 by @akarsakov)
  • Defocus - Imitates lens defocusing. (#551 by @akarsakov)
  • ZoomBlur - Imitates lens blur on zoomig. (#551 by @akarsakov)

Bugfixes

  • Fixed wrong result in RandomBrightnessContrast when brightness_by_max=False. (#487 by @Dipet)
  • Fixed wrong bbox clipping inside Perspective and Affine. (#1231 by @Dipet)
  • Fixed incorrect removal of bboxes when min_visibility=0 or min_visibility=1. (#616 by @IlyaOvodov)
  • Fixed wrong keypoint's cropping inside Rotate when crop_border=True. (#1250 by @Dipet, thanks to @jonkoi)
  • Fixed wrong propagation of always_apply Compose children. (#561 by @albu)
  • RandomSunFlare now correctly works with src_color, and use all three color values. (#1285 by @hoel-bagard)
  • RandomGamma now correctly works with float gamma_limit. (#1286 by @zahragolpa)

Minor changes:

  • Speeded up Normalize in some case up to 2 times. (#563 by @Dipet)
  • GridDistortion, ElasticTransform and OpticalDistortion now supports bbox targets. (#476, #1262 by @ZFTurbo and @Dipet)
  • MotionBlur now supports allow_shifted flag. When it's value is False only non shifted kernels generated. (#1239 by @Dipet)
  • Updated versions of type formatters. (#1245 by @ternaus)
  • GridDistortion now supports normalized flag. When it is set to True will be applied distortion inside image border. (#722 by @poke1024)
  • Now you can describe downscale and upscale interpolation method for Downscale. This is needed to avoid interpolation artefacts. (#584 by @nathanhubens)
  • Refactoring. Spatial transforms moved to geometric files. (#1241 by @ternaus)
  • Refactoring. Common functions moved into albumentations.augmentations.utils.py. (#1260 by @Dipet)
  • Refactoring. Blur transforms moved into albumentations.augmentations.blur. (#1259 by @Dipet)

1.2.1

1 year ago

175977113-5874a3f9-515b-42d3-a01f-73297934b912(2)

Minor changes

  • A.Rotate and A.ShiftScaleRotate now support new rotation method for bounding boxes, ellipse. (#1203 by @victor1cea)
  • A.Rotate now supports new argument crop_border. If set to True, the rotated image will be cropped as much as possible to eliminate pixel values at the edges that were not well defined after rotation. (#1214 by @bonlime)
  • Tests that use multiprocessing now run much faster (#1218 by @Dipet)
  • Improved type hints (#1219 by @Dipet )
  • Fixed a deprecation warning in match_histograms. (#1121 by @BloodAxe)

Bugfixes

  • A.CropNonEmptyMaskIfExists modified the first element of masks in-place. Now, this behavior is fixed and A.CropNonEmptyMaskIfExists doesn't do in-place modification of input masks. (#1193 by @ORippler).
  • Albumentations now correctly serialized and desirealized fill_value and mask_fill_value parameters for A.GridDropout. (#1191 by @victor1cea)
  • A.ColorJitter now correctly works with A.ReplayCompose. (#1199 by @zakajd)
  • Fixed incorrect behavior of A.ColorJitter for np.float32 input images when contrast is set to 0 (previously, all values were set to 0.5 instead of using the average value).. (#1207 by @Dipet)
  • A.Rotate, A.Affine and A.ShiftScaleRotate now do rotation in the same way. Fixed incorrect rotation angle for A.Affine. A.Rotate and A.ShiftScaleRotate now correctly rotate the keypoints 90 degrees and don't leave black lines around the edges of the image. (#1091 by @Dipet )

1.2.0

1 year ago

New augmentations

New augmentations

New augmentations:

  • A.UnsharpMask. This transform sharpens the input image using Unsharp Masking processing and overlays the result with the original image. (#1063 by @zakajd)
  • A.RingingOvershoot. This transform creates ringing or overshoot artifacts by convolving the image with a 2D sinc filter. (#1064 by @zakajd)
  • A.AdvancedBlur. This transform blurs the input image using a Generalized Normal filter with randomly selected parameters. It also adds multiplicative noise to generated kernel before convolution. (#1066 by @zakajd)
  • A.PixelDropout. This transformation randomly replaces pixels with the passed value. (#1082 by @Dipet)

Bugfixes

  • Fixed a problem that prevented A.RandomShadow from working with non-contiguous input. (#1117 by @i-aki-y)
  • A.PadIfNeeded now works with an arbitrary number of channels. (#1069 by @BloodAxe)
  • Fixed all np.random use cases to prevent identical values when using multiprocessing. (#1070 by @Dipet)
  • The slant param now has an effect in A.RandomRain. (#1179 by @victor1cea)
  • translate_percent now uses 0 as a default value in the A.Affine transform. (#1183 by @victor1cea)
  • A.SafeRotate no longer loses blocks and keypoints. (#1109 by @Dipet)
  • A.CropAndPad now correctly handles bboxes when keep_size=True. (#1059 by @cannon)
  • A.RandomCrop, A.RandomSizedCrop, and A.RandomSizedBBoxSafeCrop now sample last pixel. (#1080 by @Multihuntr)

Minor changes:

  • Old code is refactored, and more type hints are added (#1052 by @Dipet).
  • A.Compose now warns the user if it receives a single augmentation instead of a sequence of augmentations. (#1055 by @Dipet)
  • A.CoarseDropout and A.RandomGridShuffle now support keypoints. (#1084 by @BloodAxe)
  • A.ToTensorV2 now supports the masks target. (#1097 by @alessiobonfiglio)
  • A.PadIfNeeded now supports random padding. (#1160 by @mys007 )
  • Improved and corrected documentation: #1047 by @shyn, #1164 by @notplus, #1105 by @i-aki-y
  • Speeded up tests by removing unnecessary tests. (#1188 by @creafz)
  • A.Affine now has keep_ratio flag. (#1104 by @i-aki-y)

1.1.0

2 years ago

133947365-6cba891b-4537-4d97-8b84-5ac9ce908d1d

New augmentations

  • TemplateTransform. This transform allows the blending of an input image with specified templates. (#572 by @akarsakov )
  • PixelDistributionAdaptation. A new domain adaptation augmentation. It fits a simple transform on both the original and reference image, transforms the original image with transform trained on this image, and performs inverse transformation using transform fitted on the reference image. See the examples of this transform in the qudida repository. (#959 by @arsenyinfo)

Minor changes:

  • LongestMaxSize and SmallestMaxSize now can also accept a list of sizes as their max_size argument and the actual max_size value will be sampled randomly from this list. (#930 by @kmistry-wx )
  • A.Affine now accepts mask_interpolation as a parameter. (#975 by @dskkato )
  • A.RandomRain now alters brightness in HSV space instead of HLS space to prevent image corruption. (#990 by @ErlingLie)
  • Albumentations now raises ValueError if bbox_params is not specified and bbox transformation is called (#1013 by @VirajBagal)
  • CoarseDropout can now set the height and width of holes based on the fraction of original image height and width (#1014 by @VirajBagal )
  • ElasticTransform got performance optimizations. (#1004 by @b0nce)

Bugfixes

  • Fixed a bug when CropNonEmptyMaskIfExists thrown an error when it was used with a keypoint even though keypoints were mentioned as a correct target. (#986 by @GalDude33 )
  • Fixed KeyError with RandomCropNearBBox when it received values with x_min <= 0 or y_min <= 0 (#993 by @Dipet )

1.0.3

2 years ago
  • Fixed problem with incorrect shape at keypoints and bboxes processors after ToTensorV2 #963
  • Fixed problems with float values in YOLO format in edge cases #958