MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / remove_duplicate_stracks

Function remove_duplicate_stracks

tutorials/fairmot/tracker.py:440–453  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

438
439
440def remove_duplicate_stracks(stracksa, stracksb):
441 pdist = matching.iou_distance(stracksa, stracksb)
442 pairs = np.where(pdist < 0.15)
443 dupa, dupb = list(), list()
444 for p, q in zip(*pairs):
445 timep = stracksa[p].frame_id - stracksa[p].start_frame
446 timeq = stracksb[q].frame_id - stracksb[q].start_frame
447 if timep > timeq:
448 dupb.append(q)
449 else:
450 dupa.append(p)
451 resa = [t for i, t in enumerate(stracksa) if not i in dupa]
452 resb = [t for i, t in enumerate(stracksb) if not i in dupb]
453 return resa, resb
454
455
456def remove_fp_stracks(stracksa, n_frame=10):

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected