Shadow Detection and removal is the process of enhance the computer vision applications including image segmentation, object recognition, object tracking etc. Detection and Removal of shadow from the images and videos can reduce the undesirable outcomes in the computer vision applications and algorithms.
-
ShadowSight uses Stacked Conditional GANs trained on ISTD and implemented unofficially in this project.
-
This project gives the service of shadow detection and removal in the form of a Flask application
- Flask
- Python3.x
- PyTorch 1.5.0
- pillow
- matplotlib
- Download the checkpoints (pre-trained model) from here and place them in a folder called checkpoints.
- Run
app.py
to start the application locally. You can make changes to parameters inside the scripts as needed.
- Set datasets under
./dataset
. You can Download datasets from here.
Then,
python3 train.py
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>
Here is a result from test sets. (Left to right: input, ground truth, shadow removal, ground truth shadow, shadow detection)
Here are some results from validation set. (Top to bottom: ground truth, shadow detection)
Here are some results from validation set. (Top to bottom: input, ground truth, shadow removal)
You can download from here.
- Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal, Jifeng Wang∗, Xiang Li∗, Le Hui, Jian Yang, Nanjing University of Science and Technology, [arXiv]