Reflect a volume independently across depth, height, and width voxel-index axes while retaining its shape and channel layout.
In random mode, each allowed axis is independently reflected, including the empty subset (identity). This samples
the full reflection group uniformly. Set flip_axes to a fixed subset, including (), for reversible test-time
augmentation; reflections are self-inverse. This is a voxel-index reflection only: it does not update affine
metadata or perform a physical-space reorientation.
axesNon-empty spatial axes that random mode may flip, in (depth, height, width) order.
Default: (0, 1, 2).
flip_axesFixed subset of axes to reflect for deterministic test-time augmentation.
Use () for identity. Default: None.
pProbability of applying the transform. Default: 1.0.
>>> import numpy as np
>>> import albumentations as A
>>> volume = np.arange(2 * 3 * 5, dtype=np.uint8).reshape(2, 3, 5, 1)
>>> transform = A.Flip3D(flip_axes=(0, 2), p=1.0)
>>> result = transform(volume=volume)
>>> result["volume"].shape
(2, 3, 5, 1)Flip3D label-mapping event. Its semantic-mask
mapping applies only to mask3d; keypoint label mappings rename label values without changing coordinate-row
order.Affine3D: Use positive scales and continuous rotations or translations without sampling reflections.