naver / mast3r

Grounding Image Matching in 3D with MASt3R
Other
1.33k stars 100 forks source link

demo_glomap environment setup #57

Open saliteta opened 1 month ago

saliteta commented 1 month ago

I am trying to use demo_glomap.

To use it, we need to first install faiss in the following way: ··· conda install -c pytorch -c nvidia -c rapidsai -c conda-forge faiss-gpu-raft=1.8.0 ···

But there are still environment issues here: mast3r processor need to import asmk_method which is a very old project: https://github.com/jenicek/asmk

When I try to install it follow their description, I find that I do not have the following:

cython/hamming.c:209:12: fatal error: longintrepr.h: No such file or directory
  209 |   #include "longintrepr.h"
      |            ^~~~~~~~~~~~~~~
yocabon commented 1 month ago

Hi, did you check the updated install instructions ?

pip install cython

git clone https://github.com/jenicek/asmk
cd asmk/cython/
cythonize *.pyx
cd ..
pip install .  # or python3 setup.py build_ext --inplace
cd ..
Sebo-the-tramp commented 1 month ago

I had the similar issue. Turns out faiss version was wrong for me. I followed https://stackoverflow.com/questions/58957169/faiss-error-could-not-find-a-version-that-satisfies-the-requirement-faiss-from and thus running:

$ pip install faiss-cpu
# or: 
$ pip install faiss-gpu-cu12 # CUDA 12.x, Python 3.8+
$ pip install faiss-gpu-cu11 # CUDA 11.x, Python 3.8+
$ pip install faiss-gpu # Python 3.6-3.10 (legacy, no longer available after version 1.7.3)

before pip install . in the list of commands above solved the issue for me.