[Paper Review] CRFormer: A Cross-Region Transformer for Shadow Removal
CRFormer proposes a novel cross-region transformer for shadow removal that leverages one-way, region-aware cross-attention to transfer contextual features from non-shadow regions to shadow regions without patchification. By integrating a hybrid CNN-Transformer architecture with a dual encoder and refined decoder, CRFormer achieves state-of-the-art performance on ISTD, AISTD, SRD, and Video Shadow Removal datasets, reducing RMSE by up to 17.1 and improving SSIM to 0.854.
Aiming to restore the original intensity of shadow regions in an image and make them compatible with the remaining non-shadow regions without a trace, shadow removal is a very challenging problem that benefits many downstream image/video-related tasks. Recently, transformers have shown their strong capability in various applications by capturing global pixel interactions and this capability is highly desirable in shadow removal. However, applying transformers to promote shadow removal is non-trivial for the following two reasons: 1) The patchify operation is not suitable for shadow removal due to irregular shadow shapes; 2) shadow removal only needs one-way interaction from the non-shadow region to the shadow region instead of the common two-way interactions among all pixels in the image. In this paper, we propose a novel cross-region transformer, namely CRFormer, for shadow removal which differs from existing transformers by only considering the pixel interactions from the non-shadow region to the shadow region without splitting images into patches. This is achieved by a carefully designed region-aware cross-attention operation that can aggregate the recovered shadow region features conditioned on the non-shadow region features. Extensive experiments on ISTD, AISTD, SRD, and Video Shadow Removal datasets demonstrate the superiority of our method compared to other state-of-the-art methods.
Motivation & Objective
- To address the challenge of shadow removal in images and videos, where shadows degrade visual quality and hinder downstream tasks.
- To overcome the limitations of CNNs in modeling long-range dependencies and patch-based transformers in handling irregular shadow shapes.
- To design a one-way attention mechanism that selectively transfers contextual information from non-shadow to shadow regions, avoiding interference from corrupted shadow features.
- To achieve high-fidelity de-shadowing without patchification, preserving fine details and minimizing color distortion.
- To demonstrate generalization and robustness across diverse datasets, including video sequences with dynamic shadows.
Proposed method
- A hybrid CNN-Transformer framework is proposed, using a dual encoder to extract asymmetrical features from the shadow image and its shadow mask.
- The core innovation is the region-aware cross-attention mechanism, which computes attention only from non-shadow to shadow regions, conditioned on non-shadow features.
- The cross-region alignment blocks in the Transformer layer iteratively refine shadow features using contextual cues from the entire non-shadow region.
- A single CNN-based decoder reconstructs the de-shadowed image from the fused features, followed by a light U-shaped RefineNet for post-processing.
- The model is trained end-to-end with a combination of L1 and perceptual losses to preserve structural and semantic fidelity.
- The architecture avoids patchification, enabling direct processing of full-resolution images and better handling of irregular shadow boundaries.
Experimental results
Research questions
- RQ1Can a one-way attention mechanism from non-shadow to shadow regions outperform standard two-way self-attention in shadow removal?
- RQ2Does avoiding patchification improve performance on images with irregular shadow shapes?
- RQ3Can contextual information from the entire non-shadow region be effectively leveraged without introducing noise from corrupted shadow features?
- RQ4How does the proposed region-aware cross-attention compare to vanilla self-attention in de-shadowing quality and robustness?
- RQ5To what extent does the model generalize across diverse datasets, including video sequences with complex shadow dynamics?
Key findings
- CRFormer achieves the lowest RMSE of 17.1 on the Video Shadow Removal dataset, outperforming all prior state-of-the-art methods.
- The model improves SSIM to 0.854 on the Video Shadow Removal dataset, indicating superior perceptual quality and structural preservation.
- The region-aware cross-attention mechanism reduces RMSE by 7.7% compared to vanilla attention, significantly improving shadow region recovery.
- Using two cross-region alignment blocks yields optimal performance, with diminishing returns and increased FLOPs beyond that point.
- CRFormer generalizes strongly to unseen video data, outperforming both supervised and unsupervised baselines on the VSR benchmark.
- Qualitative results show reduced color distortion and fewer artifacts, especially in complex shadow regions, as confirmed by red bounding boxes in Figure 4.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.