Commit Graph

4445 Commits

Author SHA1 Message Date
Nicolas Mowen
4080220aa6 0.17 tweaks (#18892)
* Set version

* Cleanup more logs

* Don't log matplotlib
2025-08-16 09:06:48 -06:00
Josh Hawkins
d414452333 Add ONVIF focus support (#18883)
* backend

* frontend and i18n
2025-08-16 09:06:30 -06:00
Nicolas Mowen
2b6033ed80 Improve logging (#18867)
* Ignore numpy get limits warning

* Add function wrapper to redirect stdout and stderr to logpipe

* Save stderr too

* Add more to catch

* run logpipe

* Use other logging redirect class

* Use other logging redirect class

* add decorator for redirecting c/c++ level output to logger

* fix typing

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-08-16 09:06:30 -06:00
Josh Hawkins
326fac2e9d Don't try to close or join mp manager queues (#18866)
Multiprocessing Manager queues don't have a close() or join_thread() method, and the Manager will clean it up appropriately after we empty it. This prevents an infinite loop when an AttributeError exception fires for Manager AutoProxy queue objects.
2025-08-16 09:06:30 -06:00
Nicolas Mowen
671bd0e7d1 Handle SIGINT with forkserver (#18860)
* Pass stopevent from main start

* Share stop event across processes

* preload modules

* remove explicit os._exit call

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-08-16 09:06:30 -06:00
Nicolas Mowen
2467b512b9 Fix process name 2025-08-16 09:06:30 -06:00
Nicolas Mowen
2ae2c5c56a Classification model cover images (#18843)
* Move to separate component

* Add cover images for clssification models
2025-08-16 09:06:30 -06:00
Josh Hawkins
fa9c35a871 Catch invalid character index in lpr CTC decoder (#18825) 2025-08-16 09:06:30 -06:00
Josh Hawkins
e20c1499b9 Fix birdseye crash when dynamically adding a camera (#18821) 2025-08-16 09:06:30 -06:00
Nicolas Mowen
109308850f Catch unpickling error 2025-08-16 09:06:30 -06:00
Nicolas Mowen
cb464162ca Don't fail on unicode debug for config updates 2025-08-16 09:06:30 -06:00
Nicolas Mowen
e7682e83e8 Don't use staticmethod 2025-08-16 09:06:30 -06:00
Nicolas Mowen
6f27d1c2fb Reduce tf initialization 2025-08-16 09:06:30 -06:00
Nicolas Mowen
582563eedb Fix go2rtc init (#18708)
* Cleanup process handling

* Adjust process name
2025-08-16 09:06:30 -06:00
Josh Hawkins
6eb35a6fcd Ensure logging config is propagated to forked processes (#18704)
* Move log level initialization to log

* Use logger config

* Formatting

* Fix config order

* Set process names

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2025-08-16 09:06:30 -06:00
Josh Hawkins
a8fdacfe04 Add basic camera settings to UI for testing (#18690)
* add basic camera add/edit pane to the UI for testing

* only init model runner if transcription is enabled globally

* fix role checkboxes
2025-08-16 09:06:30 -06:00
Nicolas Mowen
007289e526 Use Fork-Server As Spawn Method (#18682)
* Set runtime

* Use count correctly

* Don't assume camera sizes

* Use separate zmq proxy for object detection

* Correct order

* Use forkserver

* Only store PID instead of entire process reference

* Cleanup

* Catch correct errors

* Fix typing

* Remove before_run from process util

The before_run never actually ran because:

You're right to suspect an issue with before_run not being called and a potential deadlock. The way you've implemented the run_wrapper using __getattribute__ for the run method of BaseProcess is a common pitfall in Python's multiprocessing, especially when combined with how multiprocessing.Process works internally.

Here's a breakdown of why before_run isn't being called and why you might be experiencing a deadlock:

The Problem: __getattribute__ and Process Serialization
When you create a multiprocessing.Process object and call start(), the multiprocessing module needs to serialize the process object (or at least enough of it to re-create the process in the new interpreter). It then pickles this serialized object and sends it to the newly spawned process.

The issue with your __getattribute__ implementation for run is that:

run is retrieved during serialization: When multiprocessing tries to pickle your Process object to send to the new process, it will likely access the run attribute. This triggers your __getattribute__ wrapper, which then tries to bind run_wrapper to self.
run_wrapper is bound to the parent process's self: The run_wrapper closure, when created in the parent process, captures the self (the Process instance) from the parent's memory space.
Deserialization creates a new object: In the child process, a new Process object is created by deserializing the pickled data. However, the run_wrapper method that was pickled still holds a reference to the self from the parent process. This is a subtle but critical distinction.
The child's run is not your wrapped run: When the child process starts, it internally calls its own run method. Because of the serialization and deserialization process, the run method that's ultimately executed in the child process is the original multiprocessing.Process.run or the Process.run if you had directly overridden it. Your __getattribute__ magic, which wraps run, isn't correctly applied to the Process object within the child's context.

* Cleanup

* Logging bugfix (#18465)

* use mp Manager to handle logging queues

A Python bug (https://github.com/python/cpython/issues/91555) was preventing logs from the embeddings maintainer process from printing. The bug is fixed in Python 3.14, but a viable workaround is to use the multiprocessing Manager, which better manages mp queues and causes the logging to work correctly.

* consolidate

* fix typing

* Fix typing

* Use global log queue

* Move to using process for logging

* Convert camera tracking to process

* Add more processes

* Finalize process

* Cleanup

* Cleanup typing

* Formatting

* Remove daemon

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-08-16 09:06:30 -06:00
Nicolas Mowen
5ac9a32cc2 Dynamic Management of Cameras (#18671)
* Add base class for global config updates

* Add or remove camera states

* Move camera process management to separate thread

* Move camera management fully to separate class

* Cleanup

* Stop camera processes when stop command is sent

* Start processes dynamically when needed

* Adjust

* Leave extra room in tracked object queue for two cameras

* Dynamically set extra config pieces

* Add some TODOs

* Fix type check

* Simplify config updates

* Improve typing

* Correctly handle indexed entries

* Cleanup

* Create out SHM

* Use ZMQ for signaling object detectoin is completed

* Get camera correctly created

* Cleanup for updating the cameras config

* Cleanup

* Don't enable audio if no cameras have audio transcription

* Use exact string so similar camera names don't interfere

* Add ability to update config via json body to config/set endpoint

Additionally, update the config in a single rather than multiple calls for each updated key

* fix autotracking calibration to support new config updater function

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-08-16 09:06:30 -06:00
Nicolas Mowen
b35e89928a Refactor TensorRT (#18643)
* Combine base and arm trt detectors

* Remove unused deps for amd64 build

* Add missing packages and cleanup ldconfig

* Expand packages for tensorflow model training

* Cleanup

* Refactor training to not reserve memory
2025-08-16 09:06:30 -06:00
Josh Hawkins
f41495df86 Make Birdseye clickable (#18628)
* keep track of layout changes and publish on change

* websocket hook

* clickable overlay div to navigate to full camera view
2025-08-16 09:06:30 -06:00
FL42
2b38f37c5b fix: Initialize GenAI client if GenAI is enabled globally (#18623) 2025-08-16 09:06:30 -06:00
FL42
ec181a05ac feat: enable using GenAI for cameras with GenAI disabled from the API (#18616) 2025-08-16 09:06:30 -06:00
Jimmy
1d69bd9a6a Add Mesa Teflon as a TFLite detector (#18310)
* Refactor common functions for tflite detector implementations

* Add detector using mesa teflon delegate

Non-EdgeTPU TFLite can use the standard .tflite format

* Add mesa-teflon-delegate from bookworm-backports to arm64 images
2025-08-16 09:06:30 -06:00
Nicolas Mowen
76945e6c22 Classification Model Metrics (#18595)
* Add speed and rate metrics for custom classification models

* Use metrics for classification models

* Use keys

* Cast to list
2025-08-16 09:06:30 -06:00
Nicolas Mowen
37ce7e7b68 Live classification model training (#18583)
* Implement model training via ZMQ and add model states to represent training

* Get model updates working

* Improve toasts and model state

* Clean up logging

* Add back in
2025-08-16 09:06:30 -06:00
Nicolas Mowen
0c66412f73 Classification Model UI (#18571)
* Setup basic training structure

* Build out route

* Handle model configs

* Add image fetch APIs

* Implement model training screen with dataset selection

* Implement viewing of training images

* Adjust directories

* Implement viewing of images

* Add support for deleting images

* Implement full deletion

* Implement classification model training

* Improve naming

* More renaming

* Improve layout

* Reduce logging

* Cleanup
2025-08-16 09:06:30 -06:00
Josh Hawkins
77f53a5703 Audio transcription tweaks (#18540)
* use model runner

* unload whisper model when live transcription is complete
2025-08-16 09:06:30 -06:00
Josh Hawkins
9991c8d458 Upgrade PaddleOCR models to v4 (rec) and v5 (det) (#18505)
The PP_OCRv5 text detection models have greatly improved over v3. The v5 recognition model makes improvements to challenging handwriting and uncommon characters, which are not necessary for LPR, so using v4 seemed like a better choice to continue to keep inference time as low as possible. Also included is the full dictionary for Chinese character support.
2025-08-16 09:06:30 -06:00
Nicolas Mowen
540674cad1 Tiered recordings (#18492)
* Implement tiered recording

* Add migration for record config

* Update docs

* Update reference docs

* Fix preview query

* Fix incorrect accesses

* Fix

* Fix

* Fix

* Fix
2025-08-16 09:06:30 -06:00
Nicolas Mowen
964aa30617 Intel updates (#18493)
* Update openvino and onnxruntime

* Install icd and level-zero-gpu deps from intel directly

* Install

* Add dep

* Fix package install
2025-08-16 09:06:30 -06:00
Nicolas Mowen
21fe859fc6 Implement API to train classification models (#18475) 2025-08-16 09:06:30 -06:00
Josh Hawkins
8ad5c0a0a4 Audio transcription support (#18398)
* install new packages for transcription support

* add config options

* audio maintainer modifications to support transcription

* pass main config to audio process

* embeddings support

* api and transcription post processor

* embeddings maintainer support for post processor

* live audio transcription with sherpa and faster-whisper

* update dispatcher with live transcription topic

* frontend websocket

* frontend live transcription

* frontend changes for speech events

* i18n changes

* docs

* mqtt docs

* fix linter

* use float16 and small model on gpu for real-time

* fix return value and use requestor to embed description instead of passing embeddings

* run real-time transcription in its own thread

* tweaks

* publish live transcriptions on their own topic instead of tracked_object_update

* config validator and docs

* clarify docs
2025-08-16 09:06:30 -06:00
Nicolas Mowen
45bd1a92f3 Fix incorrectly running lpr (#18390) 2025-08-16 09:06:30 -06:00
Nicolas Mowen
e230deedfa Add basic config editor when Frigate can't startup (#18383)
* Start Frigate in safe mode when config does not validate

* Add safe mode page that is just the config editor

* Adjust Frigate config editor when in safe mode

* Cleanup

* Improve log message
2025-08-16 09:06:30 -06:00
Nicolas Mowen
1ce36ba478 Add ability to configure when custom classification models run (#18380)
* Add config to control when classification models are run

* Cleanup
2025-08-16 09:06:30 -06:00
Nicolas Mowen
a61274e407 Update ROCm to 6.4.1 (#18364)
* Update rocm to 6.4.1

* Quick fix
2025-08-16 09:06:30 -06:00
Josh Hawkins
902a3d42b5 Implement support for no recordings indicator on timeline (#18363)
* Indicate no recordings on the history timeline with gray hash marks

This commit includes a new backend API endpoint and the frontend changes needed to support this functionality

* don't show slashes for now
2025-08-16 09:06:30 -06:00
Nicolas Mowen
492ef4eb10 Initial custom classification model config support (#18362)
* Add basic config for defining a teachable machine model

* Add model type

* Add basic config for teachable machine models

* Adjust config for state and object

* Use config to process

* Correctly check for objects

* Remove debug

* Rename to not be teachable machine specific

* Cleanup
2025-08-16 09:06:30 -06:00
Nicolas Mowen
f709042481 Dynamically update masks and zones for cameras (#18359)
* Include config publisher in api

* Call update topic for passed topics

* Update zones dynamically

* Update zones internally

* Support zone and mask reset

* Handle updating objects config

* Don't put status for needing to restart Frigate

* Cleanup http tests

* Fix tests
2025-08-16 09:06:30 -06:00
Nicolas Mowen
b2ef4dc3d2 Dynamic Config Updates (#18353)
* Create classes to handle publishing and subscribing config updates

* Cleanup

* Use config updater

* Update handling for enabled config

* Cleanup

* Recording config updates

* Birdseye config updates

* Handle notifications

* handle review

* Update motion
2025-08-16 09:06:30 -06:00
Nicolas Mowen
572ae78d31 Update ROCm to 6.4.0 (#18264)
* Update to rocm 6.4.0

* Update URL

* Remove old env var
2025-08-16 09:06:30 -06:00
Nicolas Mowen
06539c925c
Pull sqlite3 from mirror (#19540)
* Pull sqlite3 from mirror

* Remove extra wget

* Adjust folder name

* Use pre-built sqlite

* Include unzip
2025-08-16 09:30:24 -05:00
Josh Hawkins
addb4e6891
Fix percentage in recording cleanup log (#19525)
* Fix percentage in recording cleanup log

* fix

* update reference config
2025-08-16 07:10:08 -06:00
Nicolas Mowen
fb290c411b
HLS Playback Startup Time Optimization (#19503)
* Include preferred startTime in source so that the playlist does not need to seek

* Compatibility

* Cleanup

* Adjust based on inpoint

* Don't set start position if it is not valid

* Handle firefox buggy behavior
2025-08-16 07:09:15 -06:00
Josh Hawkins
89db960c05
Remove score sorting constraint (#19501)
Do not require a score filter to be applied in order to sort by object score.
2025-08-16 07:08:11 -06:00
Josh Hawkins
2cde58037d
Improve recognized license plate filter (#19491)
* Fetch all license plates outside of filter component

If the swr call took a long time, the entire select component may not display. This change moves the fetch to the parent component (like sub labels).

* add loading indicator

* improve query
2025-08-16 07:05:50 -06:00
Josh Hawkins
d1be614a10
Bump makefile version (#19539) 2025-08-16 07:05:15 -06:00
Josh Hawkins
93c7c8c518
Bump version in docs (#19538) 2025-08-16 07:47:42 -05:00
Blake Blackshear
c83a35d090
Merge pull request #16390 from blakeblackshear/dev
0.16 Release
2025-08-16 07:34:45 -05:00
Blake Blackshear
d31a4e3443 Merge remote-tracking branch 'origin/master' into dev 2025-08-16 07:32:44 -05:00