mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-07 15:22:48 +03:00
Sub label sensors (#16218)
* Support mqtt sensors for logo attributes * Expose in api
This commit is contained in:
committed by
Blake Blackshear
parent
1c3527f5c4
commit
9236898a9d
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user