Skip to content

Commit

Permalink
fix: force_resize image (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincentqyw authored Aug 9, 2024
1 parent 601e543 commit c962765
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c962765

Please sign in to comment.