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

Function ious

tutorials/centertrack/mot_online/matching.py:64–81  ·  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
70 :rtype ious np.ndarray
71 """
72 ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)
73 if ious.size == 0:
74 return ious
75
76 ious = bbox_ious(
77 np.ascontiguousarray(atlbrs, dtype=np.float),
78 np.ascontiguousarray(btlbrs, dtype=np.float)
79 )
80
81 return ious
82
83
84def iou_distance(atracks, btracks):

Callers 1

iou_distanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected