wzzanthony7 commited on
Commit
f39d504
·
verified ·
1 Parent(s): 728aa1f
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -131,8 +131,17 @@ def filter_overlapping_boxes(filter_box_info, iou_threshold=0.5):
131
  break
132
  if should_keep:
133
  kept_boxes.append(box)
134
-
135
- return other_boxes + kept_boxes
 
 
 
 
 
 
 
 
 
136
 
137
  def getCenterXDis(box1, box2):
138
  x0_1, y0_1, x1_1, y1_1 = box1
 
131
  break
132
  if should_keep:
133
  kept_boxes.append(box)
134
+ kept_other_boxes = []
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