NAFNet
A U-shaped image restoration network with no nonlinear activation functions.
1,605 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 116M
- Operations
- 1,605
- Framework
- PyTorch
- Recurrent
- No
- Published
- ECCV 2022
- Cited by
- 1,517 (as of 29 October 2026)
- Authors
- Liangyu Chen, Xiaojie Chu, Xiangyu Zhang, Jian Sun
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18628
- Graph hash
- 262971976d85115dfd6fb9c45949e5e51cd954dd75dc33421cf136c46854c174
- Skeleton hash
- 5bc4f76dedbde73df3693eadd4e857c6c7f40b77c8c8339bb2e135ae3af5dbf6
- Architecture hash
- 611f55bec7990a32255bd3274217c42e6c5a66043324105e884055c4fdb56d11
- Diagram SHA-256
- 09b24241df4e4d0d98d9860bd55ed60815816c29fda267b53a0b5aeb441e7f5c
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
This model is NAFNet at width 64, the enlarged setting the paper uses for its applications in place of the default width of 32.
NAFNet (Nonlinear Activation Free Network) is an image restoration network, used for tasks such as denoising and deblurring, that contains no nonlinear activation functions. The paper starts from the observation that the system complexity of restoration methods has been increasing, which may hinder the analysis and comparison of methods, and it proposes a simple baseline in response.
The architecture is the classic single-stage U-shaped one with skip connections. The authors start from a plain block of convolution, ReLU and shortcut, and arrive at a baseline block that adopts channel attention and LayerNorm and replaces ReLU with GELU. NAFNet then replaces GELU with SimpleGate, which divides the feature map into two parts in the channel dimension and multiplies them, and replaces channel attention with Simplified Channel Attention.
The paper reports 33.69 dB PSNR on GoPro for image deblurring and 40.30 dB PSNR on SIDD for image denoising, the latter at less than half the computational cost of the method it surpassed. Its default width and number of blocks are 32 and 36, and the width is increased to 64 when the network is applied to the restoration tasks.
Key idea. The paper shows that the nonlinear activation functions of an image restoration network can be replaced by multiplication or removed, which yields NAFNet.
- NAFNet
- Nonlinear Activation Free Network
- image restoration
- image denoising
- image deblurring
- Simple Baselines for Image Restoration
- SimpleGate
- simplified channel attention
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{chen2022simplebaselinesimagerestoration,
title={Simple Baselines for Image Restoration},
author={Liangyu Chen and Xiaojie Chu and Xiangyu Zhang and Jian Sun},
year={2022},
eprint={2204.04676},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2204.04676},
}