nerfstudio介绍及在windows上的配置、使用

      nerfstudio提供了一个简单的API,可以简化创建、训练和可视化NeRF的端到端过程。该库通过模块化每个组件来支持可解释的NeRF实现。nerfstudio源码地址: https://github.com/nerfstudio-project/nerfstudio , 通过模块化集成了多个NeRF扩展的实现,持续更新,带界面,license为Apache-2.0。

      目前已支持的方法
      (1).Nerfacto: facto NeRF,将专注于质量的模块和专注于更快渲染的模块相结合;
      (2).NeRF:《Representing Scenes as Neural Radiance Fields for View Synthesis》;
      (3).Instant NGP:《Instant Neural Graphics Primitives with a Multiresolution Hash Encoding》;
      (4).Mipnerf: 《A Multiscale Representation for Anti-Aliasing Neural Radiance Fields》;
      (5).NerfW: 《Neural Radiance Fields for Unconstrained Photo Collections》;
      (6).Semantic NeRF: 《In-Place Scene Labelling and Understanding with Implicit Scene Representation》.

      nerfstudio在windows上的配置
      1.安装vs2019 + cuda 11.6;
      2.通过conda创建虚拟环境nerfstudio,依次执行如下命令:

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

      3.安装依赖:
      (1).pytorch 1.13.1, 执行如下命令:

pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html

      (2).tinycudann, 执行如下命令:

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

      4.安装nerfstudio,依次执行如下命令:

git clone git@github.com:nerfstudio-project/nerfstudio.git
cd nerfstudio
pip install --upgrade pip setuptools
pip install -e .

      5.安装ffmpeg, 执行如下命令:

conda install -c conda-forge ffmpeg

      6.安装colmap, 执行如下命令:

conda install -c conda-forge colmap
conda install -c conda-forge mpir

      7.安装hloc,依次执行如下命令: 可选,windwos上不支持pycolmap

cd ..
git clone --recursive https://github.com/cvg/Hierarchical-Localization/
cd Hierarchical-Localization/
pip install pycolmap # windows不支持
python -m pip install -e .

      使用

      1.从https://data.nerf.studio/nerfstudio/ 下载person测试集,解压缩,并将其拷贝到nerfstudio的data/nerfstudio目录下,data/nerfstudio需自己创建;

      2.person目录下已有transforms.json,若是自己拍摄的图像序列如lego,则执行如下命令生成transforms.json:

ns-process-data images --data data/nerfstudio/lego/train --output-dir data/nerfstudio/lego --camera-type perspective --matching-method exhaustive --sfm-tool colmap --crop-factor 0.0 0.0 0.0 0.0

      3.执行如下命令进行训练:迭代产生的checkpoint存储在outputs/person/nerfacto目录下

ns-train nerfacto --data data/nerfstudio/person --vis viewer --max-num-iterations 50000

      训练进度如下图所示:

      也可打开web实时预览: https://viewer.nerf.studio/versions/23-04-10-0/?websocket_url=ws://localhost:7007 ,如下图所示: 

      可以加载预训练模型,如下命令所示:这将自动开始继续训练 

ns-train nerfacto --data data/nerfstudio/person --load-dir outputs/person/nerfacto/2023-04-22_171607/nerfstudio_models

      可以加载预训练模型进行可视化查看:

ns-viewer --load-config outputs/person/nerfacto/2023-04-22_171607/config.yml

      每个命令都有很多参数,可以通过--help查看具体支持哪些参数及参数的用处,如:

ns-render --help
ns-train --help
ns-train nerfacto --help

      可将结果导出:

      (1).导出渲染视频;
      (2).导出点云;
      (3).导出mesh.

      支持的自定义数据集类型:https://docs.nerf.studio/en/latest/quickstart/custom_dataset.html
      ns-process-data各参数说明:https://docs.nerf.studio/en/latest/reference/cli/ns_process_data.html
      官方提供的数据集:https://drive.google.com/drive/folders/19TV6kdVGcmg3cGZ1bNIUnBBMD-iQjRbG

  • 21
    点赞
  • 73
    收藏
    觉得还不错? 一键收藏
  • 70
    评论
nerfstudio是一个简化创建、训练和可视化NeRF的端到端过程的API。你可以从nerfstudio的GitHub仓库中获取源代码,地址为https://github.com/nerfstudio-project/nerfstudio。该库通过模块化每个组件来支持可解释的NeRF实现,并集成了多个NeRF扩展的实现,持续更新,带有界面,使用Apache-2.0许可证。\[1\] 如果你想使用nerfstudio,你可以按照以下步骤进行配置使用: 1. 首先,从https://data.nerf.studio/nerfstudio/下载person测试集,并解压缩。 2. 将解压后的测试集拷贝到nerfstudio的data/nerfstudio目录下。如果该目录不存在,你需要自己创建它。\[2\] 3. 在Windows配置nerfstudio,你需要安装vs2019和cuda 11.6。 4. 使用conda创建一个名为"nerfstudio"的虚拟环境,并激活该环境。你可以使用以下命令来完成这一步骤: ``` conda create --name nerfstudio -y python=3.8 conda activate nerfstudio python -m pip install --upgrade pip ``` 这将创建一个名为"nerfstudio"的虚拟环境,并安装必要的Python依赖。\[3\] 完成上述步骤后,你就可以开始使用nerfstudio来创建、训练和可视化NeRF模型了。希望这些信息对你有帮助! #### 引用[.reference_title] - *1* *2* *3* [nerfstudio介绍及在windows上的配置使用](https://blog.csdn.net/fengbingchun/article/details/130307992)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 70
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值