# richzhang/PerceptualSimilarity

LPIPS metric. pip install lpips

Repository: https://github.com/richzhang/PerceptualSimilarity
Canonical: https://ross.abutalabs.com/products/perceptualsimilarity
Homepage: https://richzhang.github.io/PerceptualSimilarity
Language: Python
License: BSD-2-Clause
License Family: permissive
Topics: deep-learning, deep-neural-networks, perceptual, perceptual-metric, perceptual-losses, pytorch, perceptual-similarity
Last push: 2024-07-02T17:30:14+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3157, "days_push": 792, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4269, forks 523 (observed 2026-08-28T04:08:40.764445+00:00)

## What it is
A PyTorch library implementing the LPIPS (Learned Perceptual Image Patch Similarity) metric, which measures perceptual distance between images using deep features, usable both as an evaluation metric and as a perceptual loss. It also includes the BAPPS dataset of human perceptual similarity judgments.

## Use cases
- compute perceptual similarity between two images
- evaluate image generation or super-resolution quality
- use LPIPS as a perceptual loss for training image synthesis models
- compare all image pairs across two directories
- benchmark perceptual metrics against human judgments
- measure how similar two image patches look to humans

## When to choose
- you need a standard perceptual image similarity metric in PyTorch
- you want a differentiable perceptual loss for image generation training
- you are evaluating GANs, super-resolution, or image restoration outputs
- you need human-aligned image distance instead of PSNR or SSIM

## When to avoid
- you need a non-PyTorch framework (a separate TensorFlow port exists)
- you only need simple pixel-wise metrics like PSNR or SSIM
- you cannot use GPU or pretrained deep networks
- you need video or audio similarity rather than images

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, machine-learning, deep-learning, benchmarking
- domain: computer-vision, image-processing, deep-learning, machine-learning
- platform: python, cross-platform
- tags: lpips, perceptual-similarity, perceptual-loss, pytorch, image-quality, bapps-dataset, cvpr-2018, gpu

## Member repositories
- richzhang/PerceptualSimilarity (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:40.764445+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:02.252573+00:00, confidence not recorded.
  - readme: https://github.com/richzhang/PerceptualSimilarity (fetched 2026-08-28T04:08:40.764445+00:00, sha fc7bca7419ba)
  - homepage: https://richzhang.github.io/PerceptualSimilarity (fetched 2026-08-29T09:11:31.690812+00:00, sha de8bdd2fe95a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
