All models

nafnet_width32_sidd_denoise

Image restoration UNet whose blocks drop every nonlinear activation in favour of a simple channel gate.

Image classification · 121 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

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
124.1K
Operations
121
Framework
PyTorch
Recurrent
No
Published
Lecture Notes in Computer Science (arXiv 2022)
Authors
Liangyu Chen, Xiaojie Chu, Xiangyu Zhang, Jian Sun
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12042
Graph hash
3ebe88d4a851b885000f4dba83d8df7f4cb0b0efcd2f792360eca3f87d5ede49
Skeleton hash
35019a7a8dbca2be4072d728e2cdcc0ab354c2e4fcd4e758a174e399a44fdfc9
Architecture hash
a94b4035183511c4c9c39064b87c352552441842389a405b58f7a6c0de82258a
Diagram SHA-256
9b6a1e4f6efca80931772355b0fb9312645db099777fb73e077fd49aa66551b6
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

How this diagram was made

menagerie.classics.nafnet_width32_sidd_denoise:build: build({})

What it is

NAFNet, the Nonlinear Activation Free Network, is an image restoration model built on a provocation: the usual nonlinear activation functions are not necessary and can be replaced by multiplication or removed. The captured member is the width-32 network trained for denoising on the SIDD benchmark, where the paper reports 40.30 dB PSNR, 0.28 dB above the previous state of the art at less than half its computational cost.

The authors' complaint is that state-of-the-art restoration systems keep growing in complexity, which makes methods hard to analyse and compare. They keep the inter-block design simple by adopting a single-stage UNet and start the block from the most common components, convolution, ReLU and a shortcut, adding pieces from stronger methods only when ablations justify them. The resulting baseline block adds Channel Attention and LayerNorm and swaps ReLU for GELU.

The NAFNet block then goes further: GELU is a special case of the Gated Linear Unit, so it is replaced by SimpleGate, which splits the feature map in two along the channel dimension and multiplies the halves. Channel attention is likewise reduced to Simplified Channel Attention, leaving the block with no nonlinear activation at all. On SIDD the swap from GELU to SimpleGate alone lifted denoising from 39.85 dB to 39.93 dB. The default configuration has width 32 and 36 blocks, with the width adjusted to hold the computational budget fixed when the block count changes.

Key idea. A single-stage UNet for image restoration whose blocks contain no nonlinear activation functions: GELU becomes SimpleGate, an element-wise product of two channel halves, and channel attention loses its nonlinearities, with state-of-the-art denoising and deblurring at a fraction of the compute.

  • NAFNet
  • Nonlinear Activation Free Network
  • nafnet_width32_sidd_denoise
  • image denoising
  • image restoration
  • SIDD
  • SimpleGate
  • image deblurring
  • Simple Baselines for Image Restoration

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}, 
}