mlbench123 commited on
Commit
f1fd8d7
·
verified ·
1 Parent(s): 2b1a638

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.05 * image_area < box_area < 0.4 * image_area:
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: