Add more vehicle types to default attribute map (#24097)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

* run lpr on more vehicle types by default

before, a config change to attribute_map was required

* logging tweaks

* remove arg

* use attributes for frontend check

* docs

* only check thumbnail attributes the object can have
This commit is contained in:
Josh Hawkins
2026-08-26 08:23:15 -06:00
committed by GitHub
parent 18c77faea5
commit 5197881ef7
9 changed files with 47 additions and 46 deletions
@@ -21,7 +21,12 @@ const lpr: SectionConfigOverrides = {
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
if (ctx.fullCameraConfig.type === "lpr") return false;
const tracked = ctx.fullCameraConfig.objects?.track ?? [];
return !tracked.some((o) => ["car", "motorcycle"].includes(o));
const vehicles = Object.entries(
ctx.fullConfig.model?.attributes_map ?? {},
)
.filter(([, attributes]) => attributes.includes("license_plate"))
.map(([label]) => label);
return !tracked.some((o) => vehicles.includes(o));
},
},
],