小工具知识网

当前位置: 首页 > 行业知识 > NerfStudio安装及第一个场景重建

行业知识

NerfStudio安装及第一个场景重建

2026-10-30 10:52:43 来源:互联网转载

NerfStudio文档是写在windows和linux上安装,本文记录Linux安装的过程,且我的cuda是11.7

创建环境

conda create --name nerfstudio -y python=3.8conda activate nerfstudiopython -m pip install --upgrade pip

Pytorch要求2.0.1之后的,文档推荐cuda11.7配置torch2.0.1,cuda118配置torch2.1.2

pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --extra-index-url https://download.pytorch.org/whl/cu117

安装cuda-toolkit

conda install -c "nvidia/label/cuda-11.7.1" cuda-toolkit

安装tiny-cuda-nn

pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

安装nerfstudio

pip install nerfstudio

ps如果想要最新版的,就是源安装

git clone https://github.com/nerfstudio-project/nerfstudio.gitcd nerfstudiopip install --upgrade pip setuptoolspip install -e .

 安装tab补全

ns-install-cli

 以上成功则环境安装成功了,接下来开始训练第一个场景啦!

首先下载数据集进行训练,

# Download some test data:ns-download-data nerfstudio --capture-name=poster# Train modelns-train nerfacto --data data/nerfstudio/poster

但我下载失败了,找到了CSDN下载地址:

https://download.csdn.net/download/qq_35831906/87929708?ydreferer=aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzczMTUzOTg0L2FydGljbGUvZGV0YWlscy8xMzM4MjAxOTc%3D

 我的GPU是2080TI还是可以用的,大概20MINs后,就训练完成了,我导出mesh和点云,发现一团乱点,后面发现要把--use_bounding_box True加上就可以了

所以最后的命令是

ns-export poisson --load-config outputs/poster/nerfacto/2024-02-27_114457/config.yml --output-dir exports/mesh/ --target-num-faces 50000 --num-pixels-per-side 2048 --num-points 1000000 --remove-outliers True --normal-method open3d --use_bounding_box True --obb_center 0.0000000000 0.0000000000 0.0000000000 --obb_rotation 0.0000000000 -1.4472337191 -0.0000000000 --obb_scale 1.0000000000 1.0000000000 1.0000000000

效果是如下所示:

上一篇:东台服务器怎么选型号?

下一篇:淘宝云服务器怎么使用?