Skip to content

[NeurIPS 2023] Official PyTorch implementation of Binary Radiance Fields

License

Notifications You must be signed in to change notification settings

SAITPublic/BiRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Radiance Fields (NeurIPS 2023)

This repository contains the code release for the paper:

Binary Radiance Fields
Seungjoo Shin1, and Jaesik Park2
1 POSTECH, 2 Seoul National University
Conference on Neural Information Processing Systems (NeurIPS), New Orleans, 2023

Setup

We have tested on PyTorch==1.13.0 with CUDA==11.7.

Clone the repository:

git clone https://github.com/SAITPublic/BiRF.git
cd BiRF

Create a environment:

conda create --name birf -y python=3.8
conda activate birf

Install packages:

# install PyTorch==1.13.0 with CUDA==11.7
conda install pytorch==1.13.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.7 -c pytorch

# install custom tiny-cuda-nn
pip install git+https://github.com/seungjooshin/tiny-cuda-nn/@bit#subdirectory=bindings/torch

# install requirements
pip install -r requirements.txt

Prepare datasets:

We support three datasets for evaluation.

By default, we put the dataset under ./data/ as:

├── data
    ├── nerf_synthetic
      ├── chair
      ├── drums
      ├── ....
    ├── Synthetic_NSVF
      ├── Bike
      ├── Liferstyle
      ├── ....
    ├── TanksAndTemples
      ├── Barn
      ├── Caterpillar
      ├── ....

Running

Training:

# python train.py ./config/{size}.gin --scene {scene} --n_features {n_features}
python train.py ./config/base.gin --scene chair --n_features 2
  • size: the size of hash table
  • scene: the scene to reconstruct
  • n_features: the number of features
  • The result is saved as {log_dir}/results_{seed}.json.

Testing:

# python test.py ./config/{size}.gin --scene {scene} --n_features {n_features} --log_dir {path_to_log_dir}
python test.py ./config/base.gin --scene chair --n_features 2 --log_dir ./logs/chair_f2_2023
  • size: the size of hash table
  • scene: the scene to reconstruct
  • n_features: the number of features
  • log_dir: the path to log directory
  • The result is saved as {log_dir}/results.json.

By default, we save the log under ./logs/.

├── logs
    ├── chair_b_2
      ├── imgs
        ├── 0000.png
        ├── 0001.png
        ├── ....
      ├── config.gin
      ├── encoding.npz
      ├── network.ckpt
      ├── occgrid.npz
      ├── results.json
    ├── chair_s_2
    ├── ....

Citation

If you find our code or paper useful, please consider citing our paper:

@inproceedings{
  shin2023binary,
  title={Binary Radiance Fields},
  author={Seungjoo Shin and Jaesik Park},
  booktitle={Advances in Neural Information Processing Systems},
  year={2023}
}

About

[NeurIPS 2023] Official PyTorch implementation of Binary Radiance Fields

Resources

License

Stars

Watchers

Forks