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

Function ious

yolox/tracker/matching.py:53–70  ·  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

51
52
53def ious(atlbrs, btlbrs):
54 """
55 Compute cost based on IoU
56 :type atlbrs: list[tlbr] | np.ndarray
57 :type atlbrs: list[tlbr] | np.ndarray
58
59 :rtype ious np.ndarray
60 """
61 ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)
62 if ious.size == 0:
63 return ious
64
65 ious = bbox_ious(
66 np.ascontiguousarray(atlbrs, dtype=np.float),
67 np.ascontiguousarray(btlbrs, dtype=np.float)
68 )
69
70 return ious
71
72
73def iou_distance(atracks, btracks):

Callers 2

iou_distanceFunction · 0.70
v_iou_distanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected