mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-30 13:48:07 +02:00
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 0191aa34f6
.
This commit is contained in:
parent
84c1ad59a2
commit
1abd3c68ec
@ -571,8 +571,11 @@
|
|||||||
"modelType": "Model Type",
|
"modelType": "Model Type",
|
||||||
"trainDate": "Train Date",
|
"trainDate": "Train Date",
|
||||||
"baseModel": "Base Model",
|
"baseModel": "Base Model",
|
||||||
|
"plusModelType": {
|
||||||
|
"baseModel": "Base Model",
|
||||||
|
"userModel": "Fine-Tuned"
|
||||||
|
},
|
||||||
"supportedDetectors": "Supported Detectors",
|
"supportedDetectors": "Supported Detectors",
|
||||||
"dimensions": "Dimensions",
|
|
||||||
"cameras": "Cameras",
|
"cameras": "Cameras",
|
||||||
"loading": "Loading model information...",
|
"loading": "Loading model information...",
|
||||||
"error": "Failed to load model information",
|
"error": "Failed to load model information",
|
||||||
|
@ -408,6 +408,7 @@ export interface FrigateConfig {
|
|||||||
id: string;
|
id: string;
|
||||||
trainDate: string;
|
trainDate: string;
|
||||||
baseModel: string;
|
baseModel: string;
|
||||||
|
isBaseModel: boolean;
|
||||||
supportedDetectors: string[];
|
supportedDetectors: string[];
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
|
@ -26,6 +26,8 @@ import {
|
|||||||
type FrigatePlusModel = {
|
type FrigatePlusModel = {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
name: string;
|
||||||
|
isBaseModel: boolean;
|
||||||
supportedDetectors: string[];
|
supportedDetectors: string[];
|
||||||
trainDate: string;
|
trainDate: string;
|
||||||
baseModel: string;
|
baseModel: string;
|
||||||
@ -273,13 +275,17 @@ export default function FrigatePlusSettingsView({
|
|||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-muted-foreground">
|
<Label className="text-muted-foreground">
|
||||||
{t("frigatePlus.modelInfo.modelType")}
|
{t("frigatePlus.modelInfo.baseModel")}
|
||||||
</Label>
|
</Label>
|
||||||
<p>
|
<p>
|
||||||
{config.model.plus.name} (
|
{config.model.plus.baseModel} (
|
||||||
{config.model.plus.width +
|
{config.model.plus.isBaseModel
|
||||||
"x" +
|
? t(
|
||||||
config.model.plus.height}
|
"frigatePlus.modelInfo.plusModelType.baseModel",
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"frigatePlus.modelInfo.plusModelType.userModel",
|
||||||
|
)}
|
||||||
)
|
)
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -295,9 +301,15 @@ export default function FrigatePlusSettingsView({
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-muted-foreground">
|
<Label className="text-muted-foreground">
|
||||||
{t("frigatePlus.modelInfo.baseModel")}
|
{t("frigatePlus.modelInfo.modelType")}
|
||||||
</Label>
|
</Label>
|
||||||
<p>{config.model.plus.baseModel}</p>
|
<p>
|
||||||
|
{config.model.plus.name} (
|
||||||
|
{config.model.plus.width +
|
||||||
|
"x" +
|
||||||
|
config.model.plus.height}
|
||||||
|
)
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-muted-foreground">
|
<Label className="text-muted-foreground">
|
||||||
@ -328,25 +340,45 @@ export default function FrigatePlusSettingsView({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SelectTrigger>
|
{frigatePlusSettings.model.id &&
|
||||||
{frigatePlusSettings.model.id &&
|
availableModels?.[frigatePlusSettings.model.id] ? (
|
||||||
availableModels?.[frigatePlusSettings.model.id]
|
<SelectTrigger>
|
||||||
? new Date(
|
{new Date(
|
||||||
availableModels[
|
availableModels[
|
||||||
frigatePlusSettings.model.id
|
frigatePlusSettings.model.id
|
||||||
].trainDate,
|
].trainDate,
|
||||||
).toLocaleString() +
|
).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]
|
availableModels[frigatePlusSettings.model.id]
|
||||||
.width +
|
.width +
|
||||||
"x" +
|
"x" +
|
||||||
availableModels[frigatePlusSettings.model.id]
|
availableModels[frigatePlusSettings.model.id]
|
||||||
.height +
|
.height +
|
||||||
")"
|
")"}
|
||||||
: t(
|
</SelectTrigger>
|
||||||
"frigatePlus.modelInfo.loadingAvailableModels",
|
) : (
|
||||||
)}
|
<SelectTrigger>
|
||||||
</SelectTrigger>
|
{t(
|
||||||
|
"frigatePlus.modelInfo.loadingAvailableModels",
|
||||||
|
)}
|
||||||
|
</SelectTrigger>
|
||||||
|
)}
|
||||||
|
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
{Object.entries(availableModels || {}).map(
|
{Object.entries(availableModels || {}).map(
|
||||||
@ -366,17 +398,27 @@ export default function FrigatePlusSettingsView({
|
|||||||
{new Date(
|
{new Date(
|
||||||
model.trainDate,
|
model.trainDate,
|
||||||
).toLocaleString()}{" "}
|
).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>
|
<div>
|
||||||
{t(
|
{t(
|
||||||
"frigatePlus.modelInfo.supportedDetectors",
|
"frigatePlus.modelInfo.supportedDetectors",
|
||||||
)}
|
)}
|
||||||
: {model.supportedDetectors.join(", ")}
|
: {model.supportedDetectors.join(", ")}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
{t("frigatePlus.modelInfo.dimensions")}:{" "}
|
|
||||||
{model.width + "x" + model.height}
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-muted-foreground">
|
<div className="text-xs text-muted-foreground">
|
||||||
{id}
|
{id}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user