diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index 79b6dd40a..8e0ead43a 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -35,7 +35,7 @@ import MotionTunerView from "@/views/settings/MotionTunerView"; import MasksAndZonesView from "@/views/settings/MasksAndZonesView"; import AuthenticationView from "@/views/settings/AuthenticationView"; import NotificationView from "@/views/settings/NotificationsSettingsView"; -import ClassificationSettingsView from "@/views/settings/SearchSettingsView"; +import ClassificationSettingsView from "@/views/settings/ClassificationSettingsView"; import UiSettingsView from "@/views/settings/UiSettingsView"; import { useSearchEffect } from "@/hooks/use-overlay-state"; import { useSearchParams } from "react-router-dom"; diff --git a/web/src/types/frigateConfig.ts b/web/src/types/frigateConfig.ts index 9b3d60606..2910118f4 100644 --- a/web/src/types/frigateConfig.ts +++ b/web/src/types/frigateConfig.ts @@ -333,7 +333,8 @@ export interface FrigateConfig { face_recognition: { enabled: boolean; - threshold: number; + detection_threshold: number; + recognition_threshold: number; }; ffmpeg: { diff --git a/web/src/views/settings/SearchSettingsView.tsx b/web/src/views/settings/ClassificationSettingsView.tsx similarity index 80% rename from web/src/views/settings/SearchSettingsView.tsx rename to web/src/views/settings/ClassificationSettingsView.tsx index f86b3c01a..4608acd1d 100644 --- a/web/src/views/settings/SearchSettingsView.tsx +++ b/web/src/views/settings/ClassificationSettingsView.tsx @@ -27,6 +27,9 @@ type ClassificationSettings = { reindex?: boolean; model_size?: SearchModelSize; }; + face: { + enabled?: boolean; + }; }; type ClassificationSettingsViewProps = { @@ -49,6 +52,9 @@ export default function ClassificationSettingsView({ reindex: undefined, model_size: undefined, }, + face: { + enabled: undefined, + }, }); const [origSearchSettings, setOrigSearchSettings] = @@ -58,6 +64,9 @@ export default function ClassificationSettingsView({ reindex: undefined, model_size: undefined, }, + face: { + enabled: undefined, + }, }); useEffect(() => { @@ -69,6 +78,9 @@ export default function ClassificationSettingsView({ reindex: config.semantic_search.reindex, model_size: config.semantic_search.model_size, }, + face: { + enabled: config.face_recognition.enabled, + }, }); } @@ -78,13 +90,16 @@ export default function ClassificationSettingsView({ reindex: config.semantic_search.reindex, model_size: config.semantic_search.model_size, }, + face: { + enabled: config.face_recognition.enabled, + }, }); } // we know that these deps are correct // eslint-disable-next-line react-hooks/exhaustive-deps }, [config]); - const handleSearchConfigChange = ( + const handleClassificationConfigChange = ( newConfig: Partial, ) => { setClassificationSettings((prevConfig) => ({ @@ -92,6 +107,7 @@ export default function ClassificationSettingsView({ ...prevConfig.search, ...newConfig.search, }, + face: { ...prevConfig.face, ...newConfig.face }, })); setUnsavedChanges(true); setChangedValue(true); @@ -204,7 +220,9 @@ export default function ClassificationSettingsView({ disabled={classificationSettings.search.enabled === undefined} checked={classificationSettings.search.enabled === true} onCheckedChange={(isChecked) => { - handleSearchConfigChange({ search: { enabled: isChecked } }); + handleClassificationConfigChange({ + search: { enabled: isChecked }, + }); }} />
@@ -219,7 +237,9 @@ export default function ClassificationSettingsView({ disabled={classificationSettings.search.reindex === undefined} checked={classificationSettings.search.reindex === true} onCheckedChange={(isChecked) => { - handleSearchConfigChange({ search: { reindex: isChecked } }); + handleClassificationConfigChange({ + search: { reindex: isChecked }, + }); }} />
@@ -255,7 +275,7 @@ export default function ClassificationSettingsView({
+ + + + + Face Recognition + +
+
+

+ Face recognition allows people to be assigned names and when their + face is recognized Frigate will assign the person's name as a sub + label. This information is included in the UI, filters, as well as + in notifications. +

+ +
+ + Read the Documentation + + +
+
+
+ +
+
+ { + handleClassificationConfigChange({ + face: { enabled: isChecked }, + }); + }} + /> +
+ +
+
+
+