Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SlinkoIgor committed Mar 17, 2023
1 parent d0251cc commit c5da630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,11 +1134,11 @@ def preprocess_image(image, model_input_shape, uint8_mode=False, input_scale=Non
"""
#resized_image = cv2.resize(image, model_input_shape[::-1], cv2.INTER_AREA)
resized_image = letterbox_resize(image, model_input_shape[::-1])
image_data = normalize_image(image_data)
resized_image = normalize_image(resized_image)

output_type = 'float32'
if uint8_mode:
image_data = image_data / input_scale + input_zero_point
resized_image = resized_image / input_scale + input_zero_point
output_type = 'uint8'

image_data = np.asarray(resized_image).astype(output_type)
Expand Down

0 comments on commit c5da630

Please sign in to comment.