A+D-Net: Shadow Detection with Adversarial Shadow Attenuation

Hieu M. Le, Tomas F. Yago Vicente, Vu Nguyen, Minh Hoai, Dimitris Samaras

Abstract

Shadow detection is a fundamental computer vision task complicated by the intricate physics of light and material interactions. This paper presents A+D-Net, a framework that utilizes a Generative Adversarial Network (GAN) to perform adversarial shadow attenuation. By training an "Attenuator" (A-Net) to generate physics-constrained hard examples and a "Detector" (D-Net) to identify them, the system achieves state-of-the-art performance on major benchmarks. A+D-Net achieves a Balanced Error Rate (BER) of 5.4% on the SBU dataset and maintains real-time performance at 45 FPS.

Introduction

Shadow detection is essential for various applications, yet it faces significant hurdles: data scarcity and the limitations of standard data augmentation. High-quality annotated datasets are relatively small, and simple geometric transformations like flipping do not capture the physical complexity of shadows. Synthetic shadow generation often introduces unrealistic artifacts or "label noise."

A+D-Net addresses these issues by "attenuating" (weakening) existing shadows through adversarial training. This process creates a more robust detector capable of identifying even subtle shadows in diverse environments without requiring expensive manual labeling for new samples.

Methodology

The A+D-Net framework consists of two jointly trained networks: the Attenuator (A-Net) and the Detector (D-Net).

A-Net (The Attenuator)

A-Net serves as the generator in the GAN setup. It takes a shadow image and its corresponding ground-truth mask, then modifies the shadow pixels to make them lighter. To ensure these adversarial samples remain realistic, A-Net is constrained by a simplified physical illumination model. A "physics loss" maintains the log-ratio of intensities between shadow and non-shadow regions, preventing the creation of unrealistic artifacts.

D-Net (The Detector)

D-Net acts as the discriminator, trained to predict shadow masks for both original images and the challenging adversarial images produced by A-Net. It is a fully convolutional U-Net that produces clean results in a single pass, eliminating the need for complex post-processing like Conditional Random Fields (CRF).

The A+D-Net framework: A-net generates adversarial shadow images to challenge D-net, which predicts shadow masks.

Key Innovations

  • Adversarial Data Augmentation: The training set evolves dynamically. As D-Net improves, A-Net produces increasingly subtle shadows to challenge it.
  • Shadow Strength Heuristic: To prevent "label noise" where shadows are lightened until they disappear, a heuristic measures shadow strength. D-Net is not penalized for missing shadows that have become physically unrealistic.

Experimental Setup

The model was evaluated on two primary benchmarks:

  • SBU Shadow Dataset: The largest benchmark with 4,089 training and 638 testing images.
  • UCF Dataset: Used for cross-dataset evaluation to test generalization.

Results

A+D-Net achieves state-of-the-art accuracy, significantly outperforming previous methods. On the SBU dataset, it reached a Balanced Error Rate (BER) of 5.4%, compared to 9.1% for scGAN and 8.1% for ST-CGAN.

Evolution of adversarial shadow samples across training epochs.

The model also demonstrated superior generalization in cross-dataset tests (training on SBU, testing on UCF) and achieved real-time speeds of 45 FPS for $256 \times 256$ images. Ablation studies confirmed that the physics-based loss is vital; removing it caused the BER to degrade from 5.4% to 7.1%.

Discussion and Limitations

While A+D-Net sets a new standard, challenges remain. The model occasionally confuses dark-colored materials (low albedo) with shadows. Additionally, boundary precision is an area for improvement, as 65% of false negatives occur within 10 pixels of a shadow boundary. Future work may involve incorporating more complex geometry or multi-view data to further refine the Attenuator's physics model.

Conclusion

A+D-Net demonstrates that physics-constrained adversarial attenuation is a highly effective strategy for shadow detection. By forcing the detector to learn from increasingly difficult examples, the framework achieves both high accuracy and real-time efficiency, making it suitable for practical video applications.

Summary updated

BibTeX
@inproceedings{le2018d,
  author = {Hieu M. Le and Tomas F. Yago Vicente and Vu Nguyen and Minh Hoai and Dimitris Samaras},
  title = {{A+D-Net: Shadow Detection with Adversarial Shadow Attenuation}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01216-8\_41},
}
Figure