SOLD2 icon indicating copy to clipboard operation
SOLD2 copied to clipboard

Question about matches visualization

Open ChrisLLLLL opened this issue 3 years ago • 5 comments

Hi. I would like to ask you how can I show the correct and incorrect matches like the fig 7 and fig 10 in paper? with green, red and blue line. I don't know how to visualize the match in this case. Looking forward to your reply

ChrisLLLLL avatar Feb 22 '22 08:02 ChrisLLLLL

Hi, you can use this function: https://github.com/cvg/SOLD2/blob/f85ca5387ea7464314614c3fb4d07af5678a9de3/sold2/misc/visualize_util.py#L446

rpautrat avatar Feb 22 '22 08:02 rpautrat

thank you, i find this, but what does "correct_matches, wrong_matches" stand for ?

ChrisLLLLL avatar Feb 22 '22 11:02 ChrisLLLLL

Well, is the name not clear enough for you? :) correct_matches is a boolean with one value per line to indicate correct matches, wrong_matches is the same for wrong matches. The first set will be colored in green, the second one in red and the remaining lines are in blue.

Reading the function and understanding what it does is probably faster than me writing this answer...

rpautrat avatar Feb 22 '22 18:02 rpautrat

Sorry, Maybe I didn't express it clearly. In the code I see the function introduction, but at first I didn't know what to enter. I tried it, but I don't know if it's correct. Could you help me see it? I think “correct_matches” should be correct but I don't know how to get "wrong_matches".I wrote in "match_lines.ipynb". "line_correct1=valid_matches line_correct2 = np.zeros((len(line_seg2)),dtype=np.bool) for i in match_indices: line_correct2[i] = True plot_color_lines([line_seg1[:, :, ::-1], line_seg2[:, :, ::-1]], [line_correct1,line_correct2], [0,0],lw=2)" correct

ChrisLLLLL avatar Feb 23 '22 02:02 ChrisLLLLL

Hi, sorry for the late reply. You would need access to the ground truth correspondences between the two images to know which lines are incorrect. The evaluation code on ETH3D (where these images are coming from) has not been released yet, but you can find an uncleaned version of it here: https://github.com/cvg/SOLD2/issues/30#issuecomment-985026158. The idea is to unproject all lines in 3D with the ground truth depth and camera poses, then evaluate which lines are matching between the images. You would need to dig into the evaluation code to understand how to use it though.

rpautrat avatar Mar 12 '22 14:03 rpautrat