fix inference

fix small issues
This commit is contained in:
Alex Bezdieniezhnykh
2025-02-14 09:00:04 +02:00
parent cfd5483a18
commit 961d2499de
15 changed files with 42 additions and 29 deletions
+2 -3
View File
@@ -20,7 +20,7 @@ cdef class Inference:
self.model_width = 0
self.model_height = 0
self.class_names = None
self.ai_config = AIRecognitionConfig(4, 2, 0.25, 0.15, 15, 0.8, b'')
self.ai_config = AIRecognitionConfig(4, 2, 0.25, 0.15, 15, 0.8, b'', [])
def init_ai(self):
model_bytes = self.api_client.load_ai_model()
@@ -114,7 +114,6 @@ cdef class Inference:
return chunks
cdef run_inference(self, RemoteCommand cmd):
cdef list[str] medias = json.loads(<str> cmd.filename)
cdef list[str] videos = []
cdef list[str] images = []
@@ -123,7 +122,7 @@ cdef class Inference:
if self.session is None:
self.init_ai()
for m in medias:
for m in self.ai_config.paths:
if self.is_video(m):
videos.append(m)
else: