Realcat commited on
Commit
fceae5e
1 Parent(s): cbbf649

fix: force_resize

Browse files
Files changed (1) hide show
  1. ui/utils.py +3 -2
ui/utils.py CHANGED
@@ -910,8 +910,9 @@ def run_matching(
910
  t1 = time.time()
911
 
912
  if model["dense"]:
913
- if not match_conf["preprocessing"]["force_resize"]:
914
  match_conf["preprocessing"]["force_resize"] = force_resize
 
915
  logger.info("preprocessing is already resized")
916
  if force_resize:
917
  match_conf["preprocessing"]["height"] = image_height
@@ -941,7 +942,7 @@ def run_matching(
941
  else:
942
  extractor = get_feature_model(extract_conf)
943
 
944
- if not extract_conf["preprocessing"]["force_resize"]:
945
  extract_conf["preprocessing"]["force_resize"] = force_resize
946
  else:
947
  logger.info("preprocessing is already resized")
 
910
  t1 = time.time()
911
 
912
  if model["dense"]:
913
+ if not match_conf["preprocessing"].get("force_resize", False):
914
  match_conf["preprocessing"]["force_resize"] = force_resize
915
+ else:
916
  logger.info("preprocessing is already resized")
917
  if force_resize:
918
  match_conf["preprocessing"]["height"] = image_height
 
942
  else:
943
  extractor = get_feature_model(extract_conf)
944
 
945
+ if not extract_conf["preprocessing"].get("force_resize", False):
946
  extract_conf["preprocessing"]["force_resize"] = force_resize
947
  else:
948
  logger.info("preprocessing is already resized")