Remove detector type check when creating ObjectDetectProcess

This commit is contained in:
Nate Meyer 2022-08-13 13:28:23 -04:00
parent b0b2a28296
commit 81e07a785f

View File

@ -198,28 +198,16 @@ class FrigateApp:
self.detection_shms.append(shm_out) self.detection_shms.append(shm_out)
for name, detector in self.config.detectors.items(): for name, detector in self.config.detectors.items():
if detector.type == DetectorTypeEnum.cpu: self.detectors[name] = ObjectDetectProcess(
self.detectors[name] = ObjectDetectProcess( name,
name, self.detection_queue,
self.detection_queue, self.detection_out_events,
self.detection_out_events, model_path,
model_path, model_shape,
model_shape, detector.type,
detector.type, detector.device,
"cpu", detector.num_threads,
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,
)
def start_detected_frames_processor(self) -> None: def start_detected_frames_processor(self) -> None:
self.detected_frames_processor = TrackedObjectProcessor( self.detected_frames_processor = TrackedObjectProcessor(