Support mqtt sensors for logo attributes

This commit is contained in:
Nicolas Mowen 2025-01-29 09:26:02 -07:00
parent 34c383b795
commit d9867b6d8d
2 changed files with 6 additions and 2 deletions

View File

@ -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]

View File

@ -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(