ShadowHack: Hacking Shadows via Luminance-Color Divide and Conquer
Jin Hu, Mingjia Li, Xiaojie Guo
TL;DR
ShadowHack tackles shadow-induced brightness loss, texture degradation, and color distortion by decoupling an image into luminance and color components for targeted restoration. It models the shadow formation as $I(x,\lambda)=S(x,\lambda)\cdot A(x,\lambda)$ and uses a decoupler $\mathcal{D}(\cdot)$ to obtain $I_t$ and $I_c$, enabling separate recovery paths. LRNet employs Local Range Blocks, Multi-head Transpose Attention, and Rectified Outreach Attention to recover illumination and textures, while CRNet leverages a pretrained color encoder and cross-attention guided color regeneration leveraging a pretrained color encoder. Across ISTD+ and SRD, ShadowHack achieves state-of-the-art restoration with strong generalization and robustness, and code will be publicly released.
Abstract
Shadows introduce challenges such as reduced brightness, texture deterioration, and color distortion in images, complicating a holistic solution. This study presents \textbf{ShadowHack}, a divide-and-conquer strategy that tackles these complexities by decomposing the original task into luminance recovery and color remedy. To brighten shadow regions and repair the corrupted textures in the luminance space, we customize LRNet, a U-shaped network with a rectified attention module, to enhance information interaction and recalibrate contaminated attention maps. With luminance recovered, CRNet then leverages cross-attention mechanisms to revive vibrant colors, producing visually compelling results. Extensive experiments on multiple datasets are conducted to demonstrate the superiority of ShadowHack over existing state-of-the-art solutions both quantitatively and qualitatively, highlighting the effectiveness of our design. Our code will be made publicly available.
