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

Function remove_duplicate_stracks

tutorials/motr/byte_tracker.py:314–327  ·  view source on GitHub ↗
(stracksa, stracksb)

Source from the content-addressed store, hash-verified

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

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected