From 7d81b3a5020c437f85a52bb92cb594a161930e2d Mon Sep 17 00:00:00 2001 From: LashaO Date: Wed, 7 Feb 2024 17:55:01 +0400 Subject: [PATCH] Adds gradcam toggle --- wbia/web/apis_query.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wbia/web/apis_query.py b/wbia/web/apis_query.py index 479e10d8e..9d35a661b 100644 --- a/wbia/web/apis_query.py +++ b/wbia/web/apis_query.py @@ -936,6 +936,7 @@ def convert_to_uuid(nid): proot = query_config_dict.get('pipeline_root', 'vsmany') proot = query_config_dict.get('proot', proot) + use_gradcam = query_config_dict.get('use_gradcam', False) logger.info('query_config_dict = {!r}'.format(query_config_dict)) curvrank_daily_tag = query_config_dict.get('curvrank_daily_tag', None) @@ -1077,7 +1078,7 @@ def convert_to_uuid(nid): daid_set = list(set(daid_set)) logger.info('Visualizing %d annots: %r' % (len(daid_set), daid_set)) - if proot.lower() == 'miewid': + if proot.lower() == 'miewid' and use_gradcam: logger.info('Batch processing miewid match images') batch_images = qreq_.render_batch_result(cm, daid_set) @@ -1139,7 +1140,7 @@ def convert_to_uuid(nid): extern_flag_list = [] for daid in daid_list_: - if proot.lower() == 'miewid': + if proot.lower() == 'miewid' and use_gradcam: break extern_flag = daid in daid_set