State Classification
State classification allows you to train a custom MobileNetV2 classification model on a fixed region of your camera frame(s) to determine a current state. The model can be configured to run on a schedule and/or when motion is detected in that region. Classification results are available through the frigate/<camera_name>/classification/<model_name> MQTT topic and in Home Assistant sensors via the official Frigate integration.
Minimum System Requirementsâ
State classification models are lightweight and run very fast on CPU.
Training the model does briefly use a high amount of system resources for about 1â3 minutes per training run. On lower-power devices, training may take longer.
A CPU with AVX + AVX2 instructions is required for training and inference.
Classesâ
Classes are the different states an area on your camera can be in. Each class represents a distinct visual state that the model will learn to recognize.
For state classification:
- Define classes that represent mutually exclusive states
- Examples:
openandclosedfor a garage door,onandofffor lights - Use at least 2 classes (typically binary states work best)
- Keep class names clear and descriptive
Example use casesâ
- Door state: Detect if a garage or front door is open vs closed.
- Gate state: Track if a driveway gate is open or closed.
- Trash day: Bins at curb vs no bins present.
- Pool cover: Cover on vs off.