mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-16 01:56:43 +03:00
Compare commits
3 Commits
8631dcfe8b
...
0f9ce04b1a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f9ce04b1a | ||
|
|
070faa0d49 | ||
|
|
60462b9b45 |
@ -219,10 +219,10 @@ export function GroupedClassificationCard({
|
||||
const bestTyped: ClassificationItemData = best;
|
||||
return {
|
||||
...bestTyped,
|
||||
name: event ? (event.sub_label ?? "") : bestTyped.name,
|
||||
name: event ? (event.sub_label ?? t("details.unknown")) : bestTyped.name,
|
||||
score: event?.data?.sub_label_score || bestTyped.score,
|
||||
};
|
||||
}, [group, event]);
|
||||
}, [group, event, t]);
|
||||
|
||||
const bestScoreStatus = useMemo(() => {
|
||||
if (!bestItem?.score || !threshold) {
|
||||
|
||||
@ -39,9 +39,11 @@ export default function ModelSelectionView({
|
||||
return [];
|
||||
}
|
||||
|
||||
const allModels = Object.values(config.classification.custom);
|
||||
return Object.values(config.classification.custom);
|
||||
}, [config]);
|
||||
|
||||
return allModels.filter((model) => {
|
||||
const selectedClassificationConfigs = useMemo(() => {
|
||||
return classificationConfigs.filter((model) => {
|
||||
if (pageToggle == "objects" && model.object_config != undefined) {
|
||||
return true;
|
||||
}
|
||||
@ -52,7 +54,7 @@ export default function ModelSelectionView({
|
||||
|
||||
return false;
|
||||
});
|
||||
}, [config, pageToggle]);
|
||||
}, [classificationConfigs, pageToggle]);
|
||||
|
||||
// new model wizard
|
||||
|
||||
@ -115,7 +117,7 @@ export default function ModelSelectionView({
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex size-full gap-2 p-2">
|
||||
{classificationConfigs.map((config) => (
|
||||
{selectedClassificationConfigs.map((config) => (
|
||||
<ModelCard
|
||||
key={config.name}
|
||||
config={config}
|
||||
@ -137,7 +139,7 @@ function ModelCard({ config, onClick }: ModelCardProps) {
|
||||
}>(`classification/${config.name}/dataset`, { revalidateOnFocus: false });
|
||||
|
||||
const coverImage = useMemo(() => {
|
||||
if (!dataset) {
|
||||
if (!dataset?.length) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user