mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +03:00
fix sub label score and add info popover
This commit is contained in:
parent
db447c26f3
commit
c3b346f798
@ -5,7 +5,8 @@
|
|||||||
},
|
},
|
||||||
"details": {
|
"details": {
|
||||||
"person": "Person",
|
"person": "Person",
|
||||||
"confidence": "Confidence",
|
"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",
|
"face": "Face Details",
|
||||||
"faceDesc": "Details for the face and associated object",
|
"faceDesc": "Details for the face and associated object",
|
||||||
"timestamp": "Timestamp"
|
"timestamp": "Timestamp"
|
||||||
|
|||||||
@ -21,6 +21,11 @@ import {
|
|||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
|
import {
|
||||||
|
Popover,
|
||||||
|
PopoverContent,
|
||||||
|
PopoverTrigger,
|
||||||
|
} from "@/components/ui/popover";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@ -42,6 +47,7 @@ import { isDesktop, isMobile } from "react-device-detect";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
LuImagePlus,
|
LuImagePlus,
|
||||||
|
LuInfo,
|
||||||
LuPencil,
|
LuPencil,
|
||||||
LuRefreshCw,
|
LuRefreshCw,
|
||||||
LuScanFace,
|
LuScanFace,
|
||||||
@ -647,10 +653,23 @@ function TrainingGrid({
|
|||||||
{selectedEvent?.data.sub_label_score && (
|
{selectedEvent?.data.sub_label_score && (
|
||||||
<div className="flex flex-col gap-1.5">
|
<div className="flex flex-col gap-1.5">
|
||||||
<div className="text-sm text-primary/40">
|
<div className="text-sm text-primary/40">
|
||||||
{t("details.confidence")}
|
<div className="flex flex-row items-center gap-1">
|
||||||
|
{t("details.subLabelScore")}
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<div className="cursor-pointer p-0">
|
||||||
|
<LuInfo className="size-4" />
|
||||||
|
<span className="sr-only">Info</span>
|
||||||
|
</div>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className="w-80">
|
||||||
|
{t("details.scoreInfo")}
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm smart-capitalize">
|
<div className="text-sm smart-capitalize">
|
||||||
{Math.round(selectedEvent?.data?.sub_label_score || 0) * 100}%
|
{Math.round((selectedEvent?.data?.sub_label_score || 0) * 100)}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user