1 虚拟环境
conda env create -f environment.yaml
conda activate loftr
生成的虚拟环境中的torch为CPU版本,因此需要编译GPU版本torch
(1)下载对应的pytorch-gpu,网址:https://pytorch.org/

(2)在loftr环境中安装即可

2 在Pycharm中加入编译器(这里选用pycharm-community-2021.3.3版本)


3 运行test_indoor.py,出现如下错误
UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument.
解决方法:
(1)打开functional.py函数,定位到_VF.meshgrid

(2)加上如下代码:indexing = ‘ij’

以上是LoFTR-master代码的环境配置中出现的问题,希望对您有帮助。
本文讲述了如何在conda创建的虚拟环境中为LoFTR项目编译GPU版本的PyTorch,并在PyCharm中遇到UserWarning后,通过修改functional.py文件中的meshgrid函数解决了问题。
6143

被折叠的 条评论
为什么被折叠?



