mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-22 06:51:53 +03:00
Cleanup
This commit is contained in:
parent
8eed6bf0c0
commit
f3ce503f76
@ -5,7 +5,6 @@
|
|||||||
"invalidName": "Invalid name. Names can only include letters, numbers, spaces, apostrophes, underscores, and hyphens."
|
"invalidName": "Invalid name. Names can only include letters, numbers, spaces, apostrophes, underscores, and hyphens."
|
||||||
},
|
},
|
||||||
"details": {
|
"details": {
|
||||||
"person": "Person",
|
|
||||||
"subLabelScore": "Sub Label Score",
|
"subLabelScore": "Sub Label Score",
|
||||||
"scoreInfo": "The sub label score is the weighted score for all of the recognized face confidences, so this may differ from the score shown on the snapshot.",
|
"scoreInfo": "The sub label score is the weighted score for all of the recognized face confidences, so this may differ from the score shown on the snapshot.",
|
||||||
"face": "Face Details",
|
"face": "Face Details",
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
|||||||
import { LuSearch } from "react-icons/lu";
|
import { LuSearch } from "react-icons/lu";
|
||||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import { getTranslatedLabel } from "@/utils/i18n";
|
||||||
|
|
||||||
type ClassificationCardProps = {
|
type ClassificationCardProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -133,6 +134,7 @@ type GroupedClassificationCardProps = {
|
|||||||
threshold?: ClassificationThreshold;
|
threshold?: ClassificationThreshold;
|
||||||
selectedItems: string[];
|
selectedItems: string[];
|
||||||
i18nLibrary: string;
|
i18nLibrary: string;
|
||||||
|
objectType: string;
|
||||||
onClick: (data: ClassificationItemData | undefined) => void;
|
onClick: (data: ClassificationItemData | undefined) => void;
|
||||||
onSelectEvent: (event: Event) => void;
|
onSelectEvent: (event: Event) => void;
|
||||||
children?: (data: ClassificationItemData) => React.ReactNode;
|
children?: (data: ClassificationItemData) => React.ReactNode;
|
||||||
@ -143,6 +145,7 @@ export function GroupedClassificationCard({
|
|||||||
threshold,
|
threshold,
|
||||||
selectedItems,
|
selectedItems,
|
||||||
i18nLibrary,
|
i18nLibrary,
|
||||||
|
objectType,
|
||||||
onClick,
|
onClick,
|
||||||
onSelectEvent,
|
onSelectEvent,
|
||||||
children,
|
children,
|
||||||
@ -190,7 +193,7 @@ export function GroupedClassificationCard({
|
|||||||
<div className="flex flex-row justify-between">
|
<div className="flex flex-row justify-between">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<div className="select-none smart-capitalize">
|
<div className="select-none smart-capitalize">
|
||||||
{t("details.person")}
|
{getTranslatedLabel(objectType)}
|
||||||
{event?.sub_label
|
{event?.sub_label
|
||||||
? `: ${event.sub_label} (${Math.round((event.data.sub_label_score || 0) * 100)}%)`
|
? `: ${event.sub_label} (${Math.round((event.data.sub_label_score || 0) * 100)}%)`
|
||||||
: ": " + t("details.unknown")}
|
: ": " + t("details.unknown")}
|
||||||
|
|||||||
@ -865,6 +865,7 @@ function FaceAttemptGroup({
|
|||||||
threshold={threshold}
|
threshold={threshold}
|
||||||
selectedItems={selectedFaces}
|
selectedItems={selectedFaces}
|
||||||
i18nLibrary="views/faceLibrary"
|
i18nLibrary="views/faceLibrary"
|
||||||
|
objectType="person"
|
||||||
onClick={(data) => {
|
onClick={(data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
onClickFaces([data.filename], true);
|
onClickFaces([data.filename], true);
|
||||||
|
|||||||
@ -700,7 +700,7 @@ function TrainGrid({
|
|||||||
filepath: `clips/${model.name}/train/${raw}`,
|
filepath: `clips/${model.name}/train/${raw}`,
|
||||||
timestamp: Number.parseFloat(parts[2]),
|
timestamp: Number.parseFloat(parts[2]),
|
||||||
eventId: `${parts[0]}-${parts[1]}`,
|
eventId: `${parts[0]}-${parts[1]}`,
|
||||||
name: parts[1],
|
name: parts[3],
|
||||||
score: rawScore,
|
score: rawScore,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
@ -961,6 +961,7 @@ function ObjectTrainGrid({
|
|||||||
threshold={threshold}
|
threshold={threshold}
|
||||||
selectedItems={selectedImages}
|
selectedItems={selectedImages}
|
||||||
i18nLibrary="views/classificationModel"
|
i18nLibrary="views/classificationModel"
|
||||||
|
objectType={model.object_config?.objects?.at(0) ?? "Object"}
|
||||||
onClick={(data) => {
|
onClick={(data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
onClickImages([data.filename], true);
|
onClickImages([data.filename], true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user