LoFTR Detector-Free Local Feature Matching with Transformers 环境配置

LoFTR: Detector-Free Local Feature Matching with Transformers 环境配置

一、环境配置及文件下载

1.文件下载

源码下载链接:https://zju3dv.github.io/loftr

相关模型下载链接: https://pan.baidu.com/s/1QLGxLspQ_aia_MbZKAunig 密码: 5h8n

2.环境配置
  • 将文件路径切换到解压后的源码文件夹中执行以下命令
# For full pytorch-lightning trainer features (recommended) 过程漫长,需要等待下载···
conda env create -f environment.yaml  
conda activate loftr

# For the LoFTR matcher only
pip install torch einops yacs kornia

二、运行demo

1.下载相关代码
cd src/loftr/utils  
wget https://raw.githubusercontent.com/magicleap/SuperGluePretrainedNetwork/master/models/superglue.py 

注意:此处需要修改hosts文件,具体命令如下:

sudo gedit /etc/hosts

#将以下内容添加进hosts文件,点击保存,注意此处的IP地址不一定可以使用,建议去https://google.com.ipaddress.com/drive.google.com查询最新的IP地址
185.199.108.133  raw.githubusercontent.com

/etc/init.d/networking restart
2.运行demo
cd demo
./run_demo.sh
#开启摄像头
 python demo_loftr.py --weight ../weights/outdoor_ds.ckpt  --input ../testdata/scannet_test_1500/npu/color --save_video  --save_input
 python demo_loftr.py --weight ../weights/outdoor_ds.ckpt  --input ../testdata/megadepth_test_1500/Undistorted_SfM/0015/images  --save_video --save_input

  • 0
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值