MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / remove_duplicate_stracks

Function remove_duplicate_stracks

yolox/tracker/byte_tracker.py:317–330  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

315
316
317def remove_duplicate_stracks(stracksa, stracksb):
318 pdist = matching.iou_distance(stracksa, stracksb)
319 pairs = np.where(pdist < 0.15)
320 dupa, dupb = list(), list()
321 for p, q in zip(*pairs):
322 timep = stracksa[p].frame_id - stracksa[p].start_frame
323 timeq = stracksb[q].frame_id - stracksb[q].start_frame
324 if timep > timeq:
325 dupb.append(q)
326 else:
327 dupa.append(p)
328 resa = [t for i, t in enumerate(stracksa) if not i in dupa]
329 resb = [t for i, t in enumerate(stracksb) if not i in dupb]
330 return resa, resb

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected