Skip to content
/ tinynerf Public
forked from loicmagne/tinynerf

Copy of Fast and tiny NeRF implementation

License

Notifications You must be signed in to change notification settings

catid/tinynerf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinynerf

Concise (<1000 locs) and fast implementation of several NeRF techniques. Currently it contains an implementation of vanilla NeRF, K-Planes and Cobafa, accelerated with a single CUDA kernel to compute the weights from 'NeRF equation'.

output_video.mp4

Setup

Create a conda environment, install PyTorch, and install requirements.

conda create -n tinynerf python=3.10
conda activate tinynerf

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

pip install -r requirements.txt

I got the dataset from nerfstudio, running the ns-download-data blender command and then copying it to ./data/.

Run it:

CUDA_VISIBLE_DEVICES=0 python train.py --data data/blender/chair --method kplanes --datatype synthetic --output k_planes --batch_size 512

Features

  • Vanilla NeRF, K-Planes and Cobafa
  • Occupancy grid to accelerate training (based on Instant-NGP but with slightly different decaying method)
  • Unbounded and AABB scenes
  • Dynamic batches, each iteration process a constant number of samples by packing samples from each ray
  • CUDA implementation of NeRF weights computation
  • Reproduction of KPlanes results on synthetic dataset
  • Reproduction of Cobafa results on synthetic dataset
  • Proposal sampling
  • COLMAP data loading
  • Appearance embedding

References

These repositories were useful learning resources :

About

Copy of Fast and tiny NeRF implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.8%
  • Cuda 7.2%