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.
Please see the README of JaxNeRF.
and please install Gin Config
$ pip install gin-config
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
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
- 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 thebatch_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 asTrue
).
I would like to thank the authors of NeRF and MipNeRF, and the developers of JaxNeRF.