Mirror is a data-augmentation operation that flips an image along one or more axes, creating a reflected training variant while preserving its pixel values. For CT samples, left-right and front-back flips can remain representative when tumor growth has no strong correlation with those directions; valid axes depend on domain knowledge. section 14.6.1
A practical mirror augmentation:
- Adds the flip option to the augmentation configuration. section 14.6.1
- Changes orientation without changing pixel values, so the sample remains useful but is not identical. section 14.6.1
- Applies augmentation after caching; otherwise an already augmented sample may be persisted and reused. section 14.6.1
Listing 14.13 Flipping images to augment
for i in range(3):
if 'flip' in augmentation_dict:
if random.random() > 0.5:
transform_t[i,i] *= -1
See the short PyTorch loop that randomly negates selected diagonal entries of the transformation matrix to flip image axes. section 14.6.1

