Release 2.5.0
View on GitHub ↗2026-10-07
Summary
- Adds four medical imaging transforms: BiasField, GhostingArtifact, GibbsRinging, and MotionArtifact.
- Raises the minimum supported Python version to 3.11.
- Fixes RandomGamma so gamma 1 preserves every uint8 value.
- Cuts FFT work and temporary memory for selected large MRI volume cases.
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.transformsandalbumentations.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
| Commit | PR | Description |
|---|---|---|
7140cc9 | #558 | Require Python 3.11+ and refresh ecosystem dependencies |
d1a018b | #559 | Update development dependency group |
cc6aa02 | #560 | Add MotionArtifact for MRI acquisition motion |
96ca52b | #561 | Add BiasField for MRI intensity inhomogeneity |
d3a1766 | #562 | Add GhostingArtifact for MRI k-space ghosting |
c62d5e3 | #563 | Correct RandomGamma formula and brightness documentation |
557307a | #564 | Add GibbsRinging for 2D images and 3D volumes |
8b3b8b4 | #565 | Consolidate medical imaging augmentations in the medical package |
5a5a49e | #566 | Fix RandomGamma uint8 lookup table identity |
0097864 | #568 | Reduce MRI volume FFT work and temporary memory |
e2eb141 | #571 | Defer medical imports until MRI benchmark setup |
3146aff | #571 | Clear cached medical modules in the discovery regression test |
ddc3118 | #571 | Merge release benchmark compatibility fix |
5f6a6d4 | #573 | Align action version comments with pinned SHAs |
1c8790c | #573 | Merge workflow action comment corrections |
159c7b0 | #569 | Bump the package version to 2.5.0 |
1458043 | #569 | Merge the 2.5.0 release branch |