wzzanthony7 commited on
Commit
9d2e15e
·
verified ·
1 Parent(s): f39d504
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -135,13 +135,13 @@ def filter_overlapping_boxes(filter_box_info, iou_threshold=0.5):
135
  for i, box in enumerate(other_boxes):
136
  should_keep = True
137
 
138
- for kept_box in other_kept_boxes:
139
  if calculate_iou(box, kept_box) > iou_threshold:
140
  should_keep = False
141
  break
142
  if should_keep:
143
- other_kept_boxes.append(box)
144
- return other_kept_boxes + kept_boxes
145
 
146
  def getCenterXDis(box1, box2):
147
  x0_1, y0_1, x1_1, y1_1 = box1
 
135
  for i, box in enumerate(other_boxes):
136
  should_keep = True
137
 
138
+ for kept_box in kept_other_boxes:
139
  if calculate_iou(box, kept_box) > iou_threshold:
140
  should_keep = False
141
  break
142
  if should_keep:
143
+ kept_other_boxes.append(box)
144
+ return kept_other_boxes + kept_boxes
145
 
146
  def getCenterXDis(box1, box2):
147
  x0_1, y0_1, x1_1, y1_1 = box1