All models

restormer_dual_pixel_defocus

Restormer for dual-pixel defocus deblurring: a restoration Transformer with attention across channels.

Diffusion and generative · 133 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
59.4K
Operations
133
Framework
PyTorch
Recurrent
No
Published
CVPR 2022
Authors
Syed Waqas Zamir, Aditya Arora, Salman Khan and others
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
m12103
Graph hash
9cb6218dab80e8ca47e1961b43399b5a78bb0ab13d6bdde0c11a27f8edf12b80
Skeleton hash
5a4396be9b1c4a006e41c3e69bde87af967f6c78c72d0386f24c0227b585edfb
Architecture hash
f64d3e4e74f05a7a7adb9c9d9225fe93ab841022907c257029bc2019bc538586
Diagram SHA-256
501b82b6776ccf61baa31d6be3dac4ceaee7f087335fd24caa440fbc175d359b
TorchLens version
2.35.3
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.restormer_dual_pixel_defocus:build: build({})

What it is

Restormer, short for Restoration Transformer, is a Transformer for image restoration, the task of reconstructing a high-quality image by removing degradations such as noise, blur or rain drops. The paper trains separate models for different restoration tasks, and this one is for defocus deblurring from dual-pixel data.

The obstacle the paper addresses is that the cost of self-attention grows quadratically with spatial resolution, which makes it infeasible for the high-resolution images common in restoration. Restormer's attention block, called MDTA, applies self-attention across channels rather than across the spatial dimension, so its complexity is linear rather than quadratic. Its feed-forward block, GDFN, adds a gate: the element-wise product of two parallel linear paths, one of them activated with GELU. Both blocks include depth-wise convolutions to encode spatially local context. Training in the paper is progressive: the network sees smaller image patches in the early epochs and gradually larger patches later.

Defocus deblurring is evaluated on the DPDD test set of 37 indoor and 39 outdoor scenes, in two settings: single-image and dual-pixel. On the combined scenes the paper reports a gain of about 0.6 dB over IFAN, the previous best method in its comparison. Against Uformer, another Transformer model, it reports a gain of 1.01 dB PSNR.

Key idea. Restormer keeps Transformer attention linear in image size by applying it across channels instead of pixels, and pairs it with a gated feed-forward block using depth-wise convolutions.

  • restormer
  • restoration transformer
  • image restoration
  • mdta
  • gdfn
  • transposed attention
  • defocus deblurring
  • dual-pixel
  • dual pixel defocus deblurring

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{zamir2022restormerefficienttransformerhighresolution,
      title={Restormer: Efficient Transformer for High-Resolution Image Restoration}, 
      author={Syed Waqas Zamir and Aditya Arora and Salman Khan and Munawar Hayat and Fahad Shahbaz Khan and Ming-Hsuan Yang},
      year={2022},
      eprint={2111.09881},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2111.09881}, 
}