From bf071435538dbb3ae0632378cffa391acf3d39fa Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 17 Dec 2025 15:31:23 -0700 Subject: [PATCH] Actually train object classification models automatically --- .../classification/wizard/Step3ChooseExamples.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/components/classification/wizard/Step3ChooseExamples.tsx b/web/src/components/classification/wizard/Step3ChooseExamples.tsx index d15e45b8c..ec45f4b4d 100644 --- a/web/src/components/classification/wizard/Step3ChooseExamples.tsx +++ b/web/src/components/classification/wizard/Step3ChooseExamples.tsx @@ -186,15 +186,17 @@ export default function Step3ChooseExamples({ await Promise.all(emptyFolderPromises); // Step 3: Determine if we should train - // For state models, we need ALL states to have examples - // For object models, we need at least 2 classes with images + // For state models, we need ALL states to have examples (at least 2 states) + // For object models, we need at least 1 class with images (the rest go to "none") const allStatesHaveExamplesForTraining = step1Data.modelType !== "state" || step1Data.classes.every((className) => classesWithImages.has(className), ); const shouldTrain = - allStatesHaveExamplesForTraining && classesWithImages.size >= 2; + step1Data.modelType === "object" + ? classesWithImages.size >= 1 + : allStatesHaveExamplesForTraining && classesWithImages.size >= 2; // Step 4: Kick off training only if we have enough classes with images if (shouldTrain) {