This repo is an improved version of another Instant-NGP repo, and bases on pytorch implementation.
So far this has only been tested on Roger's machine. Any feedback is welcomed. Following installations are tested on a CUDA11.3 machine.
- Install
pytorch>=1.11.0
bypip install torch==1.11.0 torchvision==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113
- Install
torch-scatter
following their instruction - Install core requirements by
pip install -r requirements.txt
This repo relies on TinyCudaNN.
It is recommended to build tTinyCudaNN on a CUDA-11.3 machine.
Installation steps are as follows:
- git clone --recursive https://github.com/NVlabs/tiny-cuda-nn.git
- cd tiny-cuda-nn
- Use your favorite editor to edit
include/tiny-cuda-nn/common.h
and setTCNN_HALF_PRECISION
to0
(see NVlabs/tiny-cuda-nn#51 for details) - cd bindings/torch
- python setup.py install
Run pip install models/csrc/
(please run this each time you pull
the code)
- download preprocessed data at https://drive.google.com/uc?id=10Tj-0uh_zIIXf0FZ6vT7_te90VsDnfCU
- put under datasets/TanksAndTempleBG/
python train.py --config configs/Playground.txt
This code will validate your model when training procedure finishes.
python train.py --config configs/Playground.txt --ckpt_path PATH/TO/CHECKPOINT/DIR/epoch={n}.ckpt
There is a bug of pytorch lightning regarding to progress bar(see Lightning-AI/pytorch-lightning#13124 for details).
python train.py --config configs/Playground.txt --ckpt_path PATH/TO/CHECKPOINT/DIR/epoch={n}.ckpt --val_only
python render.py --config configs/Playground.txt --weight_path PATH/TO/SLIM/CHECKPOINT/DIR/epoch={n}_slim.ckpt