image restoration


  • Number of checkpoints: 2

  • Number of configs: 2

  • Number of papers: 1

    • ALGORITHM: 1

NAFNet (ECCV’2022)

Task: Image Restoration


Although there have been significant advances in the field of image restoration recently, the system complexity of the state-of-the-art (SOTA) methods is increasing as well, which may hinder the convenient analysis and comparison of methods. In this paper, we propose a simple baseline that exceeds the SOTA methods and is computationally efficient. To further simplify the baseline, we reveal that the nonlinear activation functions, e.g. Sigmoid, ReLU, GELU, Softmax, etc. are not necessary: they could be replaced by multiplication or removed. Thus, we derive a Nonlinear Activation Free Network, namely NAFNet, from the baseline. SOTA results are achieved on various challenging benchmarks, e.g. 33.69 dB PSNR on GoPro (for image deblurring), exceeding the previous SOTA 0.38 dB with only 8.4% of its computational costs; 40.30 dB PSNR on SIDD (for image denoising), exceeding the previous SOTA 0.28 dB with less than half of its computational costs.

Results and models

Model Dataset image size PSNR SSIM GPU Info Download
nafnet_c64eb2248mb12db2222_8xb8-lr1e-3-400k_sidd SIDD 256X256 40.3045(40.3045) 0.9253(0.9614) 1 (A100) model | log(coming soon)
nafnet_c64eb11128mb1db1111_8xb8-lr1e-3-400k_gopro GoPro 1280x720 33.7246(33.7103) 0.9479(0.9668) 1 (A100) model | log(coming soon)


  • a(b) where a denotes the value run by MMagic, b denotes the value copied from the original paper.

  • PSNR is evaluated on RGB channels.

  • SSIM is evaluated by averaging SSIMs on RGB channels, however the original paper uses the 3D SSIM kernel.

Quick Start


Train Instructions

You can use the following commands to train a model with cpu or single/multiple GPUs.

## cpu train
CUDA_VISIBLE_DEVICES=-1 python tools/ configs/nafnet/

## single-gpu train
python tools/ configs/nafnet/

## multi-gpu train
./tools/ configs/nafnet/ 8

For more details, you can refer to Train a model part in


Test Instructions

You can use the following commands to test a model with cpu or single/multiple GPUs.

## cpu test
CUDA_VISIBLE_DEVICES=-1 python tools/ configs/nafnet/ /path/to/checkpoint

## single-gpu test
python tools/ configs/nafnet/ /path/to/checkpoint

## multi-gpu test
./tools/ configs/nafnet/ /path/to/checkpoint 8

Pretrained checkpoints will come soon.

For more details, you can refer to Test a pre-trained model part in


  title={Simple Baselines for Image Restoration},
  author={Chen, Liangyu and Chu, Xiaojie and Zhang, Xiangyu and Sun, Jian},
  journal={arXiv preprint arXiv:2204.04676},
Read the Docs v: latest
On Read the Docs
Project Home

Free document hosting provided by Read the Docs.