nerfstudio

nerfstudio-projectApache-2.0长期未更新

一个面向 NeRF 与高斯泼溅的协作式训练与可视化工作室,把多视角照片转成三维场景,简化了从数据到渲染的完整流程。

A collaboration friendly studio for NeRFs

v1.1.5发布于 2024-11-11 21:22 UTC12,193star +33 / 7 天1,693fork同步于 2026-11-10 05:28 UTC

怎么上手

由 README 提炼,执行前请确认
conda create --name nerfstudio -y python=3.8
conda activate nerfstudio
pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
pip install nerfstudio
硬件要求按 README 说明

需要 NVIDIA 显卡并安装 CUDA,README 称已在 CUDA 11.8 上测试;未给出具体显存要求。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

模块化 NeRF 训练与可视化框架,把建模、训练、导出串成一条命令

一个面向 NeRF 与高斯泼溅的协作式训练与可视化工作室,把多视角照片转成三维场景,简化了从数据到渲染的完整流程。

核心能力

  • 模块化拆解 NeRF 各组件,便于理解和改模型
  • 提供 ns-train、ns-viewer、ns-render 等命令行工具
  • 内置 nerfacto 模型,面向真实场景重建
  • 用 ns-process-data 把图片/视频转成训练数据
  • 训练中可开网页 viewer 实时查看并设相机路径导出视频

容易踩的坑

需先装 CUDA toolkit 并从源码编译 tiny-cuda-nn,否则依赖装不上;用自己的图片或视频要先装 COLMAP 并用 ns-process-data 转换;远程机器看 viewer 需转发 websocket 端口,默认 7007。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.1.5
  1. v1.1.5最新正式版2024-11-11 · 2024-11-11 21:22 UTC

    What's Changed

    New Contributors

  2. v1.1.42024-08-28 · 2024-08-28 21:10 UTC
    查看更新说明

    Bilagrid + Splatfacto/Nerfacto, and more bug fixes!

    What's Changed

  3. v1.1.32024-06-17 · 2024-06-17 16:00 UTC
    查看更新说明

    Bug fixes!

    What's Changed

    New Contributors

    Full Changelog: https://github.com/nerfstudio-project/nerfstudio/compare/v1.1.2...v1.1.3

  4. v1.1.22024-06-09 · 2024-06-09 00:40 UTC
    查看更新说明

    Fixes splatfacto for Windows.

    What's Changed

    Full Changelog: https://github.com/nerfstudio-project/nerfstudio/compare/v1.1.1...v1.1.2

  5. v1.1.12024-06-08 · 2024-06-08 21:06 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/nerfstudio-project/nerfstudio/compare/v1.1.0...v1.1.1

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    About

    It’s as simple as plug and play with nerfstudio!

    Nerfstudio provides a simple API that allows for a simplified end-to-end process of creating, training, and testing NeRFs. The library supports a more interpretable implementation of NeRFs by modularizing each component. With more modular NeRFs, we hope to create a more user-friendly experience in exploring the technology.

    This is a contributor-friendly repo with the goal of building a community where users can more easily build upon each other's contributions. Nerfstudio initially launched as an opensource project by Berkeley students in KAIR lab at Berkeley AI Research (BAIR) in October 2022 as a part of a research project (paper). It is currently developed by Berkeley students and community contributors.

    We are committed to providing learning resources to help you understand the basics of (if you're just getting started), and keep up-to-date with (if you're a seasoned veteran) all things NeRF. As researchers, we know just how hard it is to get onboarded with this next-gen technology. So we're here to help with tutorials, documentation, and more!

    Have feature requests? Want to add your brand-spankin'-new NeRF model? Have a new dataset? We welcome contributions! Please do not hesitate to reach out to the nerfstudio team with any questions via Discord.

    Have feedback? We'd love for you to fill out our Nerfstudio Feedback Form if you want to let us know who you are, why you are interested in Nerfstudio, or provide any feedback!

    We hope nerfstudio enables you to build faster :hammer: learn together :books: and contribute to our NeRF community :sparkling_heart:.

    Sponsors

    Sponsors of this work includes Luma AI and the BAIR commons.

    Quickstart

    The quickstart will help you get started with the default vanilla NeRF trained on the classic Blender Lego scene. For more complex changes (e.g., running with your own data/setting up a new NeRF graph), please refer to our references.

    1. Installation: Setup the environment

    Prerequisites

    You must have an NVIDIA video card with CUDA installed on the system. This library has been tested with version 11.8 of CUDA. You can find more information about installing CUDA here

    Create environment

    Nerfstudio requires python >= 3.8. We recommend using conda to manage dependencies. Make sure to install Conda before proceeding.

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

    Dependencies

    Install PyTorch with CUDA (this repo has been tested with CUDA 11.7 and CUDA 11.8) and tiny-cuda-nn. cuda-toolkit is required for building tiny-cuda-nn.

    For CUDA 11.8:

    pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
    
    conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
    pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
    

    See Dependencies in the Installation documentation for more.

    Installing nerfstudio

    Easy option:

    pip install nerfstudio
    

    OR if you want the latest and greatest:

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

    OR if you want to skip all installation steps and directly start using nerfstudio, use the docker image:

    See Installation - Use docker image.

    2. Training your first model!

    The following will train a nerfacto model, our recommended model for real world scenes.

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

    If everything works, you should see training progress like the following:

    Navigating to the link at the end of the terminal will load the webviewer. If you are running on a remote machine, you will need to port forward the websocket port (defaults to 7007).

    Resume from checkpoint / visualize existing run

    It is possible to load a pretrained model by running

    ns-train nerfacto --data data/nerfstudio/poster --load-dir {outputs/.../nerfstudio_models}
    

    Visualize existing run

    Given a pretrained model checkpoint, you can start the viewer by running

    ns-viewer --load-config {outputs/.../config.yml}
    

    3. Exporting Results

    Once you have a NeRF model you can either render out a video or export a point cloud.

    Render Video

    First we must create a path for the camera to follow. This can be done in the viewer under the "RENDER" tab. Orient your 3D view to the location where you wish the video to start, then press "ADD CAMERA". This will set the first camera key frame. Continue to new viewpoints adding additional cameras to create the camera path. We provide other parameters to further refine your camera path. Once satisfied, press "RENDER" which will display a modal that contains the command needed to render the video. Kill the training job (or create a new terminal if you have lots of compute) and run the command to generate the video.

    Other video export options are available, learn more by running

    ns-render --help
    

    Generate Point Cloud

    While NeRF models are not designed to generate point clouds, it is still possible. Navigate to the "EXPORT" tab in the 3D viewer and select "POINT CLOUD". If the crop option is selected, everything in the yellow square will be exported into a point cloud. Modify the settings as desired then run the command at the bottom of the panel in your command line.

    Alternatively you can use the CLI without the viewer. Learn about the export options by running

    ns-export pointcloud --help
    

    4. Using Custom Data

    Using an existing dataset is great, but likely you want to use your own data! We support various methods for using your own data. Before it can be used in nerfstudio, the camera location and orientations must be determined and then converted into our format using ns-process-data. We rely on external tools for this, instructions and information can be found in the documentation.

    DataCapture DeviceRequirementsns-process-data Speed
    📷 ImagesAnyCOLMAP🐢
    📹 VideoAnyCOLMAP🐢
    🌎 360 DataAnyCOLMAP🐢
    📱 PolycamIOS with LiDARPolycam App🐇
    📱 KIRI EngineIOS or AndroidKIRI Engine App🐇
    📱 Record3DIOS with LiDARRecord3D app🐇
    📱 Spectacular AIIOS, OAK, othersApp / sai-cli🐇
    🖥 MetashapeAnyMetashape🐇
    🖥 RealityCaptureAnyRealityCapture🐇
    🖥 ODMAnyODM🐇
    👓 AriaAria glassesProject Aria🐇
    🛠 CustomAnyCamera Poses🐇

    5. Advanced Options

    Training models other than nerfacto

    We provide other models than nerfacto, for example if you want to train the original nerf model, use the following command

    ns-train vanilla-nerf --data DATA_PATH
    

    For a full list of included models run ns-train --help.

    Modify Configuration

    Each model contains many parameters that can be changed, too many to list here. Use the --help command to see the full list of configuration options.

    ns-train nerfacto --help
    

    Tensorboard / WandB / Viewer

    We support four different methods to track training progress, using the viewertensorboard, Weights and Biases, and ,Comet. You can specify which visualizer to use by appending --vis {viewer, tensorboard, wandb, comet viewer+wandb, viewer+tensorboard, viewer+comet} to the training command. Simultaneously utilizing the viewer alongside wandb or tensorboard may cause stuttering issues during evaluation steps. The viewer only works for methods that are fast (ie. nerfacto, instant-ngp), for slower methods like NeRF, use the other loggers.

    Learn More

    And that's it for getting started with the basics of nerfstudio.

    If you're interested in learning more on how to create your own pipelines, develop with the viewer, run benchmarks, and more, please check out some of the quicklinks below or visit our documentation directly.

    SectionDescription
    DocumentationFull API documentation and tutorials
    ViewerHome page for our web viewer
    🎒 Educational
    Model DescriptionsDescription of all the models supported by nerfstudio and explanations of component parts.
    Component DescriptionsInteractive notebooks that explain notable/commonly used modules in various models.
    🏃 Tutorials
    Getting StartedA more in-depth guide on how to get started with nerfstudio from installation to contributing.
    Using the ViewerA quick demo video on how to navigate the viewer.
    Using Record3DDemo video on how to run nerfstudio without using COLMAP.
    💻 For Developers
    Creating pipelinesLearn how to easily build new neural rendering pipelines by using and/or implementing new modules.
    Creating datasetsHave a new dataset? Learn how to run it with nerfstudio.
    ContributingWalk-through for how you can start contributing now.
    💖 Community
    DiscordJoin our community to discuss more. We would love to hear from you!
    TwitterFollow us on Twitter @nerfstudioteam to see cool updates and announcements
    Feedback FormWe welcome any feedback! This is our chance to learn what you all are using Nerfstudio for.

    Supported Features

    We provide the following support structures to make life easier for getting started with NeRFs.

    If you are looking for a feature that is not currently supported, please do not hesitate to contact the Nerfstudio Team on Discord!

    • :mag_right: Web-based visualizer that allows you to:
      • Visualize training in real-time + interact with the scene
      • Create and render out scenes with custom camera trajectories
      • View different output types
      • And more!
    • :pencil2: Support for multiple logging interfaces (Tensorboard, Wandb), code profiling, and other built-in debugging tools
    • :chart_with_upwards_trend: Easy-to-use benchmarking scripts on the Blender dataset
    • :iphone: Full pipeline support (w/ Colmap, Polycam, or Record3D) for going from a video on your phone to a full 3D render.

    Built On

    • Easy-to-use config system
    • Developed by Brent Yi
    • Library for accelerating NeRF renders
    • Developed by Ruilong Li

    Citation

    You can find a paper writeup of the framework on arXiv.

    If you use this library or find the documentation useful for your research, please consider citing:

    @inproceedings{nerfstudio,
    	title        = {Nerfstudio: A Modular Framework for Neural Radiance Field Development},
    	author       = {
    		Tancik, Matthew and Weber, Ethan and Ng, Evonne and Li, Ruilong and Yi, Brent
    		and Kerr, Justin and Wang, Terrance and Kristoffersen, Alexander and Austin,
    		Jake and Salahi, Kamyar and Ahuja, Abhik and McAllister, David and Kanazawa,
    		Angjoo
    	},
    	year         = 2023,
    	booktitle    = {ACM SIGGRAPH 2023 Conference Proceedings},
    	series       = {SIGGRAPH '23}
    }
    

    Contributors