Release 2.5.0

Summary

Breaking changes

  • Python 3.10 is no longer supported. Install and run AlbumentationsX with Python 3.11 or newer.
  • Medical transform implementations and functional helpers now live in albumentations.augmentations.medical.transforms and albumentations.augmentations.medical.functional. Code importing implementation modules should update its import path. For example:
# Before
from albumentations.augmentations.pixel.color_advanced import HEStain

# After
from albumentations.augmentations.medical.transforms import HEStain

Top-level exports such as A.HEStain retain their constructor parameters and serialization identifiers.

New features

  • BiasField simulates smooth multiplicative intensity variation in images and 3D volumes, with shared or per-channel fields.
  • GhostingArtifact simulates periodic MRI ghost replicas in real 3D magnitude volumes.
  • GibbsRinging applies rectangular k-space truncation to 2D images and 3D volumes.
  • MotionArtifact simulates motion between MRI acquisition segments in 3D volumes.
  • The new medical package groups these transforms with Anisotropy3D, HEStain, KSpaceSpikeNoise, and RicianNoise. Their top-level exports, target behavior, and serialization remain intact.

Bug fixes

  • RandomGamma now builds its uint8 lookup table from exact integer pixel values. With gamma 1, all 256 uint8 values remain unchanged across images and volumes.
  • Corrects the documented gamma equation and brightening/darkening directions, and adds a runnable numeric example.

Misc

  • For large 3D volumes, KSpaceSpikeNoise, GibbsRinging, and BiasField reduce FFT computation or temporary memory in selected parameter, shape, and dtype ranges. Other inputs keep the existing execution paths.
  • Updates the supported Python and operating-system matrix, contributor guidance, release metadata, and development dependencies.
  • Keeps release-core ASV discovery compatible with 2.4.13 and corrects pinned artifact action version comments in CI workflows (#571, #573).

Commits

CommitPRDescription
7140cc9#558Require Python 3.11+ and refresh ecosystem dependencies
d1a018b#559Update development dependency group
cc6aa02#560Add MotionArtifact for MRI acquisition motion
96ca52b#561Add BiasField for MRI intensity inhomogeneity
d3a1766#562Add GhostingArtifact for MRI k-space ghosting
c62d5e3#563Correct RandomGamma formula and brightness documentation
557307a#564Add GibbsRinging for 2D images and 3D volumes
8b3b8b4#565Consolidate medical imaging augmentations in the medical package
5a5a49e#566Fix RandomGamma uint8 lookup table identity
0097864#568Reduce MRI volume FFT work and temporary memory
e2eb141#571Defer medical imports until MRI benchmark setup
3146aff#571Clear cached medical modules in the discovery regression test
ddc3118#571Merge release benchmark compatibility fix
5f6a6d4#573Align action version comments with pinned SHAs
1c8790c#573Merge workflow action comment corrections
159c7b0#569Bump the package version to 2.5.0
1458043#569Merge the 2.5.0 release branch