Threshold Explanation

#5
by sultanhaseeb05 - opened

image_sizes = [[(image.height, image.width) for image in images]]
outputs = processor.post_process_keypoint_matching(outputs, image_sizes, threshold=0.2)
for i, output in enumerate(outputs):
print("For the image pair", i)
for keypoint0, keypoint1, matching_score in zip(
output["keypoints0"], output["keypoints1"], output["matching_scores"]
):
print(
f"Keypoint at coordinate {keypoint0.numpy()} in the first image matches with keypoint at coordinate {keypoint1.numpy()} in the second image with a score of {matching_score}."
)

In this code can you explain what does the threshold do? and what is the range of threshold?

ETH Zurich - Computer Vision and Geometry Lab org

Hi @sultanhaseeb05 , thanks for your interest in LightGlue.
The treshold is a filtering value on the matching score of keypoints, it ranges between 0 and 1

Sign up or log in to comment