An apparatus comprises processing circuitry configured to receive a plurality of training image data sets and a plurality of predetermined displacements. The processing circuitry is further configured to use the training image data sets and predetermined displacements to train a transformation regressor in combination with a discriminator in an adversarial fashion by repeatedly alternating a transformation regressor training process in which the transformation regressor is trained to predict displacements, and a discriminator training process in which the discriminator is trained to distinguish between predetermined displacements and displacements predicted by the transformation regressor.