mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Fix color map
This commit is contained in:
parent
a7d43cc273
commit
a4e125d54a
@ -158,17 +158,13 @@ class ModelConfig(BaseModel):
|
||||
|
||||
def create_colormap(self, enabled_labels: set[str]) -> None:
|
||||
"""Get a list of colors for enabled labels that aren't attributes."""
|
||||
colors = generate_color_palette(
|
||||
len(
|
||||
list(
|
||||
filter(
|
||||
lambda label: label not in self._all_attributes, enabled_labels
|
||||
enabled_trackable_labels = list(
|
||||
filter(lambda label: label not in self._all_attributes, enabled_labels)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
self._colormap = {label: color for label, color in zip(enabled_labels, colors)}
|
||||
colors = generate_color_palette(len(enabled_trackable_labels))
|
||||
self._colormap = {
|
||||
label: color for label, color in zip(enabled_trackable_labels, colors)
|
||||
}
|
||||
|
||||
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user