Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This implements the intrinsic image decomposition algorithm described in "Learning Data-driven Reflectance Priors for Intrinsic Image Decomposition, T. Zhou, P. Krähenbühl and A. A. Efros, ICCV 2015". If you use our code for academic purposes, please consider citing:

  	title={Learning data-driven reflectance priors for intrinsic image decomposition},
  	author={Zhou, Tinghui and Kr\"ahenb\"uhl, Philipp and Efros, Alexei A},
  	booktitle={Proceedings of the IEEE International Conference on Computer Vision},

Dependencies & Compilation:

  • The codebase was tested with Python 3, but it should be straightforward to adapt it to Python 2 if needed.
  • A copy of Caffe used to produce the results in our ICCV paper is included for completeness. It was based on the 'repack' branch ( forked from the official BVLC Caffe repository ( The major reason of using this branch is its support of 'repack' layer, which allows efficient extraction of dense, per-pixel feature map despite >1 stride/pooling size of the Conv layers.
  • The decomposition code is built upon the IIW codebase (, which is modified to support our learned reflectance priors. Please also cite "Intrinsic Images in the Wild, Bell et al., SIGGRAPH 2014" if you use the decomposition code.
  • To compile the code from the top level directory, you need to install Caffe:
cd caffe
mkdir build
cd build
cmake ../ -Dpython_version=3
make -j8

and the DenseCRF package:

cd bell2014/krahenbuhl2013/

Some further notes:

  • If you encounter problems with cmake, it might be that Ubuntu 14.04 (or older version) does not recognize Python 3.4 directly. You will need to add 3.4 to the line with 'set(_PYTHON3_VERSIONS ...)' for the system's 'FindPythonInterp.cmake' and 'FindPythonLibs.cmake' files.
  • If your Protobuf version is below 3.0 (run 'protoc --version' to see), you will need to install the 3.0 version from, and run 'sudo -H pip3 install -U --pre protobuf' to install the corresponding python bindings.

Running the demo:

Once the above installation is complete, running


should output the decomposition of 'sample.png' to 'sample-r.png' and 'sample-s.png', respectively. This corresponds to the teaser example (Fig. 1) in our paper.

Evaluation on the IIW test split:

The original IIW dataset does not provide a training/test split. Instead, we used the split provided by "Learning Lightness from Human Judgement on Relative Reflectance, Narihira et al., CVPR 2015" for our experiments. To evaluate the network performance on relative reflectance judgment:

cd iiw_experiments/
python3 [Path to IIW directory]

To evaluate the decomposition performance using our learned reflectance prior:

cd iiw_experiments/
python3 [Path to IIW directory] [Output directory]


No description, website, or topics provided.







No releases published


No packages published