MIT Intrinsic Images
The code and data are available as separate tarballs:
Unpack the tarballs and merge if necessary. The top-level folder, named
MIT-intrinsic
by default, should contain the README, four python
files, the data folder, and an empty results folder.
The four python files are:
After installing the required packages (see below), you should be able to
reproduce most of the results from the paper by running comparison.py:
cd MIT-intrinsic
python comparison.py
This will evaluate the algorithms using hold-one-out cross-validation. It prints
results to the console, and also saves the shading/reflectance decompositions and
their error scores to the HTML file results/index.html
. If you change the USE_L1
variable (defined in comparison.py) to True
, it will use the L1 penalty for
reconstruction rather than least squares. In this case, the outputs will be saved to
results_L1/index.html
.
We have done our best to provide a code base which is readable, compact, and easy to extend.
Please send your questions and comments to Roger Grosse (rgrosse at mit dot edu).
To run the code, you will need Python as well as the following
Python libraries:
Detailed installation instructions for a variety of platforms are provided below.
At the time of writing, the latest PyAMG installer was for Python 2.5. To keep the process
simple, we have tested our software against Python 2.5.
Download and run the installers for the following packages:
We also recommend:
If all packages are installed correctly, you can run the code by
double-clicking comparison.py from within Windows Explorer.
We encountered issues with the installers for NumPy and SciPy when attempting to
install on a standard OS X 10.5 Leopard system. To get around
these issues, we used third-party installers as described below.