mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-28 10:18:58 +03:00
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
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:
@@ -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));
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user