Skip to content

Commit

Permalink
fixed bug when removing queries without any hard positives
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Chiavassa committed Feb 20, 2024
1 parent 1ceaab7 commit 8979ed3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datasets_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def __init__(self, args, datasets_folder="datasets", dataset_name="pitts30k", sp
"within the training set. They won't be considered as they're useless for training.")
# Remove queries without positives
self.hard_positives_per_query = np.delete(self.hard_positives_per_query, queries_without_any_hard_positive)
self.soft_positives_per_query = np.delete(self.soft_positives_per_query, queries_without_any_hard_positive)
self.queries_paths = np.delete(self.queries_paths, queries_without_any_hard_positive)

# Recompute images_paths and queries_num because some queries might have been removed
Expand Down

0 comments on commit 8979ed3

Please sign in to comment.