Files
annotations/Azaion.Inference/inference.pxd
T
Alex Bezdieniezhnykh c1b5b5fee2 use nms in the model itself, simplify and make postprocess faster.
make inference in batches, fix c# handling, add overlap handling
2025-02-10 14:55:00 +02:00

28 lines
898 B
Cython

from remote_command cimport RemoteCommand
from annotation cimport Annotation, Detection
from ai_config cimport AIRecognitionConfig
cdef class Inference:
cdef object session
cdef object on_annotation
cdef Annotation _previous_annotation
cdef AIRecognitionConfig ai_config
cdef bint stop_signal
cdef str model_input
cdef int model_width
cdef int model_height
cdef bint is_video(self, str filepath)
cdef run_inference(self, RemoteCommand cmd)
cdef _process_video(self, RemoteCommand cmd, str video_name)
cdef _process_images(self, RemoteCommand cmd, list[str] image_paths)
cdef stop(self)
cdef preprocess(self, frames)
cdef remove_overlapping_detections(self, list[Detection] detections)
cdef postprocess(self, output)
cdef split_list_extend(self, lst, chunk_size)
cdef bint is_valid_annotation(self, Annotation annotation)