Giter VIP home page Giter VIP logo

intrinsicimage's Introduction

Revisiting Deep Intrinsic Image Decompositions

This is the implementation of CVPR 2018 Oral paper "Revisiting Deep Intrinsic Image Decompositions" by Qingnan Fan et al..

Compilation

Our codes are implemented in Torch framework. Some self-defined layers are included in the 'compile' folder. Before testing or training the models, you need to install the latest torch framework and compile the *.lua under the nn module, the *.cu and *.h under the cunn module, and adam_state.lua under optim module.

To be specific, the lua files have to be put in ./torch/extra/nn/ module directory, and editing init.lua file to include the corresponding file. Finally run the command under nn directory, luarocks make ./rocks/nn-scm-1.rockspec. Then nn module will be independently compiled.

Similarly for the cuda files, they need to be put into ./torch/extra/cunn/lib/THCUNN/ module directory, then editing the ./torch/extra/cunn/lib/THCUNN/generic/THCUNN.h to include the corresponding files, and finally run the command luarocks make ./rocks/cunn-scm-1.rockspec under ./torch/extra/cunn folder to compile them.

Accordingly, the adam lua file has to be put in ./torch/pkg/optim, edit the init.lua file and then run luarocks make optim-1.0.5-0.rockspec.

Data Generation

The training data for IIW can be directly obtained from their official project page. The training data for the guidance network of IIW data is L1smooth results, which is shared from this link. Note the IIW label is transfered by us into txt format for training, we include these IIW txt label files into this link. As for MIT and MPI-Sintel dataset, whose data sources may be inconvinient to obtain, we also include them in the last link.

Run gen_trainData_MPI.m to crop and flip the MPI images to generate our training data. The input images to our network have to cropped to image size of even number as we downsample the intermediate feature maps by half.

The sparse label of IIW dataset is in json file format originally, we extract the useful information and transfer them to txt file. You can either transfer the labels using transferIIW.m or directly use the transfered files in our released dataset.

The training and testing file lists are included into the .txt files in the dataset folder.

Training

The trained models are all in the netfiles folder.

To train the models from scratch, run the files in the training folder.

Since we levearge two-fold cross validation for the MPI dataset, training on both the train and test split of MPI data is required.

Evaluation

To test our trained model, run test_*.lua files, while to evaluate the numerical errors, run compute_*_error files.

Cite

You can use our codes for research purpose only. And please cite our paper when you use our codes.

@article{fan2018revisiting,
  title={Revisiting Deep Intrinsic Image Decompositions},
  author={Fan, Qingnan and Yang, Jiaolong and Hua, Gang and Chen, Baoquan and Wipf, David},
  booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
  year={2018}
}

Contact

If you find any bugs or have any ideas of optimizing these codes, please contact me via fqnchina [at] gmail [dot] com

intrinsicimage's People

Contributors

fqnchina avatar

Watchers

James Cloos avatar Wang Pengfei 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.