二.ubuntu 22.04 配置SuperGlue

1.配置运行环境

1.1 下载源码

git clone https://github.com/magicleap/SuperGluePretrainedNetwork.git

1.2 使用conda创建新python环境

conda create -n sglue python=3.12
// 如果有问题,删除: conda remove -n sglue --all

1.3 安装pytorch2.6.0和cuda11.8

安装命令参照https://pytorch.org/get-started/previous-versions/

pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118

1.4 安装依赖

cd SuperGluePretrainedNetwork-master

// 因为前面安装了高版本的python,所以requirements.txt中修改为opencv-python>=4.8.1.78,然后
pip install -r requirements.txt

1.5 运行demo

python demo_superglue.py --input assets/scannet_sample_images/ --output_dir output/ --resize -1 -1

// output是自己在SuperGluePretrainedNetwork-master文件夹下创建的新文件,用于保存匹配的结果

相关文档资料
1.使用自己训练的superpoint与superglue模型进行图像配准https://blog.csdn.net/a486259/article/details/137381647
2.基于SuperPoint与SuperGlue实现图像配准https://blog.csdn.net/a486259/article/details/129093084
3.Ubuntu18.04 系统上配置并运行SuperGluePretrainedNetwork(仅使用CPU)
4.图像匹配天花板:SuperPoint+SuperGlue复现https://blog.csdn.net/yu_xinli/article/details/126342618

posted on 2025-09-09 16:01  JJ_S  阅读(31)  评论(0)    收藏  举报