GithubHelp home page GithubHelp logo

nishr / adjointnonlinearraytracing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arjunteh/adjointnonlinearraytracing

0.0 0.0 0.0 467 KB

Differentiable ray tracing through inhomogeneous media

Shell 0.20% C++ 31.20% Python 65.99% C 0.02% CMake 2.59%

adjointnonlinearraytracing's Introduction

Adjoint Nonlinear Ray Tracing

Installation Instructions

The code has been built and tested on Ubuntu 20.04

The project uses Python 3.8 and the following packages:

  • numpy
  • pytorch >1.8 (with cuda)
  • matplotlib
  • tqdm
  • PIL

For the C++ part of the project, cmake is used, which also requires that all of the submodules are downloaded as well. This project relies on enoki.

Run the following command to generate the build files.

mkdir -p build
cd build

cmake .. \
    -DENOKI_CUDA=1 \
    -DENOKI_AUTODIFF=1 \
    -DENOKI_PYTHON=1

If you are using the conda environment, it might be necessary to directly link to your python executable and library:

cmake .. \
    -DENOKI_CUDA=1 \
    -DENOKI_AUTODIFF=1 \
    -DENOKI_PYTHON=1 \
    -DPYTHON_EXECUTABLE:FILEPATH=$CONDA_PYTHON_EXE \
    -DPYTHON_LIBRARY:FILEPATH=$CONDA_PREFIX/{path_to_python_library}

After the build files are generated, run:

make
cd ..
source setpath.sh

This will run the build as well as source the output folders so that python can find the drrt library.

Running the code

To run some of the experiments from the code, directly run one of the experiement scripts in the core folder.

python core/luneburg_opt.py

Otherwise, if you would like to use the code directly in your own python scripts, just import the drrt package and the enoki package.

import drrt
import enoki

# your code here

adjointnonlinearraytracing's People

Contributors

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