From efdcfcef971fe941b27a4af3d0275d0406df47e5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 25 Sep 2020 19:00:59 -0500 Subject: [PATCH] cleanup --- frigate/edgetpu.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frigate/edgetpu.py b/frigate/edgetpu.py index b95cd05b7..5a3833d44 100644 --- a/frigate/edgetpu.py +++ b/frigate/edgetpu.py @@ -126,8 +126,6 @@ def run_detector(detection_queue, out_events: Dict[str, mp.Event], avg_speed, st # detect and send the output start.value = datetime.datetime.now().timestamp() - # TODO: what is the overhead for pickling this result vs writing back to shared memory? - # I could try using an Event() and waiting in the other process before looking in memory... detections = object_detector.detect_raw(input_frame) duration = datetime.datetime.now().timestamp()-start.value outputs[connection_id]['np'][:] = detections[:] @@ -179,16 +177,10 @@ class RemoteObjectDetector(): detections = [] # copy input to shared memory - # TODO: what if I just write it there in the first place? self.np_shm[:] = tensor_input[:] self.event.clear() self.detection_queue.put(self.name) self.event.wait() - - # if self.result_connection.poll(10): - # raw_detections = self.result_connection.recv() - # else: - # return detections for d in self.out_np_shm: if d[1] < threshold: