mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 17:26:32 +00:00
18 lines
609 B
Cython
18 lines
609 B
Cython
cdef class Detection:
|
|
cdef public double x, y, w, h, confidence
|
|
cdef public str annotation_name
|
|
cdef public int cls
|
|
|
|
def __init__(self, double x, double y, double w, double h, int cls, double confidence): ...
|
|
cdef bint overlaps(self, Detection det2, float confidence_threshold)
|
|
|
|
cdef class Annotation:
|
|
cdef public str name
|
|
cdef public str original_media_name
|
|
cdef long time
|
|
cdef public list[Detection] detections
|
|
cdef public bytes image
|
|
|
|
def __init__(self, str name, str original_media_name, long ms, list[Detection] detections): ...
|
|
cdef bytes serialize(self)
|