Introduction
Shadow removal is a fundamental task in computer vision that involves restoring the underlying texture and color of regions obscured by shadows. Unlike simple brightness adjustments, shadow removal is an ill-posed reconstruction problem because the information in shadowed regions is often significantly degraded. This paper introduces LFG-Diffusion, a novel framework that leverages the generative power of diffusion models guided by a learned latent feature space to achieve state-of-the-art performance.
Challenges in Shadow Removal
Existing methods for shadow removal frequently encounter two primary obstacles:
- Color Mixture and Bleeding: Many models are conditioned on the surrounding non-shadowed areas. This often leads to the "borrowing" of incorrect colors or textures, resulting in unnatural artifacts and visible boundaries.
- Posterior Collapse: In conditional diffusion models, the strong guidance provided by the shadow image and mask can cause the model to ignore latent noise variables. This leads to a local optimum where the model fails to generate fine details or diverse outputs, essentially becoming "lazy" in its reconstruction.
The LFG-Diffusion Framework
To address these issues, the authors propose a two-stage Latent Feature-Guided Diffusion Model. The core of the architecture is the integration of a learnable feature encoder ($E_\theta$) and a specialized fusion module.
Latent Feature Guidance
Instead of directly concatenating the shadow image and mask, LFG-Diffusion utilizes a feature encoder trained to map both shadowed and shadow-free images into a shared "latent feature space." By employing an invariant loss, the encoder learns to extract scene content while remaining invariant to shadow degradation. This provides a "shadow-free prior" that guides the diffusion process.
Two-Stage Learning and DLVF
The training process involves two distinct stages:
- Pretraining: The model is first trained on shadow-free images to establish a perceptual prior of clean, high-fidelity textures.
- Finetuning: The model is then trained on shadow/shadow-free pairs, using the latent features to reconstruct the shadowed regions.
To combat posterior collapse, the Dense Latent Variable Fusion (DLVF) module was developed. As shown in the architecture diagram, DLVF uses dense skip connections and multi-layer perceptron (MLP) embeddings to integrate noise variables into every level of the diffusion network. This forces the model to actively utilize the latent space rather than relying solely on the input image.
Experimental Evaluation
The LFG-Diffusion model was evaluated on several benchmarks, including ISTD, AISTD, SRD, and the instance-level DESOBA dataset.
Quantitative Results
The model demonstrated significant improvements over existing state-of-the-art methods:
- AISTD Dataset: Achieved a 13% reduction in RMSE compared to the previous best method, BMN.
- DESOBA Dataset: In instance-level shadow removal—a complex real-world scenario with multiple shadows—the model outperformed SG-ShadowNet by 82% in RMSE.
Qualitative Performance
Qualitative analysis reveals that LFG-Diffusion produces images with superior color consistency and sharper textures. The model effectively eliminates "ghosting" artifacts at shadow boundaries, a common failure mode for baseline methods.
Efficiency and Distillation
To address the computational demands of diffusion models, the authors introduced a distilled version. This variant reduces the parameter count from 82.6M to 25.5M and accelerates inference from 2.76s to 0.24s per image, making the approach more viable for practical applications.
Conclusion
LFG-Diffusion represents a significant step forward in shadow removal by combining pixel-space diffusion with latent-space guidance. By pretraining on shadow-free priors and implementing dense fusion to prevent posterior collapse, the model achieves remarkable fidelity and robustness. Future work may extend this latent-guided framework to other restoration tasks such as reflection or rain removal.
Summary updated