cvg / GlueStick

Joint Deep Matcher for Points and Lines 🖼️💥🖼️ (ICCV 2023)
https://iago-suarez.com/gluestick
MIT License
551 stars 43 forks source link

can you open source your evaluation code? #6

Closed jeannotes closed 1 year ago

jeannotes commented 1 year ago

hi, great work! in your paper you mentioned that you use solvers to generate poses from a minimal set of 3 features (3 points, 2 points and 1 line, 1 point and 2 lines, or 3 lines), then combine them in a hybrid RANSAC to recover the query camera poses.

hope that you open source these lines of code. thanks.

rpautrat commented 1 year ago

Hi, we will probably release the evaluation code together with the training one.

But for what you are looking for, we used this repo to extract a homography from the combinations of 4 points/lines: https://github.com/rpautrat/homography_est/. Then you can use the Opencv decomposeHomographyMat to recover possible camera poses, given known intrinsics.

jeannotes commented 1 year ago

@rpautrat hi, thanks for your quick respoense, actually I am looking for evaluation code for "visual localization" part in your paper which you use a minimal set of 3 features (3 points, 2 points and 1 line, 1 point and 2 lines, or 3 lines), then combine them in a hybrid RANSAC to recover the query camera poses.

the repo https://github.com/rpautrat/homography_est/ you provided is using ceres while https://github.com/rpautrat/homography_est/ only use eigen, since you mention this, could you elabrate this: 1) what is the difference between these two repos? 2) in visual localization, did you caluate absolute pose or realtive pose? 3) how can I calculate relative pose with line matches?

thanks.

rpautrat commented 1 year ago

Ah sorry, I misunderstood your question indeed. What I described is how to get the relative pose from line matches.

I think you linked twice the same repo, so not sure what is the other repo you wanted to mention.

But for the visual localization part (absolute pose), the solvers we used came from https://github.com/vlarsson/PoseLib, and the evaluation code from here: https://github.com/cvg/limap (the Readme has explanations on how to use the visual localization part).

jeannotes commented 1 year ago

@rpautrat sorry about link of same repo, I am wondering that the repo is for homographt estimate, ehich seems specialize in planar case, what if the rotation + translation case? I mean two image, I detect lots of points, lines, they sure cannot lie on one plane, can this repo https://github.com/rpautrat/homography_est/ calculate relative pose(rotation and translation)?

rpautrat commented 1 year ago

In the paper, we use the relative pose estimation as a proxy to evaluate homography estimation. This is not aiming to solve relative pose in general. Lines-only correspondences are anyway not enough to solve relative pose estimation, they do not offer enough constraints.

So to sum up, if you want to achieve the best results for relative pose estimation, you should use the classical point matching + essential matrix 5-point RANSAC. In the paper, the relative pose evaluation was an indirect method to evaluate the quality of the homographies.

jeannotes commented 1 year ago

thanks