forked from Github/frigate
handle various scenarios with external process failures
This commit is contained in:
@@ -7,7 +7,7 @@ import SharedArray as sa
|
||||
import pyarrow.plasma as plasma
|
||||
import tflite_runtime.interpreter as tflite
|
||||
from tflite_runtime.interpreter import load_delegate
|
||||
from frigate.util import EventsPerSecond
|
||||
from frigate.util import EventsPerSecond, listen
|
||||
|
||||
def load_labels(path, encoding='utf-8'):
|
||||
"""Loads labels from file (with or without index numbers).
|
||||
@@ -64,6 +64,7 @@ class ObjectDetector():
|
||||
|
||||
def run_detector(detection_queue, avg_speed, start):
|
||||
print(f"Starting detection process: {os.getpid()}")
|
||||
listen()
|
||||
plasma_client = plasma.connect("/tmp/plasma")
|
||||
object_detector = ObjectDetector()
|
||||
|
||||
@@ -87,7 +88,7 @@ def run_detector(detection_queue, avg_speed, start):
|
||||
|
||||
class EdgeTPUProcess():
|
||||
def __init__(self):
|
||||
self.detection_queue = mp.Queue()
|
||||
self.detection_queue = mp.SimpleQueue()
|
||||
self.avg_inference_speed = mp.Value('d', 0.01)
|
||||
self.detection_start = mp.Value('d', 0.0)
|
||||
self.detect_process = None
|
||||
|
||||
Reference in New Issue
Block a user