naruya / Vax-MipNeRF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vax-MipNeRF

This repository is part of the official implementation of VaxNeRF.

Vax'ed MipNeRF achieves the final accuracy of the original NeRF about 28 times faster just by combining visual hull.

psnr_mip

Installation

Please see the README of JaxNeRF.

and please install Gin Config

$ pip install gin-config

Quick start

Training

First, please clone the VaxNeRF repository for visual hull. The visual hull options are a little different from VaxNeRF, so please run it again even if you have already done that before.

# make a bounding volume voxel using Visual Hull
cd /path/to/VaxNeRF
python visualhull.py \
    --config configs/demo \
    --data_dir ../data/nerf_synthetic/lego \
    --voxel_dir ../data/voxel/lego \
    --pooling 7 \
    --alpha_bkgd

# train Vax-MipNeRF
cd /path/to/Vax-MipNeRF
python train.py \
    --gin_file ./configs/blender_vax_c128f128.gin \
    --data_dir ../data/nerf_synthetic/lego \
    --voxel_dir ../data/voxel/lego \
    --train_dir ../logs/vax-mip/lego

Evaluation

python eval.py \
    --gin_file ./configs/blender_vax_c128f128.gin \
    --data_dir ../data/nerf_synthetic/lego \
    --voxel_dir ../data/voxel/lego \
    --train_dir ../logs/vax-mip/lego \
    --eval_once

Options

  • To avoid out of memory errors, please reduce the batch size by adding the following options. (Make sure to set the chunk size smaller than the batch_size)
--gin_param="Config.batch_size=1024" --gin_param="Config.chunk=1000"
  • To evaluate all saved checkpoints, remove the --eval_once. (Do not specify --eval_once False. It will be recognized as True).

Acknowledgements

I would like to thank the authors of NeRF and MipNeRF, and the developers of JaxNeRF.

About

License:Apache License 2.0


Languages

Language:Jupyter Notebook 91.4%Language:Python 8.1%Language:Shell 0.4%Language:TeX 0.1%