From e69c8a70ec57f3c61fd0fe9ea91b76d7b00da08c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 13 Jul 2020 22:32:16 +0200 Subject: [PATCH] Filter descriptors for valid 3d points --- hfnet/evaluation/utils/db_management.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hfnet/evaluation/utils/db_management.py b/hfnet/evaluation/utils/db_management.py index b28d261..9416f27 100644 --- a/hfnet/evaluation/utils/db_management.py +++ b/hfnet/evaluation/utils/db_management.py @@ -88,6 +88,8 @@ def build_localization_dbs(db_ids, images, cameras, pred = config_local['predictor']( data['image'], data['name'], **config) desc = pred['descriptors'] + if desc.shape[0] != len(valid): + desc = desc[valid] elif 'colmap_db' in config_local: cursor = get_cursor(config_local['colmap_db']) if config_local.get('broken_db', False):