cvg / GlueStick

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

match confidence #16

Closed marisancans closed 1 year ago

marisancans commented 1 year ago

Hello, how do I filter out bad confidence scores? LoFTR has a variable called mconf which is confidence between points

LoFTR structure: b_ids: batch indices i_ids: indices of the selected coarse matches on image 0 j_ids: indices of the selected coarse matches on image 1 gt_mask: this variable is only used during training. In the training code, gt matches will be padded to the selected matches to ensure the same batch size among image pairs. mkpts0_c: matched keypoints at the coarse level on image 0 mkpts1_c: matched keypoints at the coarse level on image 1 mconf: the matching confidence

For GlueStick the closest I could find is: keypoint_scores0 keypoint_scores1

line_scores0 line_scores1

Match for what? match_scores0 match_scores1

line_matches0 line_matches1

line_match_scores0 line_match_scores1

raw_line_scores

There are so many scores, really confusing. Can anyone explain what these do? An how to filter them with a threshold similar to LoFTR?

rpautrat commented 1 year ago

Hi, what you are looking is to use match_scores0 for the confidence of the point matches stored in matches0, and line_match_scores0 for the confidence of the line matches stored in line_matches0.

All the predicted matches are considered correct, so there should be no need of filtering though. It could only be useful if you want very high quality matches, or vary the threshold to compute a precision-recall curve for example.

In more details, here is the explanation of each output: keypoint_scores0: the raw scores of the keypoint detector in image 0 keypoint_scores1

line_scores0: the raw scores of the line detector in image 0 line_scores1

Match for what? match_scores0: confidence on the matching of the keypoints of image 0 match_scores1

line_matches0: indices of line matches. line_matches0[i] = -1 if line i has no match, otherwise it returns the index of the matched lines in image 1 line_matches1

line_match_scores0: confidence on the matching of the lines of image 0 line_match_scores1

raw_line_scores: raw assignment matrix output by the network, you can ignore this as it is an intermediary output.

I hope this clarifies everything.

marisancans commented 1 year ago

Yes, I require super high quality control points and want to drop out points that should not be there. Thanks