Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,7 +201,7 @@ def detect_paper_bounds(image: np.ndarray, paper_size: str) -> Tuple[np.ndarray,
|
|
| 201 |
|
| 202 |
if paper_detector is not None:
|
| 203 |
# Use trained model if available
|
| 204 |
-
results = paper_detector.predict(image, conf=0.
|
| 205 |
if not results or len(results) == 0 or len(results[0].boxes) == 0:
|
| 206 |
logger.warning("Model detection failed, using fallback contour detection")
|
| 207 |
return detect_paper_contour(image)
|
|
|
|
| 201 |
|
| 202 |
if paper_detector is not None:
|
| 203 |
# Use trained model if available
|
| 204 |
+
results = paper_detector.predict(image, conf=0.9)
|
| 205 |
if not results or len(results) == 0 or len(results[0].boxes) == 0:
|
| 206 |
logger.warning("Model detection failed, using fallback contour detection")
|
| 207 |
return detect_paper_contour(image)
|