Release 2.6.4
View on GitHub ↗2026-11-16
Summary
- Apply a shared D4 symmetry to images and masks at different resolutions in one call.
- Replay supported geometry at a new resolution with keypoints and boxes in the current primary frame.
- Fill channels removed by ChannelDropout with their own spatial means.
Breaking changes
None.
New features
ChannelDropout accepts fill="mean". Each selected channel becomes constant at its own mean, computed separately for each image or volume. This removes spatial information while retaining average intensity, rounded to the nearest integer for uint8. Numeric fills and the default remain available. Use 2.6.4 or newer to load configurations that use the new fill. #666
import albumentations as A
drop = A.ChannelDropout(channels_to_drop=(0,), dropout_ratio=1.0, fill="mean", p=1.0)
Bug fixes
- With
is_check_shapes=False,ComposeandReplayComposeaccept different raster resolutions for D4, supported flips and right-angle rotations, fixed padding and resize, morphology, and PixelDropout. Transforms that compute shared geometry from the input dimensions still require alignment. #667 - Replaying a supported symmetry or fixed-size transform on a different resolution keeps the recorded operation and uses the current primary image or volume for annotation coordinates. A named raster alias cannot replace that frame, even when the primary batch is empty. Dense recorded parameters still require compatible shapes. #667
import albumentations as A
import numpy as np
augment = A.Compose(
[A.D4()],
additional_targets={"low_image": "image", "low_mask": "mask"},
is_check_shapes=False,
seed=137,
)
result = augment(
image=np.zeros((512, 512, 3), dtype=np.uint8),
mask=np.zeros((512, 512), dtype=np.uint8),
low_image=np.zeros((256, 256, 3), dtype=np.float32),
low_mask=np.zeros((256, 256), dtype=np.uint8),
)
Misc
- The Ruff pre-commit hook now uses v0.17.5. #667
- The lockfile updates Pydantic to 2.14.3,
pydantic-coreto 2.50.4, and eight development dependencies. The package's declared dependency ranges are unchanged. #668
Commits
| Commit | PR | Description |
|---|---|---|
14ee359 | #666 | Add mean fill to ChannelDropout |
ee0b3e6 | #667 | Support mixed-resolution targets and replay |
20302bd | #668 | Update Pydantic and development dependencies |
c849ee8 | #672 | Bump to 2.6.4 and update the release inventory |