Docker Container of torch-ngp to fix all dependency issues. With added Python script to go straight from video to NeRF with one command.
First, Clone this repo
git clone https://github.com/mustafahamoody/torch_ngp_containerChange working directory to the docker folder in this repo:
cd torch_ngp_container/docker/Build and run container (detached) with correct dependencies and mounted folder for data:
docker compose up -dEnter running container:
docker-compose exec torch-ngp bashpython env_create.py --run- You will be prompted to name the environment you want to create, select the data type and provide the path to the data
- Videos or photos should be added to the parent folder, torch_ngp, (from your host machine) and when prompted, for the path type the file name (eg box.mp4)
python env_create.py --trainpython env_create.py --viewTo visualise the created environment using the GUI you must connect your host machine display to the docker container using X11 To Set this up run the following commands On your host machine:
** For Linux Machines: **
# 1. Install X11 Server
sudo apt-get install xorg openbox
# 2. Allow Docker to access your X server
xhost +local:dockerIf you use this work, please include the following citations
Original NeRF authors:
@misc{mildenhall2020nerf,
title={NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis},
author={Ben Mildenhall and Pratul P. Srinivasan and Matthew Tancik and Jonathan T. Barron and Ravi Ramamoorthi and Ren Ng},
year={2020},
eprint={2003.08934},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Instant-NGP:
@article{mueller2022instant,
title = {Instant Neural Graphics Primitives with a Multiresolution Hash Encoding},
author = {Thomas M\"uller and Alex Evans and Christoph Schied and Alexander Keller},
journal = {arXiv:2201.05989},
year = {2022},
month = jan
}
torch-ngp:
@misc{torch-ngp,
Author = {Jiaxiang Tang},
Year = {2022},
Note = {https://github.com/ashawkey/torch-ngp},
Title = {Torch-ngp: a PyTorch implementation of instant-ngp}
}
torch_ngp_container:
@misc{torch_ngp_container,
Author = {Mustafa Hamoody},
Year = {2025},
Note = {https://github.com/mustafahamoody/torch_ngp_container},
Title = {torch_ngp_container: Docker container of torch-ngp with easier NeRF creation}