Update app.py
Browse files
app.py
CHANGED
|
@@ -118,7 +118,7 @@ def predict(img):
|
|
| 118 |
# Step 1: Use an AI service to preprocess the image.
|
| 119 |
# - OpenCV can detect edges, but results are inconsistent depending on noise/lighting.
|
| 120 |
# - The AI model generates a cleaner, well-bounded intermediate image.
|
| 121 |
-
crop, mask = client.predict(image=handle_file(img), session="
|
| 122 |
|
| 123 |
# Step 2: Apply OpenCV on this intermediate image for more accurate border detection
|
| 124 |
# before performing the perspective unwrap.
|
|
|
|
| 118 |
# Step 1: Use an AI service to preprocess the image.
|
| 119 |
# - OpenCV can detect edges, but results are inconsistent depending on noise/lighting.
|
| 120 |
# - The AI model generates a cleaner, well-bounded intermediate image.
|
| 121 |
+
crop, mask = client.predict(image=handle_file(img), session="u2net", api_name="/predict")
|
| 122 |
|
| 123 |
# Step 2: Apply OpenCV on this intermediate image for more accurate border detection
|
| 124 |
# before performing the perspective unwrap.
|