Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -993,7 +993,7 @@ def predict_with_paper(image, paper_size, offset, offset_unit, finger_clearance=
|
|
993 |
x_min, y_min, x_max, y_max = box
|
994 |
box_area = (x_max - x_min) * (y_max - y_min)
|
995 |
# Keep boxes that are 5% to 40% of image area
|
996 |
-
if 0.
|
997 |
valid_boxes.append((i, confidences[i]))
|
998 |
|
999 |
if not valid_boxes:
|
|
|
993 |
x_min, y_min, x_max, y_max = box
|
994 |
box_area = (x_max - x_min) * (y_max - y_min)
|
995 |
# Keep boxes that are 5% to 40% of image area
|
996 |
+
if 0.001 * image_area < box_area < 0.6 * image_area:
|
997 |
valid_boxes.append((i, confidences[i]))
|
998 |
|
999 |
if not valid_boxes:
|