when the user doesn't define a top-level `model:` block, `FrigateConfig.model` stayed at pydantic field defaults (320×320, /labelmap.txt) while the per-detector model picked up `DEFAULT_MODEL` for openvino on cpu (300×300, coco_91cl_bkgr.txt introduced in #23127), causing `RemoteObjectDetector` to fail with "buffer is too small for requested array" because the SHM was sized from the per-detector model but mapped using the top-level one. After the detector loop, copy the first detector's resolved model up to `self.model` so both sides agree on dimensions and labelmap
* sync filter entries with track and listen labels
- Auto-populate `audio.filters` from `audio.listen` instead of the full audio labelmap, matching how `objects.filters` is keyed by `track` (no longer need to populate the full audio labelmap, which was added in #22630)
- Synthesize the matching filter entries in the settings form on load so each track/listen label shows its collapsible after a profile is selected, since the backend's auto-populate only runs at config init
* translate main label for lifecycle description with attribute
* reject restricted go2rtc stream sources when added via api
* add env var check function
* Support token streaming stats
* Propogate streaming token stats to chat calls
* Show token stats for each image
* Add settings to handle token stats and other options
* i18n
* Use select
* Improve mobile layout and spacing
On multi-GPU systems, OpenVINO enumerates devices as "GPU.0", "GPU.1",
etc. rather than a single "GPU". The exact string match in
is_openvino_gpu_npu_available() fails to recognize these suffixed device
names, causing enrichments (face recognition, semantic search) to
silently fall back to CPU-only inference via ONNXModelRunner instead of
using OpenVINOModelRunner on GPU.
Switch from exact match to prefix match so both single-GPU ("GPU") and
multi-GPU ("GPU.0", "GPU.1") device names are correctly detected, along
with any future suffixed variants for NPU and other accelerators.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* improve scroll handling for non-modal DropdownMenu in classification and face selection dialogs
* clean up
* fix incorrect key capitalization
* fix profile array overrides not replacing base arrays
don't use lodash merge(), it does positional merging and an empty source array doesn't override the destination, and shorter arrays leak destination elements through.
backend is unaffected, so the saved config and actual backend functionality was right
* only show audio debug tab when audio is enabled in config
* move apple_compatibility out of advanced
* remove retry_interval from UI
99% of users should never be changing this
* hide switch in optionalfieldwidget if editing a profile
* add override badges for cameras and profiles
collect shared functions into the config util and separate hooks
* Use new models endpoint info to determine modalities
* clarify language
* fix linter
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* restrict viewer access to logs, labels, and go2rtc stream list
* filter stats data for non admins
* track creator on vlm watch jobs and scope view/cancel to admin or creator
* add shortcut for admins in /stats
I have a very repeatable reproduction of an issue where most of my
cameras show a "No frames have been received, check error logs" image in
the UI, but restreaming in HomeAssistant is working flawlessly. The only
errors in the logs I saw were some like this:
`OSError: [Errno 121] Remote I/O error`.
Doing a bit more debugging, it looked like Frigate was failing to create
the thumbnail directory for a camera because it already existed. This
error was a clue as to the class of error. I was surprised to learn that
`os.path.exists` [silently suppresses errors from
os.stat and returns False](https://github.com/python/cpython/blob/main/Lib/genericpath.py#L22).
This makes for a plausible series of events: a transient stat call
fails, so Frigate takes the creation path, which gets upset that the
directory already exists.
I found a few other possible cases to fix but did not make an exhaustive
search. It seems that this `exist_ok` flag is used elsewhere within
Frigate so I thought it would be a good solution.
AI disclosure: I used AI to diagnose my issue and asked it to translate
its init-time patches to the container source into this repo. I verified
that its patches solved the problem I was facing. Its theory fits the
facts - I am using a distributed file system and I saw the error in my
logs. I checked the upstream Python code to verify the error suppression
behavior, and read the corresponding Frigate code. I did not use AI to
author this commit message/PR description; all diction and typos here are my own.
* add optional onClick to EmptyCard
* show EmptyCard in face rec when face library is empty
* add loading indicator
* add description to camera management pane
* Cleanup when use snapshot but can't load snapshot
* Migrate files
* fix birdseye color distortion when configured aspect ratio is unsupported
* Skip processing end for object descriptions
* don't crash if stats is null
* fix genai roles in migration
* frigate+ pane updates
- allow users to select a plus model from the select even when one was not previously loaded
- always show model summary card
- add model filter popover
- add restart button totast
* fix frigate+ pane layout and buttons to match other settings panes
* match button layout in go2rtc settings view
* make audio maintainer respond to dynamic config updates
* check correct zone name in publish state
* fix nested translation extraction for Optional dict and list fields
* mypy
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
get_relative_coordinates() previously logged
"Not applying mask due to invalid coordinates. X,Y is outside ..."
without naming the camera, so on a multi-camera setup the user had
to guess which one to fix.
Add an optional camera_name kwarg with default "" (no behavior
change for existing callers). The global object-mask path in
FrigateConfig.validate_config passes camera_name=camera_config.name
since it already has it in scope, so legacy configs with absolute
pixel coordinates now get an actionable log line:
Not applying mask due to invalid coordinates for camera back.
9000,9000 is outside of the detection resolution 800x400.
Use the editor in the UI to correct the mask.
Existing wording is preserved verbatim except for the inserted
" for camera <name>" segment. Runtime behavior is unchanged.
Co-authored-by: Claude <noreply@anthropic.com>
* Change order
* Improve title
* add loading spinner to exports
* Simplify JSON since not all providers see or use this the same
* Add fields to primary prompt
* Adjust centering for no overrides
* Use GenAI title for exports when available
* detect form-root objects by field path instead of schema identity
* add bosnian
* Strip v1 if included in url
* prevent fast clicks in video controls from selecting text
* Use title for metadata chapters
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
The literal string ``"Removed {count} empty directories"`` was passed
to ``logger.debug`` without an ``f`` prefix, so the ``{count}``
placeholder is emitted verbatim instead of being substituted. Convert
the call to an f-string so the count is logged.
* respect section hiddenFields when detecting config overrides
* change audio events to audio detection to match docs
* add field messages for object and review genai
* add more config messages
* more messages
* add guard to prevent race when adding camera dynamically
* fix duplicate websocket messages from zombie connection under react strict mode
detach ws event handlers before close() in WsProvider cleanup so a CONNECTING socket's deferred onclose can't schedule a reconnect after the next mount resets the unmounted guard, which was spawning a second live ws and duplicating every message
* fix double event publishes for stationary objects with attributes
* hide camera overrides badge from system sections
* show empty card on camera metrics page when no cameras are defined
* fix enabled camera state switch after adding via wizard
Cameras added mid-session have no WS state until the dispatcher publishes camera_activity (which only happens on a fresh onConnect). Fall back to the config's enabled value so the switch reflects reality immediately after the wizard closes.
* guard camera enabled access
console would throw errors after adding via camera wizard
* fix useOptimisticState dropping debounced setState under StrictMode
* use openvino on cpu as default model
- faster than tflite on cpu
- add to default generated config
* use an enum for model_size
the frontend will then render this as a select dropdown because of the changes in the json schema
* i18n
* sync object filter entries with tracked labels in camera config form
Filter sub-collapsibles in the camera Objects section are driven by `filters` dict keys, but profile merges and live track-switch edits don't add matching entries, so newly tracked labels (like from a profile override) had no collapsible. Synthesize default filter entries from `track` in the form data so every tracked label renders a collapsible; baseline data also gets the synthesized entries, so save payloads are unchanged.
* revalidate raw paths cache after config save so CameraPathWidget shows fresh credentials
* fix test
* restore masked ffmpeg credentials when persisting camera config
* formatting
* rebuild ffmpeg commands when enabling recording for the first time
Toggling record.enabled from the config UI updated the in-memory config but left ffmpeg running with its original command, so the record output args were never wired in and nothing landed in the cache for the maintainer to move. The record config update now rebuilds ffmpeg_cmds when enabled_in_config transitions, and the camera watchdog restarts ffmpeg on a false to true transition so the record output gets wired in. MQTT toggles, which only flip record.enabled at runtime, are unaffected and continue to work via the maintainer's drop/keep gate.
* keep record toggle switch in single camera view disabled until enabled in config
* fix override detection for sections unset in the global config
Override badges and the blue dot now compare against schema defaults for sections like motion that the API serializes as null when omitted from the global YAML, instead of treating any populated camera config as an override
* add support for config-aware patterns in section hiddenFields
Section configs can now declare dynamic hidden-field entries as functions of the loaded config; objects.ts uses this to hide auto-populated attribute filters (DHL, face, license_plate, etc.) from the form, save flow, and override popover when those labels aren't user-settable
* siimplify object filters handling
live updating was getting very messy. users will just need to save once they enable a new object in order to see filters for that object
* tweaks
* update docs for new detector default
* make genai provider required and add special case for UI
prevent validation errors from appearing on initial creation of genai provider by setting the first option in the select dropdown as default
* use continuous expire date when loading reviews for recording cleanup
* reset heatmap filter when motion preview camera changes
* Add note about speed zones unit when enabled
* don't display fps warning for dedicated LPR cameras
* language tweaks
* allow changing camera type from management UI
* i18n
* fix ollama tool calling failure when conversation contains multimodal content from live frame tool results
* fix mypy
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* fix(face_recognition): feed BGR (not RGB) to FaceDetectorYN in manual detection branch
Frigate's `requires_face_detection` branch in `FaceRealTimeProcessor.process_frame`
converts the YUV camera frame to RGB and passes it to `cv2.FaceDetectorYN`.
YuNet is trained on BGR — feeding it RGB silently degrades detection
confidence by ~10× on typical person crops, causing face_recognition to
emit no `sub_label` and produce no `train/` entries. There is no log signal
because the detector simply returns 0 faces; from outside the box it looks
like nobody is walking past any camera.
The same file already does the YUV→BGR conversion correctly in the
else-branch (was line 271, now line 285) — only the manual-detection
branch was missed.
## Reproduction
Verified in-pod against the running Frigate's models on identical
person crops (snapshot pulled from a real person event):
BGR (correct): cv2.FaceDetectorYN ← confidence 0.744 ✓
RGB (current): cv2.FaceDetectorYN ← confidence 0.047 ✗
The `score_threshold=0.5` set on `FaceDetectorYN.create()` filters anything
under 0.5 at the detector layer, so the RGB-degraded crops never reach
the user-configurable `detection_threshold`. Result: silent outage.
## Fix
Three changes in `frigate/data_processing/real_time/face.py`:
1. `cv2.COLOR_YUV2RGB_I420` → `cv2.COLOR_YUV2BGR_I420`
2. Variable rename `rgb` → `bgr` to match
3. Remove the now-redundant `cv2.cvtColor(face_frame, cv2.COLOR_RGB2BGR)`
block — `face_frame` is already BGR after the upstream conversion change
Net diff: +6 / -7. Pure Python, no new dependencies.
## How a deployment confirms the fix
After this change, walking past a camera produces:
- `data.attributes` with a `face` entry on the person event (currently empty)
- New entries in `/api/faces` `train/` array (currently frozen)
- `sub_label` populated on subsequent person events for trained faces
Signed-off-by: Vinnie Esposito <vespo21@gmail.com>
* Cleanup comment
---------
Signed-off-by: Vinnie Esposito <vespo21@gmail.com>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Update to ROCm 7.2.3
* Add inference time for 9060XT
* Update times
* Update hardware info for latest ROCm
* Add env vars to save kernels and miopen database
* re-enable face recognition for ROCm
* Update
* Save LLVM cache
* Rewrite intel GPU stats to use file descriptors instead of intel_gpu_top, leading to significantly better API for interaction and more accurate results
* Update tests
* Update docs
* Adjust approach
* Update strings
* use ReplayState enum
* extract shared ffmpeg progress helper
* make start call non-blocking with worker thread
* expose replay state on status endpoint and return 202 from start
* cancel in-flight ffmpeg when stop is called during preparation
* add replay i18n strings for preparing and error states
* show status in replay UI
* navigate immediately on 202 from debug replay menus and dialog
* remove unused
* simplify to use Job infrastructure
* tests
* cleanup and tweaks
* fetch schema
* update api spec
* formatting
* fix e2e test
* mypy
* clean up
* formatting
* fix
* fix test
* don't try to show camera image until status reports ready
* simplify loading logic
* fix race in latest_frame on debug replay shutdown
* remove toast when successfully stopping
it gets hidden almost immediately
- Add _auth_headers() helper to pass Bearer token when api_key is set
- Wire headers into all Ollama client instantiations (sync + async)
- Update docs with Ollama Cloud direct connection example and yaml config
* lpr fixes
- remove duplicate code
- fix min_area check for non frigate+ code path
- move log outside of non frigate+ code path
* only show chat link when a genai provider is configured with the chat role
* respect ui.timezone when generating fallback export names
* reapply radix pointer events fix to call sites that use navigate()
* formatting
* fall back to prior preview frame for short export thumbnails
* fix typing
* fix e2e test for chat navigation
* batch annotation offset to seek atomically and throttle slider drag
* add debug replay loading toast for explore actions
* Improve handling of webpush missing shortSummary
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* openvino log message and preview directory checks
* restrict config vars for viewer users
* recording timestamp fix
when startTime is exactly on an hour boundary, findIndex returns the first matching chunk, which is the previous hour's chunk (where before == startTime), instead of the correct chunk (where after == startTime)
the bug shows up when using the share timestamp feature and sharing a specific timestamp on the exact hour mark. when accessing the shared link, the timeline would jump to the incorrect hour
* use helper for chunked time range
* Adjustments to contributing docs
* tweak
* Improve wording
* tweak
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
The idle heartbeat check in BirdsEyeOutputProcess.update() compares
time.monotonic() (seconds since an arbitrary point, typically boot)
against last_output_time which is set from datetime.datetime.now().timestamp()
(Unix epoch seconds).
These are completely different time bases. The subtraction produces a
large negative number, so the idle heartbeat condition can never be
satisfied. This means birdseye stops sending frames when all cameras
go idle, instead of continuing at the configured idle_heartbeat_fps.
Use datetime.datetime.now().timestamp() consistently for both the
heartbeat check and the output time tracking.
* Move openai specific workaround so it doesn't apply to other providers
* Fix gemini tool calling
* Improve efficiency of frame listing for previews
* debug replay fixes
- initial selection without changing the radio button in the dialog would select 1 hour (rather than 1 minute)
- use CLIPS_DIR instead of CACHE_DIR so that longer replay clips don't cause tmpfs cache overflows
* don't re-render the tracking details overlay on every video time tick
* change pinned to planned
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* ensure embeddings process restarts after maintainer thread crash
* add docs link to media sync settings
* fix color
Co-authored-by: Copilot <copilot@github.com>
* match link color with other sections
* ensure recording staleness threshold scales with segment_time
* docs tweak
* Fix llama.cpp media marker
* Fix gemini tools call
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* add ui to camera config update topics enum
* add mqtt to camera config update enum
* ensure cleanup runs when an event end skips post-processing
* end any in-progress audio events when audio detection is disabled
we already end in-progress audio events when we disable a camera, but this mirrors that logic for specifically disabling audio detection
* Improve GenAI metadata
* fix invalid recording segment topic being misrouted to the valid handler
* Add confidence default to avoid unnecessary field causing issues
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Reduce max frames per second to 1
* Use pydantic but don't fail if some constraints are not met.
* Adjust limits
* Adjust limits
* Cleanup
* add unsaved changes icon/popover to individual settings section
* allow changing camera friendly_name from camera management pane
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Test for image token usage in llama.cpp so we can more appropriately decide how many frames to include
* Limit based on frames per second
* handle zone case sensitivity
* Improve formatting
* Add observations field so model can build CoT before outputting used fields
* ensure classification wizard dialog is scrollable on mobile too
* add chat and features group to mobile menu
Co-authored-by: Copilot <copilot@github.com>
* Set min length for summary too
* Don't use orange for review item
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* only send monitoring notifications to users with camera access
* check access to similarity search event id camera
* require admin role for storage usage endpoint
* check camera access for jsmpeg and birdseye cameras
* tests
* formatting
* use ffmpeg to probe rtsp urls instead of cv2
cv2 is faster (no subprocess launch) and will continue to be used for recording segments
* tweak faq
* change unsaved color to orange
avoids confusion with validation errors (red)
* don't use any variant of orange as a profile color
avoids confusion with unsaved changes
* more unsaved color tweaks
* add log when probing detect stream on startup
when users don't explicitly set detect.width and detect.height, we probe for them. sometimes the probe hangs (camera doesn't support UDP, like some Reolinks), so this log message will make that clearer
* add faq about probing detect stream
* fix stuck activity ring when tracked object transitions to stationary
* drop cache segments past retain cutoff regardless of retention mode
* add maintainer test