Compare commits

..

No commits in common. "6f5881057931f2c7a891288073fbc0601a95ca1f" and "887ace96c4251d856228cec3f5bd5e58891932f6" have entirely different histories.

9 changed files with 8 additions and 66 deletions

View File

@ -102,19 +102,8 @@ If examples for some of your classes do not appear in the grid, you can continue
### Improving the Model
:::tip Diversity matters far more than volume
Selecting dozens of nearly identical images is one of the fastest ways to degrade model performance. MobileNetV2 can overfit quickly when trained on homogeneous data — the model learns what *that exact moment* looked like rather than what actually defines the class. **This is why Frigate does not implement bulk training in the UI.**
For more detail, see [Frigate Tip: Best Practices for Training Face and Custom Classification Models](https://github.com/blakeblackshear/frigate/discussions/21374).
:::
- **Start small and iterate**: Begin with a small, representative set of images per class. Models often begin working well with surprisingly few examples and improve naturally over time.
- **Favor hard examples**: When images appear in the Recent Classifications tab, prioritize images scoring below 90100% or those captured under new lighting, weather, or distance conditions.
- **Avoid bulk training similar images**: Training large batches of images that already score 100% (or close) adds little new information and increases the risk of overfitting.
- **The wizard is just the starting point**: You dont need to find and label every class upfront. Missing classes will naturally appear in Recent Classifications, and those images tend to be more valuable because they represent new conditions and edge cases.
- **Problem framing**: Keep classes visually distinct and relevant to the chosen object types.
- **Data collection**: Use the models Recent Classification tab to gather balanced examples across times of day, weather, and distances.
- **Preprocessing**: Ensure examples reflect object crops similar to Frigates boxes; keep the subject centered.
- **Labels**: Keep label names short and consistent; include a `none` class if you plan to ignore uncertain predictions for sub labels.
- **Threshold**: Tune `threshold` per model to reduce false assignments. Start at `0.8` and adjust based on validation.

View File

@ -70,21 +70,10 @@ Once some images are assigned, training will begin automatically.
### Improving the Model
:::tip Diversity matters far more than volume
Selecting dozens of nearly identical images is one of the fastest ways to degrade model performance. MobileNetV2 can overfit quickly when trained on homogeneous data — the model learns what *that exact moment* looked like rather than what actually defines the state. This often leads to models that work perfectly under the original conditions but become unstable when day turns to night, weather changes, or seasonal lighting shifts. **This is why Frigate does not implement bulk training in the UI.**
For more detail, see [Frigate Tip: Best Practices for Training Face and Custom Classification Models](https://github.com/blakeblackshear/frigate/discussions/21374).
:::
- **Start small and iterate**: Begin with a small, representative set of images per class. Models often begin working well with surprisingly few examples and improve naturally over time.
- **Problem framing**: Keep classes visually distinct and state-focused (e.g., `open`, `closed`, `unknown`). Avoid combining object identity with state in a single model unless necessary.
- **Data collection**: Use the model's Recent Classifications tab to gather balanced examples across times of day and weather.
- **When to train**: Focus on cases where the model is entirely incorrect or flips between states when it should not. There's no need to train additional images when the model is already working consistently.
- **Favor hard examples**: When images appear in the Recent Classifications tab, prioritize images scoring below 90100% or those captured under new conditions (e.g., first snow of the year, seasonal changes, objects temporarily in view, insects at night). These represent scenarios different from the default state and help prevent overfitting.
- **Avoid bulk training similar images**: Training large batches of images that already score 100% (or close) adds little new information and increases the risk of overfitting.
- **The wizard is just the starting point**: You don't need to find and label every state upfront. Missing states will naturally appear in Recent Classifications, and those images tend to be more valuable because they represent new conditions and edge cases.
- **Selecting training images**: Images scoring below 100% due to new conditions (e.g., first snow of the year, seasonal changes) or variations (e.g., objects temporarily in view, insects at night) are good candidates for training, as they represent scenarios different from the default state. Training these lower-scoring images that differ from existing training data helps prevent overfitting. Avoid training large quantities of images that look very similar, especially if they already score 100% as this can lead to overfitting.
## Debugging Classification Models

View File

@ -32,7 +32,6 @@ class CameraConfigUpdateEnum(str, Enum):
face_recognition = "face_recognition"
lpr = "lpr"
snapshots = "snapshots"
timestamp_style = "timestamp_style"
zones = "zones"
@ -134,8 +133,6 @@ class CameraConfigUpdateSubscriber:
config.snapshots = updated_config
elif update_type == CameraConfigUpdateEnum.onvif:
config.onvif = updated_config
elif update_type == CameraConfigUpdateEnum.timestamp_style:
config.timestamp_style = updated_config
elif update_type == CameraConfigUpdateEnum.zones:
config.zones = updated_config

View File

@ -474,7 +474,7 @@ class FrigateConfig(FrigateBaseModel):
live: CameraLiveConfig = Field(
default_factory=CameraLiveConfig,
title="Live playback",
description="Settings to control the jsmpeg live stream resolution and quality. This does not affect restreamed cameras that use go2rtc for live view.",
description="Settings used by the Web UI to control live stream resolution and quality.",
)
motion: Optional[MotionConfig] = Field(
default=None,

View File

@ -81,7 +81,6 @@ class TrackedObjectProcessor(threading.Thread):
CameraConfigUpdateEnum.motion,
CameraConfigUpdateEnum.objects,
CameraConfigUpdateEnum.remove,
CameraConfigUpdateEnum.timestamp_style,
CameraConfigUpdateEnum.zones,
],
)

View File

@ -752,7 +752,7 @@
},
"live": {
"label": "Live playback",
"description": "Settings to control the jsmpeg live stream resolution and quality. This does not affect restreamed cameras that use go2rtc for live view.",
"description": "Settings used by the Web UI to control live stream resolution and quality.",
"streams": {
"label": "Live stream names",
"description": "Mapping of configured stream names to restream/go2rtc names used for live playback."

View File

@ -825,12 +825,6 @@
"area": "Area"
}
},
"timestampPosition": {
"tl": "Top left",
"tr": "Top right",
"bl": "Bottom left",
"br": "Bottom right"
},
"users": {
"title": "Users",
"management": {
@ -1348,22 +1342,7 @@
"preset-nvidia": "NVIDIA GPU",
"preset-jetson-h264": "NVIDIA Jetson (H.264)",
"preset-jetson-h265": "NVIDIA Jetson (H.265)",
"preset-rkmpp": "Rockchip RKMPP",
"preset-http-jpeg-generic": "HTTP JPEG (Generic)",
"preset-http-mjpeg-generic": "HTTP MJPEG (Generic)",
"preset-http-reolink": "HTTP - Reolink Cameras",
"preset-rtmp-generic": "RTMP (Generic)",
"preset-rtsp-generic": "RTSP (Generic)",
"preset-rtsp-restream": "RTSP - Restream from go2rtc",
"preset-rtsp-restream-low-latency": "RTSP - Restream from go2rtc (Low Latency)",
"preset-rtsp-udp": "RTSP - UDP",
"preset-rtsp-blue-iris": "RTSP - Blue Iris",
"preset-record-generic": "Record (Generic, no audio)",
"preset-record-generic-audio-copy": "Record (Generic + Copy Audio)",
"preset-record-generic-audio-aac": "Record (Generic + Audio to AAC)",
"preset-record-mjpeg": "Record - MJPEG Cameras",
"preset-record-jpeg": "Record - JPEG Cameras",
"preset-record-ubiquiti": "Record - Ubiquiti Cameras"
"preset-rkmpp": "Rockchip RKMPP"
}
},
"cameraInputs": {

View File

@ -4,13 +4,12 @@ const timestampStyle: SectionConfigOverrides = {
base: {
sectionDocs: "/configuration/reference",
restartRequired: [],
fieldOrder: ["position", "format", "thickness", "color"],
fieldOrder: ["position", "format", "color", "thickness"],
hiddenFields: ["effect", "enabled_in_config"],
advancedFields: [],
uiSchema: {
position: {
"ui:size": "xs",
"ui:options": { enumI18nPrefix: "timestampPosition" },
},
format: {
"ui:size": "xs",
@ -18,7 +17,7 @@ const timestampStyle: SectionConfigOverrides = {
},
},
global: {
restartRequired: [],
restartRequired: ["position", "format", "color", "thickness", "effect"],
},
camera: {
restartRequired: [],

View File

@ -1,6 +1,5 @@
// Select Widget - maps to shadcn/ui Select
import type { WidgetProps } from "@rjsf/utils";
import { useTranslation } from "react-i18next";
import {
Select,
SelectContent,
@ -22,18 +21,9 @@ export function SelectWidget(props: WidgetProps) {
schema,
} = props;
const { t } = useTranslation(["views/settings"]);
const { enumOptions = [] } = options;
const enumI18nPrefix = options["enumI18nPrefix"] as string | undefined;
const fieldClassName = getSizedFieldClassName(options, "sm");
const getLabel = (option: { value: unknown; label: string }) => {
if (enumI18nPrefix) {
return t(`${enumI18nPrefix}.${option.value}`);
}
return option.label;
};
return (
<Select
value={value?.toString() ?? ""}
@ -52,7 +42,7 @@ export function SelectWidget(props: WidgetProps) {
<SelectContent>
{enumOptions.map((option: { value: unknown; label: string }) => (
<SelectItem key={String(option.value)} value={String(option.value)}>
{getLabel(option)}
{option.label}
</SelectItem>
))}
</SelectContent>