Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ def detect_objects(image, model_name):
|
|
| 39 |
image_gray = image # Use the image as is if already grayscale
|
| 40 |
|
| 41 |
# Check if the model requires CNN specific preprocessing
|
| 42 |
-
if model_name in ["
|
| 43 |
image_processed = np.array(image_gray)
|
| 44 |
image_processed = image_processed.reshape(1, image_gray.shape[0], image_gray.shape[1], 1)
|
| 45 |
image_processed = image_processed.astype('float32')
|
|
|
|
| 39 |
image_gray = image # Use the image as is if already grayscale
|
| 40 |
|
| 41 |
# Check if the model requires CNN specific preprocessing
|
| 42 |
+
if model_name in ["CNN", "CNN_with_reductions"]:
|
| 43 |
image_processed = np.array(image_gray)
|
| 44 |
image_processed = image_processed.reshape(1, image_gray.shape[0], image_gray.shape[1], 1)
|
| 45 |
image_processed = image_processed.astype('float32')
|