Abstract
Shadow removal is a complex image restoration task involving brightness loss, texture degradation, and color shifts. This paper introduces ShadowHack, a framework that decouples the problem into separate luminance and color restoration tasks. By utilizing a dual-network architecture—LRNet for luminance and CRNet for color—and a novel Rectified Outreach Attention (ROA) mechanism, ShadowHack achieves state-of-the-art results on major benchmarks like ISTD+ and SRD.
The Triple Threat of Shadow Degradation
Removing shadows from images is more than just brightening dark pixels. Shadows present a "triple threat" of degradations that complicate restoration:
- Reduced Brightness: Significant loss of light in the umbra region.
- Texture Deterioration: Sensor noise and quantization errors become much more prominent in dark areas, obscuring fine details.
- Color Distortion: Environmental light and surface properties cause "color shifts," where shadows often appear unnaturally tinted (e.g., bluer), as analyzed in Figure 2.
Existing holistic models often struggle to untangle these intertwined issues, leading to artifacts, blurry textures, or unnatural colors in the restored areas.
The ShadowHack Framework: Divide and Conquer
ShadowHack addresses these challenges by breaking the problem into two distinct sub-tasks: Luminance Restoration and Color Regeneration.
1. Luminance-Color Decoupling
The model operates in the YCbCr color space rather than RGB. The Y channel (Luminance) is dedicated to handling brightness and texture restoration, while the Cb and Cr channels isolate color shifts. This decoupling prevents "color bleeding" and ensures that structural restoration is not corrupted by chromatic noise.
2. Dual-Network Architecture
The framework consists of two specialized stages:
- LRNet (Luminance Restoration Network): A U-shaped transformer focusing on the Y channel. It introduces Rectified Outreach Attention (ROA), which uses "outreach" windows to find similar non-shadow regions for reference. A rectification mechanism incorporates color information to filter out misleading attention matches, ensuring the model focuses on structurally relevant areas.
- CRNet (Color Regeneration Network): Once luminance is restored, CRNet uses the high-quality Y channel as a guide to query accurate colors from non-shadow regions. It employs a dual-encoder setup and cross-attention to "paint" the shadow regions back to their natural state.
To ensure robustness, the authors employ a Checkpoint Ensemble training trick, randomly feeding the color network outputs from various early-stage checkpoints of the luminance network to simulate real-world imperfections.
Experimental Performance
ShadowHack was evaluated on major benchmarks including ISTD+, SRD, UIUC, and UCF. It consistently outperformed previous state-of-the-art (SOTA) methods both quantitatively and qualitatively.
Quantitative Results
On the ISTD+ dataset, ShadowHack achieved a PSNR of 36.31, surpassing the previous best (RASM) by 0.15 dB. On the SRD dataset, it achieved a significant improvement in RMSE, dropping to 2.90 (a -0.43 improvement over the previous SOTA).
Qualitative Comparison
As seen in Figure 1, while other SOTA models like SG or HF leave behind color tints or blurred textures, ShadowHack produces results nearly indistinguishable from the ground truth, maintaining sharp details and natural color balance.
Conclusion
By decoupling the shadow removal process into luminance and color components, ShadowHack effectively addresses the complex degradations inherent in shadowed regions. The use of Rectified Outreach Attention allows the model to leverage non-shadowed references accurately, leading to superior restoration quality. Future work may focus on end-to-end mask generation and optimizing the computational complexity of the dual-transformer architecture.
Summary updated