美文网首页
Instant-ngp linux部署及使用

Instant-ngp linux部署及使用

作者: artCoding | 来源:发表于2022-06-19 12:17 被阅读0次

    本教程使用的环境及版本

    • 操作系统:Ubuntu 18.04.5(无GUI)
    • GPU:RTX 3090
    • cuda:11.3
    • cmake:3.24
    • GCC:7.5
    • G++:7.5
    • python:3.9
    • OptiX:7.5
    • COLMAP

    Instant-ngp 训练数据集

    参考地址:https://www.jianshu.com/p/319a4846946b

    Instant-ngp官方文档地址

    https://github.com/NVlabs/instant-ngp

    instant-ngp官方要求环境配置(Requirements)

    • An NVIDIA GPU; tensor cores increase performance when available. All shown results come from an RTX 3090.
    • A C++14 capable compiler. The following choices are recommended and have been tested:
      • Windows: Visual Studio 2019
      • Linux: GCC/G++ 7.5 or higher
    • CUDA v10.2 or higher and CMake v3.21 or higher.
    • (optional) Python 3.7 or higher for interactive bindings. Also, run pip install -r requirements.txt.
    • (optional) OptiX 7.3 or higher for faster mesh SDF training. Set the environment variable OptiX_INSTALL_DIR to the installation directory if it is not discovered automatically.
    • (optional) Vulkan SDK for DLSS support.

    目的

    • linux完成部署instant-ngp

    基础环境依赖安装

    • 执行以下命令安装依赖
    sudo apt-get install build-essential git python3-dev python3-pip libopenexr-dev libxi-dev \
                     libglfw3-dev libglew-dev libomp-dev libxinerama-dev libxcursor-dev
    

    安装CUDA

    安装cmake

    sudo tar -zxvf cmake-3.24.0-rc1.tar.gz
    
    • 2.进入解压缩后的文件夹中执行
    sudo ./bootstrap
    sudo make
    sudo make install
    

    安装GCC、G++

    安装OptiX

    bash NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64.sh
    
    • 执行完安装脚本后,会在/usr/local下生成 NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64/ 目录


      image.png
    • 设置OptiX_INSTALL_DIR为环境变量,在 /root/.bashrc 文件最后添加以下内容

    export OptiX_INSTALL_DIR="/usr/local/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64"
    
    image.png
    • 安装完成

    安装COLMAP

    • 1.安装依赖包
    sudo apt-get install \
    git \
    build-essential \
    libboost-program-options-dev \
    libboost-filesystem-dev \
    libboost-graph-dev \
    libboost-system-dev \
    libboost-test-dev \
    libeigen3-dev \
    libsuitesparse-dev \
    libfreeimage-dev \
    libmetis-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libglew-dev \
    qtbase5-dev \
    libqt5opengl5-dev \
    libcgal-dev \
    libcgal-qt5-dev
    
    • 2.安装ceres-solver
      注意,不能克隆这个仓库的master分支,而要手动切换到2.0分支或2.1分支,否则会导致安装失败!
    sudo apt-get install libatlas-base-dev libsuitesparse-dev
    git clone https://github.com/ceres-solver/ceres-solver.git     
    cd ceres-solver
    git checkout 2.1.0
    mkdir build
    cd build
    cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
    make -j
    sudo make install
    
    • 3.安装colmap
    git clone https://github.com/colmap/colmap
    cd colmap
    git checkout dev
    mkdir build
    cd build
    cmake ..
    make -j
    sudo make install
    
    • 4.验证colmap
    colmap -h
    # 有GUI的可执行以下命令
    colmap gui
    

    部署instant-ngp

    git clone --recursive https://github.com/nvlabs/instant-ngp
    cd instant-ngp
    
    • 2.使用cmake构建项目
    cmake . -B build
    cmake --build build --config RelWithDebInfo -j 16
    
    • 3.使用测试数据测试(非GUI版本)
    ./build/testbed --no-gui --scene data/nerf/fox
    

    注意:非GUI版本下执行该命令后训练不会停止,需要手动取消

    window10部署instant-ngp

    文献参考

    https://github.com/NVlabs/instant-ngp
    https://github.com/bycloudai/instant-ngp-Windows
    https://zhuanlan.zhihu.com/p/79059379
    https://www.cnblogs.com/AbnerShen/p/7399010.html
    https://blog.csdn.net/weixin_46132232/article/details/124211233

    相关文章

      网友评论

          本文标题:Instant-ngp linux部署及使用

          本文链接:https://www.haomeiwen.com/subject/cjlrvrtx.html