mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-16 03:52:09 +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."
|
||||
},
|
||||
"details": {
|
||||
"person": "Person",
|
||||
"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.",
|
||||
"face": "Face Details",
|
||||
|
||||
@ -14,6 +14,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
||||
import { LuSearch } from "react-icons/lu";
|
||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
|
||||
type ClassificationCardProps = {
|
||||
className?: string;
|
||||
@ -133,6 +134,7 @@ type GroupedClassificationCardProps = {
|
||||
threshold?: ClassificationThreshold;
|
||||
selectedItems: string[];
|
||||
i18nLibrary: string;
|
||||
objectType: string;
|
||||
onClick: (data: ClassificationItemData | undefined) => void;
|
||||
onSelectEvent: (event: Event) => void;
|
||||
children?: (data: ClassificationItemData) => React.ReactNode;
|
||||
@ -143,6 +145,7 @@ export function GroupedClassificationCard({
|
||||
threshold,
|
||||
selectedItems,
|
||||
i18nLibrary,
|
||||
objectType,
|
||||
onClick,
|
||||
onSelectEvent,
|
||||
children,
|
||||
@ -190,7 +193,7 @@ export function GroupedClassificationCard({
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="select-none smart-capitalize">
|
||||
{t("details.person")}
|
||||
{getTranslatedLabel(objectType)}
|
||||
{event?.sub_label
|
||||
? `: ${event.sub_label} (${Math.round((event.data.sub_label_score || 0) * 100)}%)`
|
||||
: ": " + t("details.unknown")}
|
||||
|
||||
@ -865,6 +865,7 @@ function FaceAttemptGroup({
|
||||
threshold={threshold}
|
||||
selectedItems={selectedFaces}
|
||||
i18nLibrary="views/faceLibrary"
|
||||
objectType="person"
|
||||
onClick={(data) => {
|
||||
if (data) {
|
||||
onClickFaces([data.filename], true);
|
||||
|
||||
@ -700,7 +700,7 @@ function TrainGrid({
|
||||
filepath: `clips/${model.name}/train/${raw}`,
|
||||
timestamp: Number.parseFloat(parts[2]),
|
||||
eventId: `${parts[0]}-${parts[1]}`,
|
||||
name: parts[1],
|
||||
name: parts[3],
|
||||
score: rawScore,
|
||||
};
|
||||
})
|
||||
@ -961,6 +961,7 @@ function ObjectTrainGrid({
|
||||
threshold={threshold}
|
||||
selectedItems={selectedImages}
|
||||
i18nLibrary="views/classificationModel"
|
||||
objectType={model.object_config?.objects?.at(0) ?? "Object"}
|
||||
onClick={(data) => {
|
||||
if (data) {
|
||||
onClickImages([data.filename], true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user