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

Method to_tlbr

yolox/deepsort_tracker/detection.py:31–37  ·  view source on GitHub ↗

Convert bounding box to format `(min x, min y, max x, max y)`, i.e., `(top left, bottom right)`.

(self)

Source from the content-addressed store, hash-verified

29 self.feature = np.asarray(feature, dtype=np.float32)
30
31 def to_tlbr(self):
32 """Convert bounding box to format `(min x, min y, max x, max y)`, i.e.,
33 `(top left, bottom right)`.
34 """
35 ret = self.tlwh.copy()
36 ret[2:] += ret[:2]
37 return ret
38
39 def to_xyah(self):
40 """Convert bounding box to format `(center x, center y, aspect ratio,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected