Skip to content

NVR with realtime local object detection for IP cameras

Sub label sensors (#16218)

Nicolas Mowen9236898a9d65
diff --git a/frigate/api/app.py b/frigate/api/app.py
index a4b1267af3..f8a5a912d0 100644
--- a/frigate/api/app.py
+++ b/frigate/api/app.py
@@ -157,6 +157,7 @@ def config(request: Request):
config["plus"] = {"enabled": request.app.frigate_config.plus_api.is_active()}
config["model"]["colormap"] = config_obj.model.colormap
config["model"]["all_attributes"] = config_obj.model.all_attributes
+ config["model"]["non_logo_attributes"] = config_obj.model.non_logo_attributes
# use merged labelamp
for detector_config in config["detectors"].values():
diff --git a/frigate/camera/activity_manager.py b/frigate/camera/activity_manager.py
index 381e295b9f..9c06cf6f9a 100644
--- a/frigate/camera/activity_manager.py
+++ b/frigate/camera/activity_manager.py
@@ -103,7 +103,7 @@ class CameraActivityManager:
# run through each object and check what topics need to be updated
for label in self.config.cameras[camera].objects.track:
- if label in self.config.model.all_attributes:
+ if label in self.config.model.non_logo_attributes:
continue
new_count = all_objects[label]
diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py
index 452f1feedc..1d096a6480 100644
--- a/frigate/detectors/detector_config.py
+++ b/frigate/detectors/detector_config.py
@@ -78,6 +78,10 @@ class ModelConfig(BaseModel):
def colormap(self) -> Dict[int, Tuple[int, int, int]]:
return self._colormap
+ @property
+ def non_logo_attributes(self) -> list[str]:
+ return ["face", "license_plate"]
+
@property
def all_attributes(self) -> list[str]:
return self._all_attributes
@@ -107,7 +111,7 @@ class ModelConfig(BaseModel):
self._all_attributes = list(unique_attributes)
self._all_attribute_logos = list(
- unique_attributes - set(["face", "license_plate"])
+ unique_attributes - set(self.non_logo_attributes)
)
def check_and_load_plus_model(