Can you recommend a library for measuring image similarity?

I’m using PSNR recently.

However, the PSNR shows a low PSNR value even though the photos are more similar.

I think these problems are the downsides of PSNR.

Can you recommend an image similarity measurement method that improves the PSNR problem?

In general, PSNR may not be a good metric for most natural image domains. To measure perceptual similarity between images, may be an alternative method could be the structural similarity index https://ece.uwaterloo.ca/~z70wang/publications/ssim.pdf
To go even farther, you could use inception distance as a sort of semantic similarity metric, similar to how it is used in FID scoring for Image GANs, Fréchet inception distance - Wikipedia.

Thank for your recommand I’m try it