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

Function remove_duplicate_stracks

tutorials/jde/tracker.py:399–412  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

397 return list(stracks.values())
398
399def remove_duplicate_stracks(stracksa, stracksb):
400 pdist = matching.iou_distance(stracksa, stracksb)
401 pairs = np.where(pdist<0.15)
402 dupa, dupb = list(), list()
403 for p,q in zip(*pairs):
404 timep = stracksa[p].frame_id - stracksa[p].start_frame
405 timeq = stracksb[q].frame_id - stracksb[q].start_frame
406 if timep > timeq:
407 dupb.append(q)
408 else:
409 dupa.append(p)
410 resa = [t for i,t in enumerate(stracksa) if not i in dupa]
411 resb = [t for i,t in enumerate(stracksb) if not i in dupb]
412 return resa, resb
413
414

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected