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

Function remove_duplicate_stracks

tutorials/jde/byte_tracker.py:354–367  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

352 return list(stracks.values())
353
354def remove_duplicate_stracks(stracksa, stracksb):
355 pdist = matching.iou_distance(stracksa, stracksb)
356 pairs = np.where(pdist<0.15)
357 dupa, dupb = list(), list()
358 for p,q in zip(*pairs):
359 timep = stracksa[p].frame_id - stracksa[p].start_frame
360 timeq = stracksb[q].frame_id - stracksb[q].start_frame
361 if timep > timeq:
362 dupb.append(q)
363 else:
364 dupa.append(p)
365 resa = [t for i,t in enumerate(stracksa) if not i in dupa]
366 resb = [t for i,t in enumerate(stracksb) if not i in dupb]
367 return resa, resb
368
369

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected