# VainF/pytorch-msssim

Fast and differentiable MS-SSIM and SSIM for pytorch.

Repository: https://github.com/VainF/pytorch-msssim
Canonical: https://ross.abutalabs.com/products/pytorch-msssim
Language: Python
License: MIT
License Family: permissive
Topics: ssim, ms-ssim, pytorch, image-quality, structure-similarity
Last push: 2024-03-12T11:37:10+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2694, "days_push": 904, "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 1253, forks 127 (observed 2026-08-28T04:04:08.572187+00:00)

## What it is
A PyTorch library providing fast, differentiable SSIM and MS-SSIM image quality metrics using separable Gaussian filtering for speed. It can be used both as an evaluation metric and as a differentiable loss function for training neural networks.

## Use cases
- compute SSIM between image batches in pytorch
- use MS-SSIM as a differentiable loss for image reconstruction training
- evaluate image quality of generated images against ground truth
- match SSIM results from tensorflow or skimage in pytorch
- speed up SSIM computation with separable Gaussian kernels
- compute SSIM on 3D volumetric images

## When to choose
- you need differentiable SSIM/MS-SSIM losses inside PyTorch training loops
- you want fast GPU-accelerated SSIM computation on batches of images
- you need results consistent with TensorFlow or skimage implementations

## When to avoid
- you need image quality metrics outside the PyTorch ecosystem
- you need other perceptual metrics like LPIPS or PSNR beyond SSIM
- your project uses TensorFlow, JAX, or NumPy instead of PyTorch

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, machine-learning, benchmarking
- domain: computer-vision, image-processing, machine-learning, deep-learning
- platform: python, cross-platform
- tags: ssim, ms-ssim, pytorch, image-quality, differentiable-loss, perceptual-metrics, gpu

## Member repositories
- VainF/pytorch-msssim (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:08.572187+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-30T05:07:27.636002+00:00, confidence not recorded.
  - readme: https://github.com/VainF/pytorch-msssim (fetched 2026-08-28T04:04:08.572187+00:00, sha 3ee929fc044c)
  - registry_pypi: https://pypi.org/pypi/pytorch-msssim/json (fetched 2026-08-29T12:18:09.928339+00:00, sha 1547192a87ce)
- Data as of 2026-08-30T08:39:29.467469+00:00.
