Update app.py
Browse files
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
|
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
|