# Po-Hsun-Su/pytorch-ssim

pytorch structural similarity (SSIM) loss

Repository: https://github.com/Po-Hsun-Su/pytorch-ssim
Canonical: https://ross.abutalabs.com/products/pytorch-ssim
Language: Python
License: NOASSERTION
License Family: other
Topics: pytorch, image-processing, image-analysis
Last push: 2024-02-22T09:28:51+00:00

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

## Adoption (not part of the score)
Stars 1949, forks 367 (observed 2026-08-28T04:05:58.089937+00:00)

## What it is
A small PyTorch library providing a differentiable structural similarity (SSIM) index and SSIM loss module for image comparison. It can be used as a loss function in image reconstruction and generation tasks.

## Use cases
- compute SSIM between two images in PyTorch
- use SSIM as a differentiable loss for training image reconstruction models
- optimize an image to maximize structural similarity to a target
- evaluate perceptual similarity in image processing pipelines

## When to choose
- you need a simple, copy-paste SSIM loss for an older PyTorch project
- you want a minimal dependency-free SSIM implementation

## When to avoid
- you are on modern PyTorch — the code is broken with recent versions and the repo is unmaintained
- you need maintained alternatives like pytorch-msssim or torchmetrics SSIM

## Facets
- artifact type: library
- maturity: abandoned
- function: image-processing, machine-learning
- domain: image-processing, deep-learning
- platform: python
- tags: ssim, pytorch, loss-function, differentiable, not-maintained

## Member repositories
- Po-Hsun-Su/pytorch-ssim (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:58.089937+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-30T03:06:54.119468+00:00, confidence not recorded.
  - readme: https://github.com/Po-Hsun-Su/pytorch-ssim (fetched 2026-08-28T04:05:58.089937+00:00, sha d6d7eadf44be)
  - registry_pypi: https://pypi.org/pypi/pytorch-ssim/json (fetched 2026-08-29T10:46:42.589474+00:00, sha f8bf520d4b05)
- Data as of 2026-08-30T08:39:29.467469+00:00.
