mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 17:47:37 +03:00
Cleanup score showing
This commit is contained in:
parent
accf7532a0
commit
d5ab22de3d
@ -217,9 +217,7 @@ export function GroupedClassificationCard({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!best) {
|
if (!best) {
|
||||||
// select an item from the middle of the time series as this usually correlates
|
return group.at(-1);
|
||||||
// to a more representative image than the first or last
|
|
||||||
return group.at(Math.floor(group.length / 2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const bestTyped: ClassificationItemData = best;
|
const bestTyped: ClassificationItemData = best;
|
||||||
@ -230,7 +228,7 @@ export function GroupedClassificationCard({
|
|||||||
? event.sub_label
|
? event.sub_label
|
||||||
: t(noClassificationLabel)
|
: t(noClassificationLabel)
|
||||||
: bestTyped.name,
|
: bestTyped.name,
|
||||||
score: event?.data?.sub_label_score || bestTyped.score,
|
score: event?.data?.sub_label_score,
|
||||||
};
|
};
|
||||||
}, [group, event, noClassificationLabel, t]);
|
}, [group, event, noClassificationLabel, t]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user