Breaking changes
- Renamed
method
torotate_method
insideRotate
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 ofRandomSizedBBoxSafeCrop
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
whenbrightness_by_max=False
. (#487 by @Dipet) - Fixed wrong bbox clipping inside
Perspective
andAffine
. (#1231 by @Dipet) - Fixed incorrect removal of bboxes when
min_visibility=0
ormin_visibility=1
. (#616 by @IlyaOvodov) - Fixed wrong keypoint's cropping inside
Rotate
whencrop_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
andOpticalDistortion
now supports bbox targets. (#476, #1262 by @ZFTurbo and @Dipet)MotionBlur
now supportsallow_shifted
flag. When it's value isFalse
only non shifted kernels generated. (#1239 by @Dipet)- Updated versions of type formatters. (#1245 by @ternaus)
GridDistortion
now supportsnormalized
flag. When it is set toTrue
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)