mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
fix split tile size
rework inference events and handling todo: add Medias table and reflect recognition status there
This commit is contained in:
@@ -4,7 +4,6 @@ from queue import Queue
|
||||
cimport constants_inf
|
||||
from threading import Thread
|
||||
|
||||
from annotation cimport Annotation
|
||||
from inference cimport Inference
|
||||
from loader_client cimport LoaderClient
|
||||
from remote_command_inf cimport RemoteCommand, CommandType
|
||||
@@ -32,8 +31,7 @@ cdef class CommandProcessor:
|
||||
try:
|
||||
command = self.inference_queue.get(timeout=0.5)
|
||||
self.inference.run_inference(command)
|
||||
end_inference_command = RemoteCommand(CommandType.INFERENCE_DATA, None, 'DONE')
|
||||
self.remote_handler.send(command.client_id, end_inference_command.serialize())
|
||||
self.remote_handler.send(command.client_id, <RemoteCommand>RemoteCommand(CommandType.INFERENCE_DONE))
|
||||
except queue.Empty:
|
||||
continue
|
||||
except Exception as e:
|
||||
@@ -46,7 +44,7 @@ cdef class CommandProcessor:
|
||||
self.inference_queue.put(command)
|
||||
elif command.command_type == CommandType.AI_AVAILABILITY_CHECK:
|
||||
status = self.inference.ai_availability_status.serialize()
|
||||
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.AI_AVAILABILITY_RESULT, status).serialize())
|
||||
self.remote_handler.send(command.client_id, <RemoteCommand>RemoteCommand(CommandType.AI_AVAILABILITY_RESULT, status))
|
||||
elif command.command_type == CommandType.STOP_INFERENCE:
|
||||
self.inference.stop()
|
||||
elif command.command_type == CommandType.EXIT:
|
||||
|
||||
Reference in New Issue
Block a user