1. A method performed by one or more processors, comprising: retrieving a set of images; selecting, based on the images retrieved, a reference template; calculating optimal transportation plans between the reference template and each of the images in the set; and calculating, using the optimal transportation plans, a linear optimal transportation metric between at least two images in the set.