allow for custom object detection model via configuration

This commit is contained in:
Jason Hunter
2021-09-12 02:06:37 -04:00
committed by Blake Blackshear
parent 89e317a6bb
commit a7b7a45b23
3 changed files with 16 additions and 5 deletions

View File

@@ -170,6 +170,7 @@ class FrigateApp:
self.mqtt_relay.start()
def start_detectors(self):
model_path = self.config.model.path
model_shape = (self.config.model.height, self.config.model.width)
for name in self.config.cameras.keys():
self.detection_out_events[name] = mp.Event()
@@ -199,6 +200,7 @@ class FrigateApp:
name,
self.detection_queue,
self.detection_out_events,
model_path,
model_shape,
"cpu",
detector.num_threads,
@@ -208,6 +210,7 @@ class FrigateApp:
name,
self.detection_queue,
self.detection_out_events,
model_path,
model_shape,
detector.device,
detector.num_threads,