From 6fb139df19b550b6901f742e9858fc0dbd0c6da4 Mon Sep 17 00:00:00 2001 From: Joe-CB <51367586+Joe-CB@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:07:52 +0800 Subject: [PATCH] Fix score reversal issue when matches are reversed --- hloc/utils/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hloc/utils/io.py b/hloc/utils/io.py index e7820f9c..d96f4998 100644 --- a/hloc/utils/io.py +++ b/hloc/utils/io.py @@ -74,5 +74,6 @@ def get_matches(path: Path, name0: str, name1: str) -> Tuple[np.ndarray]: matches = np.stack([idx, matches[idx]], -1) if reverse: matches = np.flip(matches, -1) + scores = np.flip(scores) # Fix score reversal issue when matches are reversed scores = scores[idx] return matches, scores