Neural Network Architecture for Identifying Image Copies
U need to read about triplet loss function. Triplet loss function gets result embeddings from a network, that process 3 images by a network (2 similar and 1 non-similar) for one step:


After that loss computing as:


For more details read the paper from triplet loss authors.

Also may help PSNR, but this is not Deep Learning.