Image similarity: the measure of how similar two images are. In other words, it quantifies the degree of similarity between intensity patterns in two images. Triplet: a triplet contains a query image, a positive image and a negative image. How to measure the similarity of two images? L1-norm: Manhattan distance L2-norm: Euclidean distance Loss function: The whole deep ranking architecture can be thought of as a function that would map the image to a point in the Euclidean space. The goal is to learn an embedding function that assigns smaller distance to more similar images. D(f(pi), f(pi+)) < D(f(pi), f(pi-)) <pi, pi+, pi-> such that r(pi, pi+) > r(pi,pi-) f is the embedding function that would map the image to a vector. pi is the query image, pi+ is the positive image, pi- is the negative image and r is the similarity distance between two images. The hinge loss for the triplet is defined as: l(pi, pi+, pi-) = max{0, g+D(f(pi), f(pi+)) - D(f(pi),f(pi-...