mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:46:30 +00:00
fix inference
fix small issues
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user