cvg / pixel-perfect-sfm

Pixel-Perfect Structure-from-Motion with Featuremetric Refinement (ICCV 2021, Best Student Paper Award)
Apache License 2.0
1.29k stars 132 forks source link

run error #103

Closed WPC-WHU closed 1 year ago

WPC-WHU commented 1 year ago

File "/media/wpc/newssds/ImageMatching/pixel-perfect-sfm/pixsfm/init.py", line 17, in from ._pixsfm import * # noqa F403 ImportError: /media/wpc/newssds/ImageMatching/pixel-perfect-sfm/pixsfm/_pixsfm.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN5ceres7Problem25SetParameterBlockConstantEPd

Phil26AT commented 1 year ago

Hi :) Did you install pyceres?

jytime commented 1 year ago

Hi Philipp, I also met a similar error as below

Screenshot 2023-05-26 at 23 44 45

My environment can successfully import pyceres and related packages, with ceres-solver of version 2.1. Did I miss anything here?

WPC-WHU commented 1 year ago

The cause of the error may be that the original version of Ceres was used when installing ColMap and the updated Ceres was used when installing Pixsfm. I solved this problem by re-install colmap using ceres2.1. However,when I run the demo, another error has occurred 图片 Debug information: 图片

Phil26AT commented 1 year ago

Great that you could resolve it. We probably should check for version mismatches in cmake, I'll put in on my ToDo.

As for your error: Are you using pycolmap from pypi? I suggest reinstalling pycolmap from source too, this is likely the cause of the error.

WPC-WHU commented 1 year ago

Thanks for your help,I reinstalling pycolmap from source and it is working now.

jytime commented 1 year ago

Thank you guys @WPC-WHU @Phil26AT . I solved it by reinstalling all the packages from source and now it works. Another thing worth mentioning is that if the torchvision is installed by conda, it will automatically install libtiff to conda env and would hide the original libtiff link. A bit close to this issue https://github.com/colmap/pycolmap/issues/105.

Phil26AT commented 1 year ago

Hi @jytime, great that you also solved the issue!

Yes libtiff is known to conflict with conda. A simpler solution would be to install colmap via conda and then install pycolmap, pyceres and pixsfm. However, we have not tested this yet.