Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -452,9 +452,9 @@ def predict(
|
|
| 452 |
# Apply sharpness enhancement.
|
| 453 |
if isinstance(image, np.ndarray):
|
| 454 |
pil_image = Image.fromarray(image)
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
image = np.array(
|
| 458 |
|
| 459 |
# ---------------------
|
| 460 |
# 1) Detect the drawer with YOLOWorld
|
|
|
|
| 452 |
# Apply sharpness enhancement.
|
| 453 |
if isinstance(image, np.ndarray):
|
| 454 |
pil_image = Image.fromarray(image)
|
| 455 |
+
Bright = ImageEnhance.Brightness(pil_image).enhance(0.5)
|
| 456 |
+
enhanced_image = ImageEnhance.Sharpness(Bright).enhance(0.5)
|
| 457 |
+
image = np.array(enhanced_image)
|
| 458 |
|
| 459 |
# ---------------------
|
| 460 |
# 1) Detect the drawer with YOLOWorld
|