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

Function remove_duplicate_stracks

tutorials/fairmot/byte_tracker.py:378–391  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

376
377
378def remove_duplicate_stracks(stracksa, stracksb):
379 pdist = matching.iou_distance(stracksa, stracksb)
380 pairs = np.where(pdist < 0.15)
381 dupa, dupb = list(), list()
382 for p, q in zip(*pairs):
383 timep = stracksa[p].frame_id - stracksa[p].start_frame
384 timeq = stracksb[q].frame_id - stracksb[q].start_frame
385 if timep > timeq:
386 dupb.append(q)
387 else:
388 dupa.append(p)
389 resa = [t for i, t in enumerate(stracksa) if not i in dupa]
390 resb = [t for i, t in enumerate(stracksb) if not i in dupb]
391 return resa, resb
392
393
394def remove_fp_stracks(stracksa, n_frame=10):

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected