• Stars
    star
    969
  • Rank 47,227 (Top 1.0 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

HashNeRF-pytorch

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):

Chair.Convergence.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}
}

More Repositories

1

Contrastive-Lift

[NeurIPS 2023 Spotlight] Code for "Contrastive Lift: 3D Object Instance Segmentation by Slow-Fast Contrastive Fusion"
Python
59
star
2

QualcommAI-MicroNet-submission-MixNet

3rd place solution for NeurIPS 2019 MicroNet challenge
Python
35
star
3

MRNet-Competition

My implementation for the MRNet competition hosted by the Stanford ML group
Python
32
star
4

ParallelCV

Computer Vision and Image Processing algorithms acceleration using CUDA - Guide: Prof. S. Gopalakrishnan
C++
16
star
5

Multicycle-RISC-Processor

Verilog implementation of 16-bit multi-cycle RISC15 processor design
TeX
14
star
6

Emotion-from-speech-MFCC

Maltab code for extraction of Mel Frequency Cepstral Coefficients
MATLAB
12
star
7

Intel_Scene_Classification_Challenge

Code for the Intel Scene Classification Challenge | Rank 6th Private leaderboard | Rank 3rd Public leaderboard
Python
9
star
8

Convolutional-Neural-Net

A Convolutional Neural Network built from scratch - Assignment for Advanced Computer Vision course at University of Michigan, Ann Arbor. Similar work was done in the Digital Image Processing course at IIT Bombay.
MATLAB
4
star
9

QualcommAI-MicroNet-submission-EfficientNet

Submission name: QualcommAI-EfficientNet. MicroNet Challenge (NeurIPS 2019) submission - Qualcomm AI Research
Python
4
star
10

co4d-dynamicGS

Python
3
star
11

CS101_Project

Telephone Directory - My first awesome CS Project using link lists and search algorithms
C++
2
star
12

Microprocessors-Mini-Project

Bluetooth controlled bot with Pt-51 - Embedded C
C
2
star
13

ImageProcControlledBot-ITSP

Image Processing based algorithm using openCV libraries to detect an object and move a bot based on the object's position
Python
2
star
14

QualcommAI-Micronet-submission-M0

Submission name: QualcommAI-M0. MicroNet Challenge (NeurIPS 2019) submission - Qualcomm AI Research
Python
2
star
15

ACMMM-Video-Recommendation-Challenge

My approaches to the Content Based Video Relevance Prediction challenge by ACMMM 2018
Python
1
star
16

Image-Processing-Hackathon

Image Processing Hackathon - detection of number and order of bent fingers
MATLAB
1
star
17

Fundamental-Matrix-Estimation

OpenCV code for estimating the fundamental matrix of a set of images
C++
1
star
18

Julia-Urban-Sounds-Classification

Simplistic implementation of a CNN based classifier in Julia for Urban Sounds audio classification
Jupyter Notebook
1
star
19

Sarcarsm-Detection-Twitter

Code for detection of sarcasm in tweets using 3 different classifiers
Java
1
star
20

QualcommAI-MicroNet-submission-nanoWRN

Submission name: QualcommAI-nanoWRN. MicroNet Challenge (NeurIPS 2019) submission - Qualcomm AI Research
Python
1
star
21

KSVD

MATLAB
1
star
22

graphs_practice

Created for learning and practicing graph algorithms using boost and other libraries
C++
1
star
23

Indoor-Navigation-System

Code for building an Indoor Navigation System based on inputs from Accelerometer, Gyrometer and Magnetometer of smart devices
Python
1
star