richzhang/PerceptualSimilarity
A PyTorch library implementing LPIPS, a perceptual similarity metric based on deep features for evaluating image quality and similarity.

This repository provides the Learned Perceptual Image Patch Similarity (LPIPS) metric and the Berkeley-Adobe Perceptual Patch Similarity (BAPPS) dataset. The metric measures perceptual similarity between images by comparing deep neural network feature activations rather than pixel-level differences. It can serve as both an evaluation metric and a perceptual loss for optimization tasks like image generation and style transfer. The library offers pretrained backbones (alex, vgg) and integrates with PyTorch.