Skip to content

NVR with realtime local object detection for IP cameras

Plus Settings: add base model and name (#17738)

leccelecce1abd3c68ecb7
diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json
index a76c09254b..bab58a7a4c 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 6c7c6adf60..a6784e559d 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 49426bbe95..8b2061a232 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({
<div className="grid grid-cols-2 gap-4">
<div>
<Label className="text-muted-foreground">
- {t("frigatePlus.modelInfo.modelType")}
+ {t("frigatePlus.modelInfo.baseModel")}
</Label>
<p>
- {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",
+ )}
)
</p>
</div>
@@ -295,9 +301,15 @@ export default function FrigatePlusSettingsView({
</div>
<div>
<Label className="text-muted-foreground">
- {t("frigatePlus.modelInfo.baseModel")}
+ {t("frigatePlus.modelInfo.modelType")}
</Label>
- <p>{config.model.plus.baseModel}</p>
+ <p>
+ {config.model.plus.name} (
+ {config.model.plus.width +
+ "x" +
+ config.model.plus.height}
+ )
+ </p>
</div>
<div>
<Label className="text-muted-foreground">
@@ -328,25 +340,45 @@ export default function FrigatePlusSettingsView({
})
}
>
- <SelectTrigger>
- {frigatePlusSettings.model.id &&
- availableModels?.[frigatePlusSettings.model.id]
- ? new Date(
- availableModels[
- frigatePlusSettings.model.id
- ].trainDate,
- ).toLocaleString() +
+ {frigatePlusSettings.model.id &&
+ availableModels?.[frigatePlusSettings.model.id] ? (
+ <SelectTrigger>
+ {new Date(
+ availableModels[
+ frigatePlusSettings.model.id
+ ].trainDate,
+ ).toLocaleString() +
+ " " +
+ availableModels[frigatePlusSettings.model.id]
+ .baseModel +
+ " (" +
+ (availableModels[frigatePlusSettings.model.id]
+ .isBaseModel
+ ? t(
+ "frigatePlus.modelInfo.plusModelType.baseModel",
+ )
+ : t(
+ "frigatePlus.modelInfo.plusModelType.userModel",
+ )) +
+ ") " +
+ availableModels[frigatePlusSettings.model.id]
+ .name +
" (" +
availableModels[frigatePlusSettings.model.id]
.width +
"x" +
availableModels[frigatePlusSettings.model.id]
.height +
- ")"
- : t(
- "frigatePlus.modelInfo.loadingAvailableModels",
- )}
- </SelectTrigger>
+ ")"}
+ </SelectTrigger>
+ ) : (
+ <SelectTrigger>
+ {t(
+ "frigatePlus.modelInfo.loadingAvailableModels",
+ )}
+ </SelectTrigger>
+ )}
+
<SelectContent>
<SelectGroup>
{Object.entries(availableModels || {}).map(
@@ -366,17 +398,27 @@ export default function FrigatePlusSettingsView({
{new Date(
model.trainDate,
).toLocaleString()}{" "}
- ({model.baseModel})
+ <div>
+ {model.baseModel} {" ("}
+ {model.isBaseModel
+ ? t(
+ "frigatePlus.modelInfo.plusModelType.baseModel",
+ )
+ : t(
+ "frigatePlus.modelInfo.plusModelType.userModel",
+ )}
+ {")"}
+ </div>
+ <div>
+ {model.name} (
+ {model.width + "x" + model.height})
+ </div>
<div>
{t(
"frigatePlus.modelInfo.supportedDetectors",
)}
: {model.supportedDetectors.join(", ")}
</div>
- <div>
- {t("frigatePlus.modelInfo.dimensions")}:{" "}
- {model.width + "x" + model.height}
- </div>
<div className="text-xs text-muted-foreground">
{id}
</div>