# cszn/KAIR

Image Restoration Toolbox (PyTorch). Training and testing codes for DPIR, USRNet, DnCNN, FFDNet, SRMD, DPSR, BSRGAN, SwinIR

Repository: https://github.com/cszn/KAIR
Canonical: https://ross.abutalabs.com/products/kair
Homepage: https://cszn.github.io/
Language: Python
License: MIT
License Family: permissive
Topics: image-restoration, denoising, super-resolution, sisr, pytorch, toolbox, dncnn, usrnet, ffdnet, srmd, esrgan, dpsr, flops, deep-learning, swinir, bsrgan
Last push: 2024-10-02T13:20:42+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": 2453, "days_push": 700, "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 3523, forks 705 (observed 2026-08-28T04:08:08.000283+00:00)

## What it is
A PyTorch image restoration toolbox providing training and testing code for many restoration models including DnCNN, FFDNet, SRMD, USRNet, DPIR, BSRGAN, and SwinIR. It covers tasks such as denoising, super-resolution, deblurring, and demosaicing.

## Use cases
- denoise noisy photos with a pretrained deep learning model
- upscale and super-resolve low-resolution images
- train an image restoration network in PyTorch
- deblur blurry images
- benchmark image restoration models like SwinIR and BSRGAN
- restore compressed JPEG images

## When to choose
- you need reference implementations of well-known image restoration models
- you want to train or fine-tune denoising or super-resolution networks in PyTorch
- you are doing low-level vision research and need a common codebase

## When to avoid
- you need a polished end-user photo editing app with a GUI
- you want one-click production deployment rather than research code
- your task is high-level vision like detection or segmentation

## Facets
- artifact type: library
- maturity: active
- function: image-processing, machine-learning, deep-learning
- domain: computer-vision, image-processing, deep-learning, machine-learning
- platform: python, cross-platform
- tags: image-restoration, denoising, super-resolution, deblurring, pytorch, swinir, dncnn, research-code, gpu

## Member repositories
- cszn/KAIR (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:08.000283+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:35:11.428726+00:00, confidence not recorded.
  - readme: https://github.com/cszn/KAIR (fetched 2026-08-28T04:08:08.000283+00:00, sha ed4d9048f33e)
  - homepage: https://cszn.github.io/ (fetched 2026-08-29T09:29:13.727283+00:00, sha 92110304d1e2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
