From 8e9110f42e3c85bda41945c6daa7491cdcd0d671 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 1 Mar 2020 20:32:32 -0600 Subject: [PATCH] if the detections dont come back in 10s, give up --- frigate/edgetpu.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frigate/edgetpu.py b/frigate/edgetpu.py index 67b8ff75f..3f1266194 100644 --- a/frigate/edgetpu.py +++ b/frigate/edgetpu.py @@ -75,7 +75,6 @@ def run_detector(detection_queue, avg_speed, start): input_frame = plasma_client.get(object_id, timeout_ms=0) if input_frame is plasma.ObjectNotAvailable: - plasma_client.put(np.zeros((20,6), np.float32), object_id_out) continue # detect and put the output in the plasma store @@ -124,7 +123,11 @@ class RemoteObjectDetector(): object_id_detections = plasma.ObjectID(hashlib.sha1(str.encode(f"out-{now}")).digest()) self.plasma_client.put(tensor_input, object_id_frame) self.detection_queue.put(now) - raw_detections = self.plasma_client.get(object_id_detections) + raw_detections = self.plasma_client.get(object_id_detections, timeout_ms=10000) + + if raw_detections is plasma.ObjectNotAvailable: + self.plasma_client.delete([object_id_frame]) + return detections for d in raw_detections: if d[1] < threshold: