Code Monkey home page Code Monkey logo

dsc-pytorch's Introduction

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

Citations

@InProceedings{Hu_2018_CVPR,      
    author = {Hu, Xiaowei and Zhu, Lei and Fu, Chi-Wing and Qin, Jing and Heng, Pheng-Ann},      
    title = {Direction-Aware Spatial Context Features for Shadow Detection},      
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},      
    pages={7454--7462},        
    year = {2018}
}

@article{hu2019direction,   
    author = {Hu, Xiaowei and Fu, Chi-Wing and Zhu, Lei and Qin, Jing and Heng, Pheng-Ann},    
    title = {Direction-Aware Spatial Context Features for Shadow Detection and Removal},    
    journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},    
    year  = {2019},          
    note={to appear}                  
}

Modified DSC module is used in SPANet:

@InProceedings{Wang_2019_CVPR,
  author = {Wang, Tianyu and Yang, Xin and Xu, Ke and Chen, Shaozhe and Zhang, Qiang and Lau, Rynson W.H.},
  title = {Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2019}
}

TODO List

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

dsc-pytorch's People

Contributors

stevewongv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.