Giter Site home page Giter Site logo

tensor_holography's Introduction

Tensor Holography

Towards Real-time Photorealistic 3D Holography with Deep Neural Networks (TensorHolo V1)
Nature 2021
Project Page | Paper | Data
Liang Shi, Beichen Li, Changil Kim, Petr Kellnhofer, Wojciech Matusik

End-to-end Learning of 3D Phase-only Holograms for Holographic Display (TensorHolo V2)
Light: Science and Applications 2022 [Impact factor: 20.26 (in 2022)]
Project Page | Paper | Data
Liang Shi, Beichen Li, Wojciech Matusik

This repository contains the code to reproduce the results presented in the above papers. Please read the License before using the software.

(New) Related Works

Ergonomic-Centric Holography: Optimizing Realism, Immersion, and Comfort for Holographic Display
Arxiv 2023
Project Page (in preparation) | Paper | Supplement | Code (in preparation)
Liang Shi*, DongHun Ryu*, Wojciech Matusik (* indicates equal contribution)

Getting Started

8/9/2022 Update: TensorHolo V2 code/dataset released.

This code runs with Python 3.8 and Tensorflow 1.15 (NVIDIA-maintained version to support training on the latest NVIDIA GPUS). You can set up a conda environment with the required dependencies using:

conda env create -f environment.yml
conda activate tensorholo
pip install nvidia-pyindex
pip install nvidia-tensorflow[horovod]

Alternatively, set up the following enviroment if you plan to export the model for TensorRT accelerated inference. The following instructions are tested on Ubuntu 20.04 with Python=3.8 CUDA=11.6 and TensorRT=8.4.

# Install CUDA 11.6 (Change to the correct link based on your own system)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda-repo-ubuntu2004-11-6-local_11.6.1-510.47.03-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-6-local_11.6.1-510.47.03-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-6-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

# Install TensorRT
# Download deb package from NVIDIA
# Replace xx in the os and tag with your package name
os="ubuntuxx04"
tag="cudax.x-trt8.x.x.x-yyyymmdd"
sudo dpkg -i nv-tensorrt-repo-${os}-${tag}_1-1_amd64.deb
sudo apt-key add /var/nv-tensorrt-repo-${os}-${tag}/7fa2af80.pub
sudo apt-get update
sudo apt-get install tensorrt

# Install other relevant packages
sudo apt-get install python3-libnvinfer-dev
sudo apt-get install onnx-graphsurgeon

# Add tensorrt bin path to use trtexec
export PATH=/usr/src/tensorrt/bin:$PATH

# Create a tensorrt environment
conda env create -f environment_trt.yml
conda activate trt
pip install nvidia-pyindex
pip install nvidia-tensorflow[horovod]
pip install nvidia-tensorrt

High-level structure

The code is organized as follows:

  • main.py defines/trains/validates/evaluates/exports the CNN for TensorHolo V1.
  • main_v2.py defines/trains/validates/evaluates/exports the CNN for TensorHolo V2.
  • optics.py contains optics-related helper functions and various implementations of double phase encoding.
  • util.py contains several utility functions for network training.
  • tfrecord.py contains code to generate and parse tfrecord.
  • tensorrt_onnx.py contains code to generate a TensorRT engine for accelerated inference.

Citation

If you find our work useful in your research, please cite:

@article{Shi2021:TensorHolography,
    title   = "Towards real-time photorealistic {3D} holography with deep neural
                networks",
    author  = "Shi, Liang and Li, Beichen and Kim, Changil and Kellnhofer, Petr
                and Matusik, Wojciech",
    journal = "Nature",
    volume  =  591,
    number  =  7849,
    pages   = "234--239",
    year    =  2021
}
@article{Shi2022:TensorHolography-v2,
    title    = "End-to-end learning of {3D} phase-only holograms for holographic
                display",
    author   = "Shi, Liang and Li, Beichen and Matusik, Wojciech",
    journal  = "Light Sci Appl",
    volume   =  11,
    number   =  1,
    pages    = "247",
    month    =  aug,
    year     =  2022,
    language = "en"
} 
@misc{Shi2023:EC-H,
    title={Ergonomic-Centric Holography: Optimizing Realism,Immersion, and Comfort for Holographic Display}, 
    author={Liang Shi and Donghun Ryu and Wojciech Matusik},
    year={2023},
    eprint={2306.08138},
    archivePrefix={arXiv},
    primaryClass={cs.GR}
}

License

Our dataset and code, with the exception of the files in "data/example_image", are licensed under a custom license provided by the MIT Technology Licensing Office. By downloading the software, you agree to the terms of this License.

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.