From 1abd3c68ecb7a1339ebc6efb0b758cb795dc8666 Mon Sep 17 00:00:00 2001 From: leccelecce <24962424+leccelecce@users.noreply.github.com> Date: Thu, 17 Apr 2025 15:48:56 +0100 Subject: [PATCH] Plus Settings: add base model and name (#17738) * Plus Settings: add base model and name * I18n change user model to fine-tuned model * Move fields in drop-down for mobile * Missed commit * remove unused i18n key * Add base/FTM to model Type, reorder Model Information fields * fix missing availableModels for now * shorten Fine-Tuned Model to Fine-Tuned * isBaseModel is already available in config, use that * Change Base Model to Default * minor tweaks * Revert "Change Base Model to Default" This reverts commit 0191aa34f60dcde806ec7b00cc687aada6161657. --- web/public/locales/en/views/settings.json | 5 +- web/src/types/frigateConfig.ts | 1 + .../settings/FrigatePlusSettingsView.tsx | 92 ++++++++++++++----- 3 files changed, 72 insertions(+), 26 deletions(-) diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index a76c09254..bab58a7a4 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -571,8 +571,11 @@ "modelType": "Model Type", "trainDate": "Train Date", "baseModel": "Base Model", + "plusModelType": { + "baseModel": "Base Model", + "userModel": "Fine-Tuned" + }, "supportedDetectors": "Supported Detectors", - "dimensions": "Dimensions", "cameras": "Cameras", "loading": "Loading model information...", "error": "Failed to load model information", diff --git a/web/src/types/frigateConfig.ts b/web/src/types/frigateConfig.ts index 6c7c6adf6..a6784e559 100644 --- a/web/src/types/frigateConfig.ts +++ b/web/src/types/frigateConfig.ts @@ -408,6 +408,7 @@ export interface FrigateConfig { id: string; trainDate: string; baseModel: string; + isBaseModel: boolean; supportedDetectors: string[]; width: number; height: number; diff --git a/web/src/views/settings/FrigatePlusSettingsView.tsx b/web/src/views/settings/FrigatePlusSettingsView.tsx index 49426bbe9..8b2061a23 100644 --- a/web/src/views/settings/FrigatePlusSettingsView.tsx +++ b/web/src/views/settings/FrigatePlusSettingsView.tsx @@ -26,6 +26,8 @@ import { type FrigatePlusModel = { id: string; type: string; + name: string; + isBaseModel: boolean; supportedDetectors: string[]; trainDate: string; baseModel: string; @@ -273,13 +275,17 @@ export default function FrigatePlusSettingsView({

- {config.model.plus.name} ( - {config.model.plus.width + - "x" + - config.model.plus.height} + {config.model.plus.baseModel} ( + {config.model.plus.isBaseModel + ? t( + "frigatePlus.modelInfo.plusModelType.baseModel", + ) + : t( + "frigatePlus.modelInfo.plusModelType.userModel", + )} )

@@ -295,9 +301,15 @@ export default function FrigatePlusSettingsView({
-

{config.model.plus.baseModel}

+

+ {config.model.plus.name} ( + {config.model.plus.width + + "x" + + config.model.plus.height} + ) +