All models

HirFormer

Two-stage shadow removal model: a high-resolution Transformer followed by NAFNet refinement.

Diffusion and generative · 2,204 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

This diagram has 2,204 operations (5 KB) and is drawn when you ask.

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
25.2M
Operations
2,204
Framework
PyTorch
Recurrent
No
Published
CVPR 2024 Workshops (NTIRE)
Cited by
11 (as of 28 October 2026)
Authors
Xin Lu, Yurui Zhu, Xi Wang 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
m17364
Graph hash
a52e40457318019e2092cffab6d81b583c4900ea565db9f1d2cccbc11bb11120
Skeleton hash
2be6a3d38fca6a298c5fad89ad6c483459cff034cf68e6a52be073c501dd0675
Architecture hash
f3f991666911729a2dae13de15d3629493017ce4595ed1449c00e2e9befe5bda
Diagram SHA-256
2b5ac9e2b73cace6e986887750d94ac85231af4250d8860ff38de4b3351f1920
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

HirFormer is a two-stage model for removing shadows from high-resolution images. The paper's starting point is that existing image restoration models have limited performance on this task, particularly with complex backgrounds and unevenly distributed shadows. The first stage, the Dynamic High Resolution Transformer, reconstructs the high-resolution background information and removes a significant portion of the shadows. The second stage, Large-scale Image Refinement, uses the NAFNet model to remove residual shadows and to address block artifacts introduced by the first stage.

In the official code the first stage is a masked ViT encoder-decoder. Training follows a three-step strategy. The ViT is trained first, NAFNet is then trained with the ViT frozen, and both stages are finally fine-tuned jointly with Charbonnier and SSIM losses. The training data are the NTIRE 2024 and NTIRE 2023 shadow removal datasets. The paper states that the method took 1st place in the fidelity track of the NTIRE 2024 Shadow Removal Challenge.

Key idea. HirFormer removes shadows from high-resolution images in two stages, a Transformer that reconstructs the background and removes most shadows, then a NAFNet refinement that removes residual shadows and block artifacts.

  • HirFormer
  • Dynamic High Resolution Transformer
  • image shadow removal
  • shadow removal
  • high-resolution shadow removal
  • Large-scale Image Refinement
  • shadow-free image
  • NTIRE 2024 shadow removal

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

Cite the paper

@inproceedings{Lu_2024, title={HirFormer: Dynamic High Resolution Transformer for Large-Scale Image Shadow Removal}, url={http://dx.doi.org/10.1109/cvprw63382.2024.00651}, DOI={10.1109/cvprw63382.2024.00651}, booktitle={2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)}, publisher={IEEE}, author={Lu, Xin and Zhu, Yurui and Wang, Xi and Li, Dong and Xiao, Jie and Zhang, Yunpeng and Fu, Xueyang and Zha, Zheng-Jun}, year={2024}, month=June, pages={6513–6523} }