基于learning的3D 点云配准的工作中,FCGF是比较有代表性的方案。该项目已经开源,但是复现过程在可能遇到各种环境的问题。本文记录在复现过程中遇到的问题以及解决。
1. 源码以及论文
代码
论文
https://node1.chrischoy.org/data/publications/fcgf/fcgf.pdf
2. 环境配置
推荐使用CUDA 11.1 (已复现),其他版本需要注意pytroch版本与CUDA版本要匹配。多版本CUDA 管理参考: 多版本CUDA安装与管理-优快云博客
使用官方tutorial安装torch可能出现版本不匹配的问题,下面给出的是成功实现的版本与指令。
1. 初始化conda环境
# 初始化conda环境
conda create -n py3-fcgf python=3.7
conda activate py3-fcgf
2. 安装pytorch,这里使用的是torch 1.9.1,其他版本选择参考: 安装适合CUDA版本的pytorch-优快云博客
# 安装pytorch
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
3. 安装MinkowskiEngine,官方tutorial: GitHub - NVIDIA/MinkowskiEngine: Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
# 导出CUDA路径
export CUDA_HOME=/usr/local/cuda-11.1
# 安装MinkowskiEngine
pip install -U git+https://github.com/NVIDIA/MinkowskiEngine -v --no-deps --install-option="--blas_include_dirs=${CONDA_PREFIX}/include" --install-option="--blas=openblas"
4. 下载源码并安装其他依赖
git clone https://github.com/chrischoy/FCGF.git
cd FCGF
# Do the following inside the conda environment
pip install -r requirements.txt
5. 运行demo,检查是否正常
python demo.py
效果如图所示
完成