oskarastrom commited on
Commit
25241fa
·
1 Parent(s): 16fdc0c

Update associative.py

Browse files
Files changed (1) hide show
  1. lib/fish_eye/associative.py +8 -13
lib/fish_eye/associative.py CHANGED
@@ -219,23 +219,18 @@ class Associate(object):
219
  for t in reversed(to_del):
220
  self.trackers.pop(t)
221
 
222
- high_matched, unmatched_high_dets, unmatched_trk_ids = associate_detections_to_trackers(high_dets, trks, self.iou_threshold)
 
223
 
224
  # update matched trackers with assigned detections
 
225
  for m in high_matched:
226
  self.trackers[m[1]].update(high_dets[m[0], :])
227
-
228
- if len(unmatched_trk_ids) > 0:
229
-
230
- low_matched, unmatched_low_dets, _ = associate_detections_to_trackers(low_dets, trks[unmatched_trk_ids], self.iou_threshold)
231
-
232
- if len(low_matched) > 0:
233
- print(trks[unmatched_trk_ids])
234
- print("high", high_matched)
235
- print("low", low_matched)
236
-
237
- for m in low_matched:
238
- self.trackers[unmatched_trk_ids[m[1]]].update(low_dets[m[0], :])
239
 
240
  # create and initialise new trackers for unmatched detections
241
  for i in unmatched_high_dets:
 
219
  for t in reversed(to_del):
220
  self.trackers.pop(t)
221
 
222
+ high_matched, unmatched_high_dets, unmatched_low_trk_ids = associate_detections_to_trackers(high_dets, trks, self.iou_threshold)
223
+ low_matched, unmatched_low_dets, unmatched_high_trk_ids = associate_detections_to_trackers(low_dets, trks, self.iou_threshold)
224
 
225
  # update matched trackers with assigned detections
226
+ matched_tracks = []
227
  for m in high_matched:
228
  self.trackers[m[1]].update(high_dets[m[0], :])
229
+ matched_tracks.append(m[1])
230
+ for m in low_matched:
231
+ if (m[1] not in matched_tracks):
232
+ self.trackers[m[1]].update(high_dets[m[0], :])
233
+
 
 
 
 
 
 
 
234
 
235
  # create and initialise new trackers for unmatched detections
236
  for i in unmatched_high_dets: