GitPedia

ST CGAN Stacked Conditional Generative Adversarial Networks

Unofficial implementation of ''Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal'' with PyTorch

From IsHYuhi·Updated April 11, 2026·View on GitHub·

This repository is unofficial implementation of [Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal](https://arxiv.org/abs/1712.02478) [Wang+, **CVPR** 2018] with PyTorch. The project is written primarily in Python, first published in 2020. Key topics include: computer-graphics, computer-vision, deep-learning, gan, generative-adversarial-network.

ST-CGAN: Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal with PyTorch

This repository is unofficial implementation of Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal [Wang+, CVPR 2018] with PyTorch.

Official Dataset and Code(coming soon...) is here.

Requirements

  • Python3.x
  • PyTorch 1.5.0
  • pillow
  • matplotlib

Usage

  • Set datasets under ./dataset. You can Download datasets from here.

Then,

Training

python3 train.py

Testing

When Testing images from ISTD dataset.

python3 test.py -l <checkpoint number>

When you would like to test your own image.

python3 test.py -l <checkpoint number> -i <image_path> -o <out_path>

Results

Here is a result from test sets.

(Left to right: input, ground truth, shadow removal, ground truth shadow, shadow detection)

Shadow Detection

Here are some results from validation set.

(Top to bottom: ground truth, shadow detection)

Shadow Removal

Here are some results from validation set.

(Top to bottom: input, ground truth, shadow removal)

Trained model

You can download from here.

References

  • Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal, Jifeng Wang<sup></sup>, Xiang Li<sup></sup>, Le Hui, Jian Yang, Nanjing University of Science and Technology, [arXiv]
This article is auto-generated from IsHYuhi/ST-CGAN_Stacked_Conditional_Generative_Adversarial_Networks via the GitHub API.Last fetched: 6/28/2026