This is the implementation of the paper "InverseRenderNet: Learning single image inverse rendering". The model is implemented in tensorflow.
If you use our code, please cite the following paper:
@inproceedings{yu19inverserendernet,
title={InverseRenderNet: Learning single image inverse rendering},
author={Yu, Ye and Smith, William AP},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2019}
}
To run our evaluation code, please create your environment based on following dependencies:
tensorflow 1.12.0
python 3.6
skimage
cv2
numpy
- Download our pretrained model from: Link
- Unzip the downloaded file
- Make sure the model files are placed in a folder named "irn_model"
You can perform inverse rendering on random RGB image by our pretrained model. To run the demo code, you need to specify the path to pretrained model, path to RGB image and corresponding mask which masked out sky in the image. The mask can be generated by PSPNet, which you can find on https://github.com/hszhao/PSPNet. Finally inverse rendering results will be saved to the output folder named by your argument.
python3 test_demo.py --model /PATH/TO/irn_model --image demo.jpg --mask demo_mask.jpg --output test_results
-
IIW dataset should be downloaded firstly from http://opensurfaces.cs.cornell.edu/publications/intrinsic/#download
-
Run testing code where you need to specify the path to model and IIW data:
python3 test_iiw.py --model /PATH/TO/irn_model --iiw /PATH/TO/iiw-dataset