PoseLib / PoseLib

Minimal solvers for calibrated camera pose estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is poselib RANSAC == colmap RANSAC?

ducha-aiki opened this issue · comments

Or they are just compatible?

I am stupid, sorry.

Perhaps other people has the same doubt. I would suggest to explain a bit more your reasoning (the actual problem and solution).

Well. I don't have any problem :)
I was adding various H-RANSACs to our benchmark repo: https://github.com/danini/homography-benchmark and to update https://arxiv.org/pdf/2302.09997.pdf and found the PoseLib. Checked the readme a bit and then found the exactly same API as with colmap ransac -> asked this question. Then scrolled down a bit more and saw the comparisons vs colmap RANSAC, and closed the question.

I actually failed to compile it for python for my Apple M1 machine, so would not be adding to the benchmark at the moment

Thanks for looking into it. I have an M1 but I don't think I've tried to compile on it. I will see if I can figure out what is going on (though maybe after CVPR). If you have any more details on your setup where it breaks that would be great.

Thank you!

It somehow cannot find pybind11, although when I manually open python and type import pybind11, it works fine

(python39) oldufo@dmytros-macbook-air PoseLib % cmake --build _build/ --target pip-package
Consolidate compiler generated dependencies of target PoseLib
[100%] Built target PoseLib
-- BUILD_SHARED_LIBS: OFF
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_GENERATOR: Single-config
-- CMAKE_GENERATOR: Unix Makefiles
-- CMAKE_REGISTRY_FOLDER: OFF
-- Python_EXECUTABLE: /opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/oldufo/dev/PoseLib/_build
Traceback (most recent call last):
  File "/Users/oldufo/dev/PoseLib/_build/pybind/setup.py", line 3, in <module>
    from pybind11.setup_helpers import Pybind11Extension, build_ext
ModuleNotFoundError: No module named 'pybind11'

Hmm, interesting. I will look more into it. You could try the dev branch. We moved pybind11 to a submodule there, so it should be more self-contained. Just make sure you also checkout the submodules :)

git clone https://github.com/vlarsson/PoseLib.git
cd PoseLib
git submodule update --init --recursive

or simply when you clone:

git clone --recurse-submodules https://github.com/vlarsson/PoseLib.git

Is this missing in the documentation?

@pablospe In the main branch it's not a submodule. We made this change at some point in the dev branch but it has not been merged yet.

OK. On the dev branch I was able to compile, but only after removing -match=native from all `CMakeLists.txt. Is it really necessary thing?
Thanks for the help anyway!

It enables cpu-specific optimisations, which can be quite significant runtime-wise in some instances. It seems that more modern versions of Clang support M1 with -march=native (from 15.0 I think). You could try "-mcpu=apple-m1" and see if it works.

Thank you. For now I am happy that it just works, as the eval would be done on the linux machine anyway.
I have added poselib to our benchmark
danini/homography-benchmark#7

Thanks. Maybe
https://github.com/danini/homography-benchmark/pull/7/files#diff-6edc8eaed85d7851791e3c0398763a34f9fc2676ca39a4a87e1c6ddd2a9f6da5R49
this is a bug though?

I spoke to Daniel at some point and in his experiments PoseLib was not working so well for H-estimation from what I remember, but I did not have time yet to look into it.

Thanks for the catch, definitely a bug! Fixed it now.

We didn't tried PoseLib and pycolmap RANSACs in the original paper, but we hope to add them to the poster and updated paper version.