From 81e07a785f260d56aaf706be93df5d1379508b35 Mon Sep 17 00:00:00 2001 From: Nate Meyer Date: Sat, 13 Aug 2022 13:28:23 -0400 Subject: [PATCH] Remove detector type check when creating ObjectDetectProcess --- frigate/app.py | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index cc4023efb..3071c751b 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -198,28 +198,16 @@ class FrigateApp: self.detection_shms.append(shm_out) for name, detector in self.config.detectors.items(): - if detector.type == DetectorTypeEnum.cpu: - self.detectors[name] = ObjectDetectProcess( - name, - self.detection_queue, - self.detection_out_events, - model_path, - model_shape, - detector.type, - "cpu", - detector.num_threads, - ) - if detector.type == DetectorTypeEnum.edgetpu: - self.detectors[name] = ObjectDetectProcess( - name, - self.detection_queue, - self.detection_out_events, - model_path, - model_shape, - detector.type, - detector.device, - detector.num_threads, - ) + self.detectors[name] = ObjectDetectProcess( + name, + self.detection_queue, + self.detection_out_events, + model_path, + model_shape, + detector.type, + detector.device, + detector.num_threads, + ) def start_detected_frames_processor(self) -> None: self.detected_frames_processor = TrackedObjectProcessor(