hashnerf-pytorch

Pure PyTorch Implementation of NVIDIA paper on Instant Training of Neural Graphics primitives: https://nvlabs.github.io/instant-ngp/

https://github.com/yashbhalgat/hashnerf-pytorch

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

3d-reconstruction artificial-intelligence computer-graphics computer-vision efficient-training hashing machine-learning nerf neural-network real-time-rendering signed-distance-functions
Last synced: 6 months ago · JSON representation ·

Repository

Pure PyTorch Implementation of NVIDIA paper on Instant Training of Neural Graphics primitives: https://nvlabs.github.io/instant-ngp/

Basic Info
  • Host: GitHub
  • Owner: yashbhalgat
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 36.1 MB
Statistics
  • Stars: 987
  • Watchers: 15
  • Forks: 105
  • Open Issues: 13
  • Releases: 0
Topics
3d-reconstruction artificial-intelligence computer-graphics computer-vision efficient-training hashing machine-learning nerf neural-network real-time-rendering signed-distance-functions
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

HashNeRF-pytorch

🌟 Update 🌟

Get answers to any questions about this repository using this HuggingFace Chatbot.


Instant-NGP recently introduced a Multi-resolution Hash Encoding for neural graphics primitives like NeRFs. The original NVIDIA implementation mainly in C++/CUDA, based on tiny-cuda-nn, can train NeRFs upto 100x faster!

This project is a pure PyTorch implementation of Instant-NGP, built with the purpose of enabling AI Researchers to play around and innovate further upon this method.

This project is built on top of the super-useful NeRF-pytorch implementation.

Convergence speed w.r.t. Vanilla NeRF

HashNeRF-pytorch (left) vs NeRF-pytorch (right):

https://user-images.githubusercontent.com/8559512/154065666-f2eb156c-333c-4de4-99aa-8aa15a9254de.mp4

After training for just 5k iterations (~10 minutes on a single 1050Ti), you start seeing a crisp chair rendering. :)

Instructions

Download the nerf-synthetic dataset from here: Google Drive.

To train a chair HashNeRF model: python run_nerf.py --config configs/chair.txt --finest_res 512 --log2_hashmap_size 19 --lrate 0.01 --lrate_decay 10

To train for other objects like ficus/hotdog, replace configs/chair.txt with configs/{object}.txt:

hotdog_ficus

Extras

The code-base has additional support for: * Total Variation Loss for smoother embeddings (use --tv-loss-weight to enable) * Sparsity-inducing loss on the ray weights (use --sparse-loss-weight to enable)

ScanNet dataset support

The repo now supports training a NeRF model on a scene from the ScanNet dataset. I personally found setting up the ScanNet dataset to be a bit tricky. Please find some instructions/notes in ScanNet.md.

TODO:

  • Voxel pruning during training and/or inference
  • Accelerated ray tracing, early ray termination

Citation

Kudos to Thomas Müller and the NVIDIA team for this amazing work, that will greatly help accelerate Neural Graphics research: @article{mueller2022instant, title = {Instant Neural Graphics Primitives with a Multiresolution Hash Encoding}, author = {Thomas M\"uller and Alex Evans and Christoph Schied and Alexander Keller}, journal = {arXiv:2201.05989}, year = {2022}, month = jan }

Also, thanks to Yen-Chen Lin for the super-useful NeRF-pytorch: @misc{lin2020nerfpytorch, title={NeRF-pytorch}, author={Yen-Chen, Lin}, publisher = {GitHub}, journal = {GitHub repository}, howpublished={\url{https://github.com/yenchenlin/nerf-pytorch/}}, year={2020} }

If you find this project useful, please consider to cite: @misc{bhalgat2022hashnerfpytorch, title={HashNeRF-pytorch}, author={Yash Bhalgat}, publisher = {GitHub}, journal = {GitHub repository}, howpublished={\url{https://github.com/yashbhalgat/HashNeRF-pytorch/}}, year={2022} }

Star History

Star History Chart

Owner

  • Name: Yash Sanjay Bhalgat
  • Login: yashbhalgat
  • Kind: user
  • Location: Oxford, UK
  • Company: @Yash-DPhil-Research, @Qualcomm-AI-Research @voxel51, @princeton-vl

Thou shall code. :computer:

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: HashNeRF-pytorch
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Yash
    family-names: Bhalgat
    email: yashbhalgat95@gmail.com
    affiliation: University of Oxford
    orcid: 'https://orcid.org/0000-0001-7775-6250'
url: 'https://github.com/yashbhalgat/HashNeRF-pytorch'
abstract: >-
  HashNeRF-pytorch is a pure PyTorch Implementation of the
  NVIDIA paper on Instant Training of Neural Graphics
  primitives (Instant-NGP). This codebase was built with the
  purpose of enabling AI Researchers to play around and
  innovate further upon this method.
keywords:
  - machine learning
  - artificial intelligence
  - computer vision
  - computer graphics
  - nerf
  - 3D reconstruction
  - neural rendering
license: MIT
version: '1.0'
date-released: '2022-06-01'

GitHub Events

Total
  • Issues event: 2
  • Watch event: 44
  • Issue comment event: 1
  • Fork event: 6
Last Year
  • Issues event: 2
  • Watch event: 44
  • Issue comment event: 1
  • Fork event: 6