Kalbe-x-Bangkit commited on
Commit
1cf1002
·
verified ·
1 Parent(s): 5b11650

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def load_model_detection():
54
 
55
  def preprocess_image(image):
56
  """ Preprocess the image to the required size and normalization. """
57
- image = cv2.resize(image, (W=320, H=320))
58
  image = (image - 127.5) / 127.5 # Normalize to [-1, +1]
59
  image = np.expand_dims(image, axis=0).astype(np.float32)
60
  return image
 
54
 
55
  def preprocess_image(image):
56
  """ Preprocess the image to the required size and normalization. """
57
+ image = cv2.resize(image, (W==320, H==320))
58
  image = (image - 127.5) / 127.5 # Normalize to [-1, +1]
59
  image = np.expand_dims(image, axis=0).astype(np.float32)
60
  return image