mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:56:31 +00:00
autoconvert tensor rt engine from onnx to specific CUDA gpu
This commit is contained in:
@@ -32,12 +32,12 @@ cdef class Annotation:
|
||||
d.annotation_name = self.name
|
||||
self.image = b''
|
||||
|
||||
cdef to_str(self, class_names):
|
||||
def __str__(self):
|
||||
if not self.detections:
|
||||
return f"{self.name}: No detections"
|
||||
|
||||
detections_str = ", ".join(
|
||||
f"{class_names[d.cls]} {d.confidence * 100:.1f}% ({d.x:.2f}, {d.y:.2f})"
|
||||
f"class: {d.cls} {d.confidence * 100:.1f}% ({d.x:.2f}, {d.y:.2f})"
|
||||
for d in self.detections
|
||||
)
|
||||
return f"{self.name}: {detections_str}"
|
||||
|
||||
Reference in New Issue
Block a user