NerfStudio安装及第一个场景重建

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

创建环境

conda create --name nerfstudio -y python=3.8
conda activate nerfstudio
python -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.git
cd nerfstudio
pip install --upgrade pip setuptools
pip install -e .

 安装tab补全

ns-install-cli

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

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

# Download some test data:
ns-download-data nerfstudio --capture-name=poster
# Train model
ns-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

效果是如下所示:

  • 6
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值