Spaces:
Running
Running
Realcat
commited on
Commit
•
cbbf649
1
Parent(s):
8199c2c
fix: force_resize image
Browse files- ui/utils.py +7 -2
ui/utils.py
CHANGED
@@ -910,7 +910,9 @@ def run_matching(
|
|
910 |
t1 = time.time()
|
911 |
|
912 |
if model["dense"]:
|
913 |
-
match_conf["preprocessing"]["force_resize"]
|
|
|
|
|
914 |
if force_resize:
|
915 |
match_conf["preprocessing"]["height"] = image_height
|
916 |
match_conf["preprocessing"]["width"] = image_width
|
@@ -939,7 +941,10 @@ def run_matching(
|
|
939 |
else:
|
940 |
extractor = get_feature_model(extract_conf)
|
941 |
|
942 |
-
extract_conf["preprocessing"]["force_resize"]
|
|
|
|
|
|
|
943 |
if force_resize:
|
944 |
extract_conf["preprocessing"]["height"] = image_height
|
945 |
extract_conf["preprocessing"]["width"] = image_width
|
|
|
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
|
918 |
match_conf["preprocessing"]["width"] = image_width
|
|
|
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")
|
948 |
if force_resize:
|
949 |
extract_conf["preprocessing"]["height"] = image_height
|
950 |
extract_conf["preprocessing"]["width"] = image_width
|