A method comprising: receiving a source image and a target image, each depicting a dense recurring pattern comprising an array of objects arranged in close proximity to one another; applying a trained machine learning classifier to obtain a classification of each pixel in said source image and said target image into one of at least two classes; determining a pixel-level transformation between said classified source and target images, based, at least in part, on a set of transformation parameters; training a neural network to optimize said set of transformation parameters, based, at least in part, on minimizing a loss function which calculates a weighted sum of per-pixel matches between said classified source and target images; and applying said optimized set of transformation parameters to said target image, to align said target image with said source image.
RECURRENT PATTERN IMAGE CLASSIFICATION AND REGISTRATION