diff --git a/web/public/locales/en/views/classificationModel.json b/web/public/locales/en/views/classificationModel.json
index 4fbb95327..3a68b82f1 100644
--- a/web/public/locales/en/views/classificationModel.json
+++ b/web/public/locales/en/views/classificationModel.json
@@ -148,6 +148,8 @@
"step3": {
"selectImagesPrompt": "Select all images with: {{className}}",
"selectImagesDescription": "Click on images to select them. Click Continue when you're done with this class.",
+ "allImagesRequired_one": "Please classify all images. {{count}} image remaining.",
+ "allImagesRequired_other": "Please classify all images. {{count}} images remaining.",
"generating": {
"title": "Generating Sample Images",
"description": "Frigate is pulling representative images from your recordings. This may take a moment..."
diff --git a/web/src/components/classification/wizard/Step3ChooseExamples.tsx b/web/src/components/classification/wizard/Step3ChooseExamples.tsx
index 68da03eaf..f638c01e3 100644
--- a/web/src/components/classification/wizard/Step3ChooseExamples.tsx
+++ b/web/src/components/classification/wizard/Step3ChooseExamples.tsx
@@ -10,6 +10,12 @@ import useSWR from "swr";
import { baseUrl } from "@/api/baseUrl";
import { isMobile } from "react-device-detect";
import { cn } from "@/lib/utils";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { TooltipPortal } from "@radix-ui/react-tooltip";
export type Step3FormData = {
examplesGenerated: boolean;
@@ -317,6 +323,19 @@ export default function Step3ChooseExamples({
return unclassifiedImages.length === 0;
}, [unclassifiedImages]);
+ // For state models on the last class, require all images to be classified
+ const isLastClass = currentClassIndex === allClasses.length - 1;
+ const canProceed = useMemo(() => {
+ if (
+ step1Data.modelType === "state" &&
+ isLastClass &&
+ !allImagesClassified
+ ) {
+ return false;
+ }
+ return true;
+ }, [step1Data.modelType, isLastClass, allImagesClassified]);
+
const handleBack = useCallback(() => {
if (currentClassIndex > 0) {
const previousClass = allClasses[currentClassIndex - 1];
@@ -438,20 +457,35 @@ export default function Step3ChooseExamples({
-
+
+
+
+
+ {!canProceed && (
+
+
+ {t("wizard.step3.allImagesRequired", {
+ count: unclassifiedImages.length,
+ })}
+
+
+ )}
+
)}