Skip to content

A PyTorch implementation of "Direction-Aware Spatial Context Features for Shadow Detection" CVPR'18 | T-PAMI'19

License

Notifications You must be signed in to change notification settings

21Chance/DSC-PyTorch

 
 

Repository files navigation

DSC-PyTorch

This is a PyTorch implementation of "Direction-Aware Spatial Context Features for Shadow Detection, CVPR'18" and detection part of "Direction-Aware Spatial Context Features for Shadow Detection and Removal, T-PAMI'19" based on Xiaowei's DSC (Caffe) written by Tianyu Wang.

The Spacial IRNN is implemented by using CUDA 9.0. The backbone is ResNeXt101 pre-trained on ImageNet and the implementation of loss is from Quanlong Zheng.

Results

We use two GTX 1080Ti to train the DSC on SBU dataset.

SBU

Methods BER Accuracy
DSC (Caffe) 5.59 0.97
DSC (Our) 5.43 0.96
  • You can download the pre-trained model from Google Drive and put it into SBU_model folder.

  • You can download the ResNeXt101 model from Google Drive and put it in main folder.

Requirements

  • PyTorch == 0.4.1 (1.0.x may not work for training)
  • Cupy (Installation Guide)
  • TensorBoardX
  • Python3.6
  • progressbar2
  • scikit-image
  • pydensecrf

Train/Test

  1. Clone this repository
git clone https://github.com/stevewongv/DSC-PyTorch.git
  1. Train
python3 main.py -a train
  1. Test
python3 main.py -a test

TODO List

  • ResNext101 Backbone
  • Test on SBU Test Set
  • VGG19 Backbone
  • Test on ISTD Test Set
  • Test on UCF Test Set
  • ...

About

A PyTorch implementation of "Direction-Aware Spatial Context Features for Shadow Detection" CVPR'18 | T-PAMI'19

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.3%
  • Cuda 9.4%
  • Shell 0.3%