Giter Site home page Giter Site logo

gcmiao / inversetransportnetworks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmu-ci-lab/inversetransportnetworks

0.0 0.0 0.0 73 MB

Towards Learning-based Inverse Subsurface Scattering

Home Page: http://imaging.cs.cmu.edu/inverse_transport_networks/

License: GNU General Public License v3.0

Shell 0.16% Python 1.65% CMake 1.82% C 6.14% Makefile 0.02% C++ 83.29% XSLT 0.15% Batchfile 0.01% PowerShell 0.01% TeX 2.39% Objective-C 3.71% Objective-C++ 0.36% GLSL 0.32% CSS 0.01%

inversetransportnetworks's Introduction

Inverse Transport Networks

This repsitory is an implementation of the method described in the following paper:

"Towards Learning-based Inverse Subsurface Scattering"
Chengqian Che, Fujun Luan, Shuang Zhao, Kavita Bala, and Ioannis Gkioulekas
IEEE International Conference on Computational Photography (ICCP), 2020

Getting Started

These instruction constains three parts:

  • ITNSceneFiles - scripts and additional files needed for rendering our dataset images and derivatives
  • Renderer - a Monte-Carlo Differentiable renderer based on Mitsuba 0.5.0
  • Learning - codes for training and evaluating our networks

Rendering Scripts

We used Mitsuba to generate our dataset. Our image file name follows the convention as: [shape]_e[sunlight_direction]_d[sigmaT]_a[albedo]_g[g]_q[sampleCount].exr

For example, one can render the following scenes:

  • shape: cube
  • sunDirection: azimuth angle 30 and elevation angle 60
  • materials: sigmaT 100, volumetric albedo 0.8 and g 0.2
  • number of samples: 4096
mitsuba scenes/cube_sunsky.xml -Dmeshmodel=cube -DsigmaT=100 -Dalbedo=0.8 -Dg=0.2 -DnumSamples=4096 -Dx=0.433 -Dy=0.866 -Dz=0.25 -o cube_e30_d100_a0.8_g0.2_q4096.exr

One can also render a class of images using the following bash scripts with Sun Grid Engine:

./create_jobs_sge.sh

Differentiable Renderer

We developed our differentiable renderer based on Mitsuba 0.5.0 and it compiles the same way as compiling Mistuba. To compile and render a signle image with derivatives:

cd renderer
scons
mitsuba scenesAD/cube_sunsky.xml -Dmeshmodel=cube -DsigmaT=100 -Dalbedo=0.8 -Dg=0.2 -DnumSamples=4096 -Dx=0.433 -Dy=0.866 -Dz=0.25 -o cube_e30_d100_a0.8_g0.2_q4096.exr

The current renderer supports computing derivatives with respect to the following parameters:

  • scattering parameters: extinction coefficient, volumetric albedo and g in Henyey-Greenstein phase function
  • bsdf parameters:roughness, reflectance and weights in a mixure of bsdfs
  • lighitng: weights in a mixture of environment maps

In the sceneAD files, one can define The output image contains multiple channels with corrsponding channel names:

channel name Description
forward forward rendering
sigmaT derivatives with respect to extinction coefficient
albedo derivatives with respect to volemetric albedo
g derivatives with respect to averaged cosine Henyey-Greenstein phase function
reflectance derivatives with respect to surface albedo
alpha derivatives with respect to surface roughness
weight derivatives with respect to weights in a mixture models

Learning code

Codes used to train and evaluate our approach is inside folder learning/. Pre-trainined models with 5 different networks can be downloaded here.

Built With

The networks were trained using Amazon EC2 clusters. All image names are in ITNSceneFiles/imgNames/. One can evaluate our model by doing:

python eval.py

And to use our models to initialize analysis by synthesis, one can run:

 python eval_calibrated.py

inversetransportnetworks's People

Contributors

brucect2 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.