Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def predict(image):
|
|
| 30 |
input_image = np.expand_dims(processed_image, axis=0)
|
| 31 |
output_image = model.predict(input_image)[0]
|
| 32 |
output_image = (output_image * 255).astype(np.uint8)
|
| 33 |
-
filtered_image = cv2.medianBlur(output_image,
|
| 34 |
output_masked = (processed_image * 255).astype(np.uint8)
|
| 35 |
return Image.fromarray(filtered_image), Image.fromarray(output_masked)
|
| 36 |
|
|
|
|
| 30 |
input_image = np.expand_dims(processed_image, axis=0)
|
| 31 |
output_image = model.predict(input_image)[0]
|
| 32 |
output_image = (output_image * 255).astype(np.uint8)
|
| 33 |
+
filtered_image = cv2.medianBlur(output_image, 3)
|
| 34 |
output_masked = (processed_image * 255).astype(np.uint8)
|
| 35 |
return Image.fromarray(filtered_image), Image.fromarray(output_masked)
|
| 36 |
|