mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:16:30 +00:00
739759628a
add DONE during inference, correct handling on C# side
20 lines
677 B
Cython
20 lines
677 B
Cython
from remote_command cimport RemoteCommand
|
|
from annotation cimport Annotation
|
|
from ai_config cimport AIRecognitionConfig
|
|
|
|
cdef class Inference:
|
|
cdef object model
|
|
cdef object on_annotation
|
|
cdef Annotation _previous_annotation
|
|
cdef AIRecognitionConfig ai_config
|
|
cdef bint stop_signal
|
|
|
|
cdef bint is_video(self, str filepath)
|
|
cdef run_inference(self, RemoteCommand cmd, int batch_size=?)
|
|
cdef _process_video(self, RemoteCommand cmd, int batch_size)
|
|
cdef _process_image(self, RemoteCommand cmd)
|
|
cdef stop(self)
|
|
|
|
cdef frame_to_annotation(self, long time, frame, boxes: object)
|
|
cdef bint is_valid_annotation(self, Annotation annotation)
|