paddledet initial support added

This commit is contained in:
hd committed 2023-07-10 18:03:56 +02:00
1 parent abbde887dc
commit 186bfc44fa
1 file changed
+8
+8
View File
@@ -354,6 +354,14 @@ class Detections:
return Detections(xyxy=xywh_to_xyxy(boxes_xywh=xywh), mask=mask)
@classmethod
def from_paddledet(cls, paddledet_result):
return cls(
xyxy=paddledet_result[:, 2:6],
confidence=paddledet_result[:, 1],
class_id=paddledet_result[:, 0].astype(int),
)
@classmethod
def empty(cls) -> Detections:
"""