mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-26 23:58:59 +03:00
Tweaks (#24067)
* improve keyframes messages * don't pad the labelmap with unknown `load_labels()` prefilled 91 `unknown` entries before reading the label file, so any model with fewer than 91 classes kept that padding in `merged_labelmap` and `unknown` showed up as a selectable object type in the objects settings UI. The padding only existed so `RemoteObjectDetector.detect` could index the labelmap without a KeyError, and it didn't even cover the empty-file case or Frigate+, which never had a prefill. Both lookups now skip class ids the labelmap doesn't name and warn once per id.
This commit is contained in:
committed by
Nicolas Mowen
parent
853840dfd4
commit
396a2156b2
@@ -89,17 +89,29 @@ export default function KeyframeAnalysisSection({
|
||||
case "warning":
|
||||
summary = (
|
||||
<Row icon="warning">
|
||||
{t("cameras.info.keyframes.warning", { seconds: analysis.max_gap })}
|
||||
{analysis.pattern === "fixed"
|
||||
? t("cameras.info.keyframes.warningFixed", {
|
||||
seconds: analysis.mean_gap,
|
||||
})
|
||||
: t("cameras.info.keyframes.warningVariable", {
|
||||
minSeconds: analysis.min_gap,
|
||||
maxSeconds: analysis.max_gap,
|
||||
})}
|
||||
</Row>
|
||||
);
|
||||
break;
|
||||
case "error":
|
||||
summary = (
|
||||
<Row icon="error">
|
||||
{t("cameras.info.keyframes.error", {
|
||||
seconds: analysis.max_gap,
|
||||
segmentTime: analysis.segment_time,
|
||||
})}
|
||||
{analysis.pattern === "fixed"
|
||||
? t("cameras.info.keyframes.errorFixed", {
|
||||
seconds: analysis.mean_gap,
|
||||
segmentTime: analysis.segment_time,
|
||||
})
|
||||
: t("cameras.info.keyframes.errorVariable", {
|
||||
seconds: analysis.max_gap,
|
||||
segmentTime: analysis.segment_time,
|
||||
})}
|
||||
</Row>
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -161,6 +161,8 @@ export type KeyframeSeverity =
|
||||
| "unknown"
|
||||
| "record_disabled";
|
||||
|
||||
export type KeyframeGapPattern = "fixed" | "variable";
|
||||
|
||||
export type KeyframeAnalysis = {
|
||||
severity: KeyframeSeverity;
|
||||
stream_index?: number;
|
||||
@@ -168,6 +170,7 @@ export type KeyframeAnalysis = {
|
||||
max_gap?: number | null;
|
||||
mean_gap?: number | null;
|
||||
min_gap?: number | null;
|
||||
pattern?: KeyframeGapPattern | null;
|
||||
duration_observed?: number | null;
|
||||
segment_time?: number;
|
||||
thresholds?: { warning: number; error: number };
|
||||
|
||||
Reference in New Issue
Block a user