We provide some tips for XRNeRF installation in this file.
apt-get install -y build-essential git ninja-build ffmpeg libsm6 libxext6 libgl1
pip install opencv-python>=3
pip install imageio
pip install scikit-image
pip install lpips
pip install trimesh
pip install smplx
pip install spconv-cu113
pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"
About hardware requirements: Instant-NGP need GPU-ARCH>=75, which means that at least a RTX 20X0 is required to have a full support.
RTX 30X0 | A100 | RTX 20X0 | TITAN V / V100 | GTX 10X0 / TITAN Xp | GTX 9X0 | K80 |
---|---|---|---|---|---|---|
86 | 80 | 75 | 70 | 61 | 52 | 37 |
If you don't need instant-ngp, spconv depends the minimum cuda version. So at least cuda 10.2 is needed.
sudo apt install libgl-dev freeglut3-dev build-essential git ninja-build ffmpeg libsm6 libxext6 libgl1
conda create -n xrnerf python=3.7 -y
conda activate xrnerf
cu111/torch-1.10.0%2Bcu111-cp37-cp37m-linux_x86_64.whl
, download the whl filepip install torch-1.10.0+cu111-cp37-cp37m-linux_x86_64.whl
pip install torchvision==0.12.0
pip install requirements.txt
to install most of the needed pkgs. If this step succeeds, you should jump to kilo-cuda
and spconv
step to install them manually. Or you can skip this step and follow the installation steps belowpip install 'opencv-python>=3' yapf imageio scikit-image lpips trimesh smplx
mmcv-full
following their Installation
spconv
using pip install, for example pip install spconv-cu111
. notice that only specified cuda-vision are supported, following their Installation
pytorch3d
using pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"
kilo-cuda
following their Installation(optional, only needed for kilo-nerf)tcnn
using pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
, or following their Installation(optional, only needed for instant-ngp)raymarch
for instant-ngp supported, following ngp_raymarch
mesh_grid
for gnr supported, following mesh_grid
GNR
algorithm, you need to download the smpl_t_pose
folder from GNR, and modify basedata_cfg.t_pose_path
in configs/gnr/gnr_genebody.py
to the corresponding storage locationYou need to set docker daemon, to enable docker-build's gpu support (for cuda extension install).
sudo apt-get install nvidia-container-runtime -f -y
sudo cp -f docker/daemon.json /etc/docker
sudo systemctl restart docker
See here for detail.
We provide a Dockerfile to build an image.
docker build -f ./docker/Dockerfile --rm -t xrnerf .
Important: Make sure you've installed the nvidia-container-toolkit.
Create a container with command:
docker run --gpus all -it xrnerf /bin/bash
Open a teiminal in your host computer, copy project into docker container
# d287273af72e is container id, using 'docker ps -a' to find id
docker cp ProjectPath/xrnerf d287273af72e:/workspace
To verify whether XRNeRF and the required environment are installed correctly, we can run unit-test python codes
coverage run --source xrnerf/models -m pytest -s test/models && coverage report -m
Notice that coverage
and pytest
need to be installed before that
pip install coverage pytest -i https://pypi.tuna.tsinghua.edu.cn/simple
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。