Albumentations

Latest version: v1.4.21

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

1.4.3

- 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](https://github.com/sponsors/albumentations-team). 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](https://github.com/albumentations-team/albumentations).
3. Got ideas or facing issues? We'd love to hear from you. Share your thoughts in our [issues](https://github.com/albumentations-team/albumentations/issues) or join the conversation on our [Discord server for Albumentations](https://discord.gg/AmMnDBdzYs)

New transform
<img width="1659" alt="Screenshot 2024-04-02 at 18 43 51" src="https://github.com/albumentations-team/albumentations/assets/5481618/e9c95aab-b2a8-4b12-9d72-86041b08f3ed">

* 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](https://albumentations.ai/docs/benchmarking_results/) by ternaus
* Bugfix in [FDA](https://albumentations.ai/docs/api_reference/augmentations/domain_adaptation/?h=fda#albumentations.augmentations.domain_adaptation.FDA) transform by ternaus
* Now [RandomSizedCrop](https://albumentations.ai/docs/api_reference/full_reference/?h=randomsizedcrop#albumentations.augmentations.crops.transforms.RandomSizedCrop) supports the same signature as analogous transform in torchvision by zetyquickly

1.4.2

- 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](https://github.com/sponsors/albumentations-team). 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 or proposals or encounter issues - submit your request to [issues](https://github.com/albumentations-team/albumentations/issues) or ask in [Discord server for Albumentations](https://discord.gg/AmMnDBdzYs)

New transform
<div align="center">
<a href="https://i.imgur.com/8wWkMmL.jpeg">
<img src="https://i.imgur.com/8wWkMmL.jpeg" width="30%">
</a>
<a href="https://i.imgur.com/B687Opr.jpeg">
<img src="https://i.imgur.com/B687Opr.jpeg" width="30%">
</a>
<a href="https://i.imgur.com/jkjwFMB.jpeg">
<img src="https://i.imgur.com/jkjwFMB.jpeg" width="30%">
</a>
<p>
<b>Left:</b> Original, <b>Middle:</b> Chromatic aberration (default args, mode="green_purple"), <b>Right:</b> Chromatic aberration (default args, mode="red_blue")
<br>(Image is from our internal mobile mapping dataset)
</p>
</div>

* Added `ChromaticAbberation` transform that adds chromatic distortion to the image. [Wiki](https://en.wikipedia.org/wiki/Chromatic_aberration) by mrsmrynk

New functionality
* Return `mixing parameter` for `MixUp` transform by Dipet. For more details [Tutorial on MixUp](https://albumentations.ai/docs/examples/example_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

- 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](https://github.com/sponsors/albumentations-team). 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 or proposals or encounter issues - submit your request to [issues](https://github.com/albumentations-team/albumentations/issues) or our new initiative, - [Discord server for albumentations](https://discord.gg/AmMnDBdzYs)

New transform

<img width="660" alt="Screenshot 2024-03-04 at 14 52 15" src="https://github.com/albumentations-team/albumentations/assets/5481618/68e5031b-e45e-4578-abe8-1d8e33db4831">

* 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](https://albumentations.ai/whos_using)
* Removed quidda dependency, which addresses `opencv` library inconsistencies issues
* New, updated version of [benchmark](https://github.com/albumentations-team/albumentations?tab=readme-ov-file#benchmarking-results).

1.4.0

- 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](https://github.com/sponsors/albumentations-team). 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](https://github.com/albumentations-team/albumentations/issues) or, our new initiative, - [Discord server for albumentations](https://discord.gg/AmMnDBdzYs)

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.

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

<img width="560" alt="Screenshot 2024-02-17 at 13 09 01" src="https://github.com/albumentations-team/albumentations/assets/5481618/18aaebad-4b58-4cc6-932f-e2d8a1f352ab">

* 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](https://albumentations.ai/docs/api_reference/augmentations/dropout/coarse_dropout/), [MaskDropout](https://albumentations.ai/docs/api_reference/augmentations/dropout/mask_dropout/), [GridDropout](https://albumentations.ai/docs/api_reference/augmentations/dropout/grid_dropout/) 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](https://imgaug.readthedocs.io/en/latest/) library was removed.

(https://github.com/albumentations-team/albumentations/commit/be6a217b207b3d7ebe792caabb438d660b45f2a5 by ternaus )

Deleted Transforms
1. `JpegCompression`. Use [ImageCompression](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.ImageCompression) instead.
2. `RandomBrightness`. Use [RandomBrigtnessContrast](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomBrightnessContrast) instead.
3. `RandomContrast`. Use [RandomBrigtnessContrast](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomBrightnessContrast) instead.
4. `Cutout`. Use [CoarseDropout](https://albumentations.ai/docs/api_reference/augmentations/dropout/coarse_dropout/#coarsedropout-augmentation-augmentationsdropoutcoarse_dropout) instead.
5. `ToTensor`. Use [ToTensorV2](https://albumentations.ai/docs/api_reference/pytorch/transforms/#albumentations.pytorch.transforms.ToTensorV2) instead.
6. `IAAAdditiveGaussianNoise`. Use [GaussNoise](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.GaussNoise) instead.
7. `IAAAffine`. Use [Affine](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.Affine) instead.
8. IAACropAndPad. Use [CropAndPad](https://albumentations.ai/docs/api_reference/augmentations/crops/transforms/#albumentations.augmentations.crops.transforms.CropAndPad) instead.
9. `IAAEmboss`. Use [Emboss](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Emboss) instead.
10. `IAAFliplr`. Use [HorizontalFlip](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.HorizontalFlip) instead.
11. `IAAFlipud`. Use [VerticalFlip](https://albumentations.ai/docs/api_reference/full_reference/#albumentations.augmentations.geometric.transforms.VerticalFlip) instead.
12. `IAAPerspective`. Use [Perspective](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.Perspective) instead.
13. `IAAPiecewiseAffine`. Use [PiecewiseAffine](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.PiecewiseAffine) instead.
14. `IAASharpen`. Use [Sharpen](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Sharpen) instead.
15. `IAASuperpixels`. Use [Superpixels](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Superpixels) instead.

Other deprecated functionality
* Removed `eps` parameter in [RandomGamma](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomGamma)
* Removed `lambda_transforms`in `serialization.from_dict` function.

Minor changes and Bug Fixes
* Added details [Contributor's guide](https://github.com/albumentations-team/albumentations/blob/main/CONTRIBUTING.md)
* 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

1.3.1

![image](https://github.com/albumentations-team/albumentations/assets/7512250/acc2d64e-a4ea-4cec-914b-6cf612ae6058)


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

![albu_1_3_0](https://user-images.githubusercontent.com/7512250/190941180-78e7bc20-c3b3-440c-96dd-3c4b8aa88311.png)


Breaking changes
- Renamed `method` to `rotate_method` inside [`Rotate`](https://albumentations.ai/docs/api_reference/augmentations/geometric/rotate/#albumentations.augmentations.geometric.rotate.Rotate) to keep consistency between naming parameters. (1258 by Dipet, thanks to MichaelMonashev)

New augmentations
- [`RandomCropFromBorders`](https://albumentations.ai/docs/api_reference/augmentations/crops/transforms/#albumentations.augmentations.crops.transforms.RandomCropFromBorders) - Crops image based on indents from image borders. (1240 by Dipet based on 476 by ZFTurbo)
- [`BBoxSafeRandomCrop`](https://albumentations.ai/docs/api_reference/augmentations/crops/transforms/#albumentations.augmentations.crops.transforms.BBoxSafeRandomCrop) - Crops image without loss of bboxes. Instead of [`RandomSizedBBoxSafeCrop`](https://albumentations.ai/docs/api_reference/augmentations/crops/transforms/#albumentations.augmentations.crops.transforms.RandomSizedBBoxSafeCrop) this implementation do not apply resize to target size. (579 by SunQpark)
- [`Spatter`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Spatter) - Simulates corruption which can occlude a lens in the form of rain or mud. (573 by akarsakov)
- [`Defocus`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Defocus) - Imitates lens defocusing. (551 by akarsakov)
- [`ZoomBlur`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.ZoomBlur) - Imitates lens blur on zoomig. (551 by akarsakov)

Bugfixes
- Fixed wrong result in [`RandomBrightnessContrast`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomBrightnessContrast) when `brightness_by_max=False`. (487 by Dipet)
- Fixed wrong bbox clipping inside [`Perspective`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.Perspective) and [`Affine`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.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`](https://albumentations.ai/docs/api_reference/augmentations/geometric/rotate/#albumentations.augmentations.geometric.rotate.Rotate) when `crop_border=True`. (1250 by Dipet, thanks to jonkoi)
- Fixed wrong propagation of `always_apply` [`Compose`](https://albumentations.ai/docs/api_reference/core/composition/#albumentations.core.composition.Compose) children. (561 by albu)
- [RandomSunFlare](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomSunFlare) now correctly works with `src_color`, and use all three color values. (1285 by hoel-bagard)
- [RandomGamma](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.RandomGamma) now correctly works with float `gamma_limit`. (1286 by zahragolpa)

Minor changes:
- Speeded up [`Normalize`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.Normalize) in some case up to 2 times. (563 by Dipet)
- [`GridDistortion`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.GridDistortion), [`ElasticTransform`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.ElasticTransform) and [`OpticalDistortion`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.OpticalDistortion) now supports bbox targets. (476, 1262 by ZFTurbo and Dipet)
- [`MotionBlur`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.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`](https://albumentations.ai/docs/api_reference/augmentations/geometric/transforms/#albumentations.augmentations.geometric.transforms.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`](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transforms.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)

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.