[Paper Review] Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal
This paper proposes ST-CGAN, a novel stacked conditional GAN framework that jointly learns shadow detection and shadow removal in an end-to-end manner. By stacking two conditional GANs—first for detecting shadow masks and then for reconstructing shadow-free images—the model leverages mutual supervision and preserves global scene context, achieving state-of-the-art performance on detection and removal tasks, validated on a new large-scale ISTD benchmark with 1,870 image triplets.
Understanding shadows from a single image spontaneously derives into two types of task in previous studies, containing shadow detection and shadow removal. In this paper, we present a multi-task perspective, which is not embraced by any existing work, to jointly learn both detection and removal in an end-to-end fashion that aims at enjoying the mutually improved benefits from each other. Our framework is based on a novel STacked Conditional Generative Adversarial Network (ST-CGAN), which is composed of two stacked CGANs, each with a generator and a discriminator. Specifically, a shadow image is fed into the first generator which produces a shadow detection mask. That shadow image, concatenated with its predicted mask, goes through the second generator in order to recover its shadow-free image consequently. In addition, the two corresponding discriminators are very likely to model higher level relationships and global scene characteristics for the detected shadow region and reconstruction via removing shadows, respectively. More importantly, for multi-task learning, our design of stacked paradigm provides a novel view which is notably different from the commonly used one as the multi-branch version. To fully evaluate the performance of our proposed framework, we construct the first large-scale benchmark with 1870 image triplets (shadow image, shadow mask image, and shadow-free image) under 135 scenes. Extensive experimental results consistently show the advantages of ST-CGAN over several representative state-of-the-art methods on two large-scale publicly available datasets and our newly released one.
Motivation & Objective
- To address the limitations of existing methods that treat shadow detection and removal as isolated tasks, often relying on local features and lacking global scene understanding.
- To explore the mutual benefits between shadow detection and shadow removal by jointly training both tasks in a unified deep learning framework.
- To design a novel stacked architecture that enables forward and backward information flow across tasks, differing from standard multi-branch approaches.
- To construct and release the first large-scale benchmark dataset with paired shadow images, ground-truth masks, and shadow-free images for multi-task learning.
- To demonstrate that joint learning via stacked adversarial networks improves both detection accuracy and removal quality through hierarchical global feature modeling.
Proposed method
- The framework uses a stacked architecture of two conditional GANs: the first generator produces a shadow detection mask from a shadowed image, and the second generator reconstructs a shadow-free image using the original image and the predicted mask.
- Each generator is paired with a discriminator that distinguishes real from generated outputs, with the first discriminator assessing detection quality and the second evaluating reconstruction realism.
- The stacked design ensures that all prior task outputs (input image, detection mask, and reconstructed image) are concatenated and fed into subsequent components, enabling dense feature flow akin to DenseNet.
- The model is trained end-to-end using adversarial loss, L1 loss for reconstruction, and binary cross-entropy for mask prediction, promoting both fidelity and realism.
- The architecture is designed to preserve global scene semantics and illumination consistency by modeling high-level relationships through stacked discriminators.
- Ablation studies confirm the necessity of each component, including the stacked structure and joint training, which outperform single-task or multi-branch alternatives.
Experimental results
Research questions
- RQ1Can joint learning of shadow detection and shadow removal improve performance in both tasks compared to independent training?
- RQ2Does a stacked architecture that sequentially processes tasks with shared information flow outperform standard multi-branch architectures in multi-task learning for shadow manipulation?
- RQ3To what extent does preserving global scene context through stacked discriminators enhance detection and removal quality?
- RQ4How effective is the proposed framework on a large-scale benchmark with paired shadow, mask, and shadow-free images?
- RQ5What is the contribution of mutual supervision between detection and removal in improving model generalization and robustness?
Key findings
- ST-CGAN achieves the lowest RMSE on both shadow and non-shadow regions in shadow removal, with 7.47 overall RMSE on the ISTD dataset, outperforming all SOTA methods.
- On shadow detection, ST-CGAN achieves a balanced error rate (BER) of 3.85%, significantly lower than the 4.77% of the multi-branch baseline, indicating superior detection accuracy.
- The model successfully detects fine-grained shadow details such as leaf shadows and edge cases on bright surfaces, where cGAN and scGAN fail.
- Ablation studies confirm that removing any component—especially the stacked structure—leads to consistent performance drops, proving its necessity.
- The stacked joint learning framework outperforms a fair multi-branch baseline in all metrics, demonstrating the superiority of sequential, information-rich task stacking over parallel task branches.
- The proposed ISTD dataset of 1,870 triplets (shadow, mask, shadow-free) is the first large-scale benchmark for joint shadow learning, publicly released to support future research.
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.