Dehamer
A dehazing network that fuses Swin Transformer and CNN features and encodes haze density in its position embedding.
875 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
- 132.4M
- Operations
- 875
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2022
- Cited by
- 555 (as of 27 October 2026)
- Authors
- Chun-Le Guo, Qixin Yan, Saeed Anwar and others
- Source
- GitHub: Li-Chongyi/Dehamer
- License
- MIT
- 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
- m16036
- Graph hash
- 50e917d2f739ced0f8ab8b374575f0e53abfb9ee6922d2168b70a413bac8fff1
- Skeleton hash
- 3fcb50e59a2983dfd7b99c1758adf745673ed18d3d702e04f87d4ecc3fcc8ab1
- Architecture hash
- 3faca72a49134ce7ac68ae1507e7b76f422e3e0ca51ae86baf9fda507b1a484d
- Diagram SHA-256
- febdfa9fa7a2db64da1baf0edb03a2e580ed555bc3cd24496c1eb0670ae0fd05
- 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
DeHamer is a single-image dehazing network that runs a Transformer branch and a CNN branch side by side: given a hazy photograph, it returns a haze-free image of the same size. The paper argues that convolution is held back by its locality, while a Transformer used directly gives coarse details and a position embedding that ignores how haze density varies across the picture.
Two designs address this. First, the position embedding gets a third coordinate: the Dark Channel Prior of the input is computed as an estimate of haze density and encoded alongside the horizontal and vertical positions. Second, the Transformer features are not added or concatenated to the CNN features; they predict a coefficient matrix and a bias matrix that scale and shift the CNN encoder features.
The Transformer branch is a three-stage Swin Transformer with the patch size set to 2 instead of the default 4, because larger patches left border artifacts around each patch. A CNN decoder then enlarges the resolution step by step and produces the output image. The authors trained it with L1 loss only. The paper's experiments also include the real-world Dense-Haze and NH-HAZE datasets.
Key idea. The paper combines a Transformer with a CNN for dehazing by modulating CNN features with Transformer-predicted matrices and adding a haze-density coordinate to the position embedding.
- dehamer
- image dehazing
- single image dehazing
- dehazing transformer
- haze removal
- transmission-aware 3d position embedding
- feature modulation
- image restoration
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@inproceedings{Guo_2022, title={Image Dehazing Transformer with Transmission-Aware 3D Position Embedding}, url={http://dx.doi.org/10.1109/CVPR52688.2022.00572}, DOI={10.1109/cvpr52688.2022.00572}, booktitle={2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, publisher={IEEE}, author={Guo, Chunle and Yan, Qixin and Anwar, Saeed and Cong, Runmin and Ren, Wenqi and Li, Chongyi}, year={2022}, month=June, pages={5802–5810} }