NICE-SLAM代码复现和解析(解决使用yaml文件配置conda环境时下载慢的问题)

代码运行

代码地址https://github.com/cvg/nice-slam/tree/master

环境配置

  1. 下载压缩包,打开environment.yaml文件
    在这里插入图片描述

  2. 向yaml文件中添加如下代码

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/  
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/   

在这里插入图片描述
貌似还要注释掉channels:里面的- pytorch才行

  1. 按照github里面的环境配置教程,在base环境下运行:
sudo apt-get install libopenexr-dev
conda env create -f environment.yaml

上一个命令会创建一个nice-slam环境,激活环境

conda activate nice-slam

在这个环境里面后,貌似还要写一个requirements.txt文件来把需要pip安装的加了(最好带清华源进行安装)

Visualizing NICE-SLAM Results

  1. 下载数据集
    我们这里测试Apartment的可视化效果
    在这里插入图片描述
    按照github的说法,咱国内选手最好选哪个下载脚本里面额外的那个数据集手动下载,如下(非常良心,这个云盘居然不下载不限速)
    在这里插入图片描述

  2. 把下载下来的压缩包解压到ouput对应的文件夹下,运行:

python visualizer.py configs/Apartment/apartment.yaml --output output/vis/Apartment

就可以看到如下的效果:
在这里插入图片描述
3. 运行完成后,效果还是不错
在这里插入图片描述

运行Demo

在这里插入图片描述

  1. 下载数据集
    方法同上,下载后放到在给工程下创建的./Datasets,解压

  2. 运行

python -W ignore run.py configs/Demo/demo.yaml

阿西吧~~~
在这里插入图片描述
我的GTX3070寄了,游戏结束~

猜你喜欢

转载自blog.csdn.net/qin_liang/article/details/132004046