mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-29 11:26:49 +03:00
Refactor detector and model management (#23995)
* Refactor detector and model management * Fix model resolution field
This commit is contained in:
committed by
Josh Hawkins
parent
7b42d94bfe
commit
5c9c02002f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -102,11 +102,12 @@ def generate_config():
|
||||
snapshot = config.model_dump()
|
||||
|
||||
# Runtime-computed fields not in the Pydantic dump
|
||||
all_attrs = set()
|
||||
for attrs in snapshot.get("model", {}).get("attributes_map", {}).values():
|
||||
all_attrs.update(attrs)
|
||||
snapshot["model"]["all_attributes"] = sorted(all_attrs)
|
||||
snapshot["model"]["colormap"] = {}
|
||||
for model in snapshot.get("models", []):
|
||||
all_attrs = set()
|
||||
for attrs in model.get("attributes_map", {}).values():
|
||||
all_attrs.update(attrs)
|
||||
model["all_attributes"] = sorted(all_attrs)
|
||||
model["colormap"] = {}
|
||||
|
||||
return snapshot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user