going somewhere.

This commit is contained in:
didier committed 2024-11-04 18:50:34 -05:00
1 parent 2c798c8ca5
commit 35c5ab9a32
5 files changed
+51 -8

No files matched your search

+3 -3
View File
@@ -4,7 +4,7 @@ import numpy as np
XCoord = NewType('XCoord', float)
YCoord = NewType('YCoord', float)
Confidence = NewType('Confidence', float)
Score = NewType('Confidence', float)
Category = NewType('Category', float)
@@ -23,14 +23,14 @@ class DetectedObject:
ymin: YCoord
xmax: XCoord
ymax: YCoord
confidence: Confidence
score: Score
category: Category
def as_int_box(self) -> tuple[tuple[int, int], tuple[int, int]]:
return (int(self.xmin), int(self.ymin)), (int(self.xmax), int(self.ymax))
def as_nparray(self):
return np.array([self.xmin, self.ymax, self.xmax, self.ymax, self.confidence, self.category])
return np.array([self.xmin, self.ymax, self.xmax, self.ymax, self.score, self.category])