From 01e76e8ccf95f4eec179a3c5185496163fba4640 Mon Sep 17 00:00:00 2001 From: Realcat Date: Wed, 31 Jul 2024 16:03:40 +0000 Subject: [PATCH] fix: force_resize image --- ui/utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/utils.py b/ui/utils.py index ec3b970..8c66f12 100644 --- a/ui/utils.py +++ b/ui/utils.py @@ -910,7 +910,9 @@ def run_matching( t1 = time.time() if model["dense"]: - match_conf["preprocessing"]["force_resize"] = force_resize + if not match_conf["preprocessing"]["force_resize"]: + match_conf["preprocessing"]["force_resize"] = force_resize + logger.info("preprocessing is already resized") if force_resize: match_conf["preprocessing"]["height"] = image_height match_conf["preprocessing"]["width"] = image_width @@ -939,7 +941,10 @@ def run_matching( else: extractor = get_feature_model(extract_conf) - extract_conf["preprocessing"]["force_resize"] = force_resize + if not extract_conf["preprocessing"]["force_resize"]: + extract_conf["preprocessing"]["force_resize"] = force_resize + else: + logger.info("preprocessing is already resized") if force_resize: extract_conf["preprocessing"]["height"] = image_height extract_conf["preprocessing"]["width"] = image_width