运行教程:
-
安装conda https://www.eriktse.com/technology/1008.html
-
之后按照github上面的教程进行
在运行的时候提示了本机安装的cuda11.3与conda中使用的cuda12.1不匹配,故删除cuda11.3,再次运行时提示nvcc: not found,个人感觉应该是没有cuda导致,在本机重新安装cuda11.8。
注意!! 这个命令pip install torch2.1.0 torchvision0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118只是下载pytorch,对应的cuda应该是自己安装的(第一次用的时候弄混了)
git clone https://github.com/ispc-lab/LiDAR4D.git
cd LiDAR4D
conda create -n lidar4d python=3.9
conda activate lidar4d
# PyTorch
# CUDA 12.1
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
# CUDA 11.8
# pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
# CUDA <= 11.7
# pip install torch==2.0.0 torchvision torchaudio
# Dependencies
pip install -r requirements.txt
继续按照教程安装ing
- 我本机环境中为了运行其他SLAM算法将gcc降低到了7.5,在安装tiny-cuda-nn出现了fatal error: filesystem: No such file or directory #include 的错误,将其修改为<experimental/filesystem>也解决不了问题,故继续将整体算法更改到docker环境中,避免了修改gcc版本后影响其他算法运行。
- 修改为<experimental/filesystem>的错误如下:[**error: no instance of constructor nlohmann::basic_json::basic_json with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector>] matches the argument list argument types are: (__nv_bool) detected during: instantiation of void __gnu_cxx::new_allocator<_Tp>::construct(_Up *, _Args &&…) [with _Tp=nlohmann::basic_json>>, _Up=nlohmann::basic_json>>, _Args=<__nv_bool &>]**
git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
cd tiny-cuda-nn/bindings/torch
python setup.py install
-
docker选用nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04。在docker中安装conda来方便python库的下载(因为我没怎么运行过python算法,想着在docker中继续使用conda可以方便配置环境)。docker中安装conda与本机安装没有区别。docker中运行剩余命令基本没有问题,除了在运行preprocess_data.sh文件中出现了libX11.so.6与OSError: libGL.so.1的错误,通过下面的命令可以解决:
-
apt-get install libx11-dev 解决 OSError: libX11.so.6: cannot open shared object file: No such file or directory
-
apt-get update && apt-get install libgl1 解决 OSError: libGL.so.1: cannot open shared object file: No such file or directory
-
-
运行bash run_kitti_lidar4d.sh后开始训练数据(我还以为是直接有pt文件可以直接输出,难道是nerf里面不能直接使用.pt文件么,本人也是对于整个python以及nerf一窍不通,哈哈),这是正常的情况么?总之一共训练了639轮,然后输出结果。
下载数据集,即方框中给出来的部分,然后放到data对应的文件夹中。