Coder Social home page Coder Social logo

peterzs / pointar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cake-lab/pointar

0.0 1.0 0.0 21.09 MB

The official repo for PointAR: Efficient Lighting Estimation for Mobile Augmented Reality

Home Page: https://yiqinzhao.me/project/point-ar/

License: GNU General Public License v3.0

Shell 0.39% Python 28.76% Cuda 1.38% Jupyter Notebook 69.47%

pointar's Introduction

PointAR: Efficient Lighting Estimation for Mobile Augmented Reality (Project Page)

Yiqin Zhao, Tian Guo

This is the official code release for PointAR which was published in ECCV 2020.

Overview

We propose an efficient lighting estimation pipeline that is suitable to run on modern mobile devices, with comparable resource complexities to state-of-the-art on-device deep learning models. Our pipeline, referred to as PointAR, takes a single RGB-D image captured from the mobile camera and a 2D location in that image, and estimates a 2nd order spherical harmonics coefficients which can be directly utilized by rendering engines for indoor lighting in the context of augmented reality. Our key insight is to formulate the lighting estimation as a learning problem directly from point clouds, which is in part inspired by the Monte Carlo integration leveraged by real-time spherical harmonics lighting. While existing approaches estimate lighting information with complex deep learning pipelines, our method focuses on reducing the computational complexity. Through both quantitative and qualitative experiments, we demonstrate that PointAR achieves lower lighting estimation errors compared to state-of-the-art methods. Further, our method requires an order of magnitude lower resource, comparable to that of mobile-specific DNNs.

Paper

PointAR: Efficient Lighting Estimation for Mobile Augmented Reality.

If you use the PointAR data or code, please cite:

@InProceedings{pointar_eccv2020,
    author="Zhao, Yiqin
    and Guo, Tian",
    title="PointAR: Efficient Lighting Estimation for Mobile Augmented Reality",
    booktitle="European Conference on Computer Vision (ECCV)",
    year="2020",
}

How to use the repo

First, clone the repo.

git clone [email protected]:cake-lab/PointAR.git
cd PointAR

Then, install all the dependencies with pipenv:

pipenv install
pipenv shell

# The following script will automatically install PyTorch with CUDA 11
# If you are running a different CUDA version, please modify corresponding lines
./install_deps.sh

Preprocess Steps

One of the key steps in reproducing our work is to generate the transformed point cloud datasets. We provide the scripts which can be found in datasets/pointar for users to generate their respective datasets. At the high level,

  • users should first obtain access to the two open-source datasets (i.e., Matterport3D and Neural Illumination datasets);
  • download these two datasets to a desirable directory. For the Matterport3D dataset, unzip the downloaded zip files and place them in a directory with structure similar to v1/scans/<SCENE_ID>/.... For the Neural Illumination dataset, just store the downloaded zip files, i.e. illummaps_<SCENE_ID>.zip, directly in a directory.
  • modify the corresponding the path variable in config.py file to reflect the local directory name;
  • then use the gen_data.py script to start generation.

Note it can take a few hours to generate the entire dataset (~1.4TB) depending on the GPU devices.

Model Training

To train the model:

python train.py

# For getting help info of the training script
python train.py --help

Our point cloud training component leverages the PointConv.

Acknowledgement

This work is supported in part by National Science Foundation grants #1755659 and #1815619.

pointar's People

Contributors

belindanju avatar yiqinzhao avatar

Watchers

 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.