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

Function ious

yolox/motdt_tracker/matching.py:35–51  ·  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

33
34
35def ious(atlbrs, btlbrs):
36 """
37 Compute cost based on IoU
38 :type atlbrs: list[tlbr] | np.ndarray
39 :type atlbrs: list[tlbr] | np.ndarray
40 :rtype ious np.ndarray
41 """
42 ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)
43 if ious.size == 0:
44 return ious
45
46 ious = bbox_ious(
47 np.ascontiguousarray(atlbrs, dtype=np.float),
48 np.ascontiguousarray(btlbrs, dtype=np.float)
49 )
50
51 return ious
52
53
54def iou_distance(atracks, btracks):

Callers 1

iou_distanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected