Spaces:
Running
Running
Added resize to main app
Browse files
app.py
CHANGED
|
@@ -151,6 +151,7 @@ full_names = {
|
|
| 151 |
}
|
| 152 |
|
| 153 |
def preprocess_image(image):
|
|
|
|
| 154 |
if image.dtype != np.uint8:
|
| 155 |
image = cv2.normalize(image, None, 0, 255, cv2.NORM_MINMAX).astype(np.uint8)
|
| 156 |
lab = cv2.cvtColor(image, cv2.COLOR_RGB2LAB)
|
|
|
|
| 151 |
}
|
| 152 |
|
| 153 |
def preprocess_image(image):
|
| 154 |
+
image = cv2.resize(image, (224, 224))
|
| 155 |
if image.dtype != np.uint8:
|
| 156 |
image = cv2.normalize(image, None, 0, 255, cv2.NORM_MINMAX).astype(np.uint8)
|
| 157 |
lab = cv2.cvtColor(image, cv2.COLOR_RGB2LAB)
|