mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-29 23:29:01 +03:00
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
* respect section hiddenFields when detecting config overrides * change audio events to audio detection to match docs * add field messages for object and review genai * add more config messages * more messages * add guard to prevent race when adding camera dynamically * fix duplicate websocket messages from zombie connection under react strict mode detach ws event handlers before close() in WsProvider cleanup so a CONNECTING socket's deferred onclose can't schedule a reconnect after the next mount resets the unmounted guard, which was spawning a second live ws and duplicating every message * fix double event publishes for stationary objects with attributes
75 lines
1.9 KiB
TypeScript
75 lines
1.9 KiB
TypeScript
import type { SectionConfigOverrides } from "./types";
|
|
|
|
const faceRecognition: SectionConfigOverrides = {
|
|
base: {
|
|
sectionDocs: "/configuration/face_recognition",
|
|
messages: [
|
|
{
|
|
key: "global-disabled",
|
|
messageKey: "configMessages.faceRecognition.globalDisabled",
|
|
severity: "warning",
|
|
condition: (ctx) => {
|
|
if (ctx.level !== "camera") return false;
|
|
return ctx.fullConfig.face_recognition?.enabled === false;
|
|
},
|
|
},
|
|
{
|
|
key: "person-not-tracked",
|
|
messageKey: "configMessages.faceRecognition.personNotTracked",
|
|
severity: "info",
|
|
condition: (ctx) => {
|
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
|
return !ctx.fullCameraConfig.objects?.track?.includes("person");
|
|
},
|
|
},
|
|
],
|
|
restartRequired: [],
|
|
fieldOrder: ["enabled", "min_area"],
|
|
hiddenFields: [],
|
|
advancedFields: [],
|
|
overrideFields: ["enabled", "min_area"],
|
|
},
|
|
global: {
|
|
fieldOrder: [
|
|
"enabled",
|
|
"model_size",
|
|
"unknown_score",
|
|
"detection_threshold",
|
|
"recognition_threshold",
|
|
"min_area",
|
|
"min_faces",
|
|
"save_attempts",
|
|
"blur_confidence_filter",
|
|
"device",
|
|
],
|
|
advancedFields: [
|
|
"unknown_score",
|
|
"detection_threshold",
|
|
"recognition_threshold",
|
|
"min_area",
|
|
"min_faces",
|
|
"save_attempts",
|
|
"blur_confidence_filter",
|
|
"device",
|
|
],
|
|
restartRequired: ["enabled", "model_size", "device"],
|
|
fieldMessages: [
|
|
{
|
|
key: "model-size-large",
|
|
field: "model_size",
|
|
messageKey: "configMessages.faceRecognition.modelSizeLarge",
|
|
severity: "info",
|
|
position: "after",
|
|
condition: (ctx) => ctx.formData?.model_size === "large",
|
|
},
|
|
],
|
|
uiSchema: {
|
|
model_size: {
|
|
"ui:options": { size: "xs" },
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default faceRecognition;
|