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

Function ious

tutorials/trades/mot_online/matching.py:64–80  ·  view source on GitHub ↗

Compute cost based on IoU :type atlbrs: list[tlbr] | np.ndarray :type atlbrs: list[tlbr] | np.ndarray :rtype ious np.ndarray

(atlbrs, btlbrs)

Source from the content-addressed store, hash-verified

62
63
64def ious(atlbrs, btlbrs):
65 """
66 Compute cost based on IoU
67 :type atlbrs: list[tlbr] | np.ndarray
68 :type atlbrs: list[tlbr] | np.ndarray
69 :rtype ious np.ndarray
70 """
71 ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)
72 if ious.size == 0:
73 return ious
74
75 ious = bbox_ious(
76 np.ascontiguousarray(atlbrs, dtype=np.float),
77 np.ascontiguousarray(btlbrs, dtype=np.float)
78 )
79
80 return ious
81
82
83def iou_distance(atracks, btracks):

Callers 1

iou_distanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected