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