mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-27 22:48:58 +03:00
Refactor detector and model management (#23995)
* Refactor detector and model management * Fix model resolution field
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
} from "@/types/frigateConfig";
|
||||
import { ClassificationDatasetResponse } from "@/types/classification";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
import { isAttributeLabel } from "@/utils/modelUtil";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import axios from "axios";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
@@ -99,7 +100,7 @@ export default function ClassificationModelEditDialog({
|
||||
}
|
||||
|
||||
cameraConfig.objects.track.forEach((label) => {
|
||||
if (!config.model.all_attributes.includes(label)) {
|
||||
if (!isAttributeLabel(config, label)) {
|
||||
labels.add(label);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,6 +27,7 @@ import useSWR from "swr";
|
||||
import { FrigateConfig } from "@/types/frigateConfig";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
import { useDocDomain } from "@/hooks/use-doc-domain";
|
||||
import { isAttributeLabel } from "@/utils/modelUtil";
|
||||
import {
|
||||
Popover,
|
||||
PopoverContent,
|
||||
@@ -72,7 +73,7 @@ export default function Step1NameAndDefine({
|
||||
}
|
||||
|
||||
cameraConfig.objects.track.forEach((label) => {
|
||||
if (!config.model.all_attributes.includes(label)) {
|
||||
if (!isAttributeLabel(config, label)) {
|
||||
labels.add(label);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user