Coder Social home page Coder Social logo

deep-photometric-stereo-network's Introduction

Deep photometric stereo network

This repository is an implementation of Deep Photometric Stereo Network. (http://openaccess.thecvf.com/content_ICCV_2017_workshops/w9/html/Santo_Deep_Photometric_Stereo_ICCV_2017_paper.html)

How to Train

We use the deep learning framework Tensorflow with following libraries:

We use python 2.7 on Ubuntu 14.04. You can use our Dockerfile.

Download datasets

We use following dataset for the training and evaluation.

You can download each file by download_*.sh. DiLiGenT is only used for evaluation.

params.py

This file defines paths of each dataset and the light source directions. Now the light source directions are fit to DiLiGenT dataset. You can modify this values for your setup.

Also, the path to save the training images are defined here.

Rendering training data

First, you need to build:

$ cd ./merl_brdf_database
$ cmake .
$ make

This is because we use BRDFRead.cpp to read MERL BRDF Database, which is the sample code in that project.

You can render synthetic training and test data by:

$ python renderin_with_merl.py

The training and test data are output to the specified path in params.py.

Preparing training data

We use TFRecord format for training data. You can convert rendered images to the TFRecord file by:

$ python dataset.py

Training

$ python train.py --output_path PATH_TO_SAVE_MODEL --gpu GPU_ID

Other arguments can be confirmed by --help option.

Directory tree of Model

PATH_TO_SAVE_MODEL has following directories:

summary

Summary for tensorboard

  • {train|test}/cost : Output of loss function
  • {train|test}/RMSE : Root Mean Squared Error between ground truth and predicted normal vector

checkpoint

Checkpoint files

best_checkpoint

Best checkpoint file. "Best" means that minimize the L_2 loss for synthetic test data.

eval

Estimated images for synthetic test data.

Result

Our estimated normal maps of DiLiGenT are available in .npy format. When you want to use them for the comparison, please contact to the first author of the paper.

deep-photometric-stereo-network's People

Contributors

hiroaki-santo avatar

Watchers

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