Commit Graph

1321 Commits

Author SHA1 Message Date
Blake Blackshear
652fdc6a38 Merge remote-tracking branch 'origin/master' into dev 2025-09-24 06:57:50 -05:00
Josh Hawkins
7f7eefef7f Live view improvements (#20177) 2025-09-22 21:21:51 -05:00
Josh Hawkins
bdb7a18602 UI tweaks (#20168)
* use mobilepage with create trigger dialog

* use mobilepage with create user dialog

* use mobilepage with create role dialog
2025-09-22 08:36:36 -06:00
arthur simas
c74e86dff2 fix(web): handle undefined screen.orientation (#20064) 2025-09-14 06:51:39 -06:00
Josh Hawkins
ed1e3a7c9a Enhance user roles to limit camera access (#20024)
* update config for roles and add validator

* ensure admin and viewer are never overridden

* add class method to user to retrieve all allowed cameras

* enforce config roles in auth api endpoints

* add camera access api dependency functions

* protect review endpoints

* protect preview endpoints

* rename param name for better fastapi injection matching

* remove unneeded

* protect export endpoints

* protect event endpoints

* protect media endpoints

* update auth hook for allowed cameras

* update default app view

* ensure anonymous user always returns all cameras

* limit cameras in explore

* cameras is already a list

* limit cameras in review/history

* limit cameras in live view

* limit cameras in camera groups

* only show face library and classification in sidebar for admin

* remove check in delete reviews

since admin role is required, no need to check camera access. fixes failing test

* pass request with camera access for tests

* more async

* camera access tests

* fix proxy auth tests

* allowed cameras for review tests

* combine event tests and refactor for camera access

* fix post validation for roles

* don't limit roles in create user dialog

* fix triggers endpoints

no need to run require camera access dep since the required role is admin

* fix type

* create and edit role dialogs

* delete role dialog

* fix role change dialog

* update settings view for roles

* i18n changes

* minor spacing tweaks

* docs

* use badges and camera name label component

* clarify docs

* display all cameras badge for admin and viewer

* i18n fix

* use validator to prevent reserved and empty roles from being assigned

* split users and roles into separate tabs in settings

* tweak docs

* clarify docs

* change icon

* don't memoize roles

always recalculate on component render
2025-09-12 05:19:29 -06:00
Nicolas Mowen
037c4d1cc0 Don't block UI while pulling the stream live info (#19998) 2025-09-09 17:53:26 -05:00
Josh Hawkins
751de141d5 Fix model selection type in Frigate+ settings pane (#19952)
* model type does not need to match config model type

As long as a model is supported by a detector, it should be available in the list

* fix missing semicolon

the web linter was complaining
2025-09-07 19:19:40 -06:00
Josh Hawkins
b781f06f9c Constrain width of export preview dialog (#19908)
Matches the other export preview dialog in Review
2025-09-04 08:08:07 -05:00
Blake Blackshear
a8b7e5dd24 Merge remote-tracking branch 'origin/master' into dev 2025-09-04 06:33:22 -05:00
Josh Hawkins
198e53bd42 Fix stream stats display (#19874)
* Fix stats calculations and labels

* fix linter from complaining

* fix mse calc

* label
2025-09-01 19:23:44 -05:00
Nicolas Mowen
3a1e1d0841 Improve review segmentation behavior (#19850)
* Refactor active objects to class

* Keep segment going when detection is newer than end of alert

* Cleanup logic

* Fix

* Cleanup ending

* Adjust timing

* Improve detection saving

* Don't have padding at end for in progress reviews

* Add review config for cutoff times
2025-08-31 16:36:12 -05:00
Josh Hawkins
c7231648eb Add an icon and tooltip to explain detector CPU usage metric (#19825) 2025-08-28 17:15:00 -05:00
Josh Hawkins
92555eb835 Add low shm warning to bottom bar (#19824)
* Add low shm warning to bottom bar

* change relevant link
2025-08-28 14:32:05 -05:00
Josh Hawkins
16b7f7f6e7 Fix HLS video initial aspect on Chrome (#19805)
Explore videos are very small on Chrome specifically, this has something to do with how the latest version of Chrome loads video metadata. This change provides a default aspect ratio instead of a default height when the container ref is not defined yet
2025-08-27 12:27:18 -06:00
Josh Hawkins
667c302a7d Allow scrolling on languages menu on mobile devices (#19797) 2025-08-27 05:44:10 -06:00
Josh Hawkins
398a3a7b95 Rename nickname to friendly_name (#19782)
Better aligns with convention from Home Assistant since many Frigate users are also HA users
2025-08-26 15:29:52 -05:00
GuoQing Liu
d3af748366 feat: Add camera nickname (#19567)
* refactor: Refactor camera nickname

* fix: fix cameraNameLabel visually

* chore: The Explore search function also displays the Camera's nickname in English

* chore: add mobile page camera nickname

* feat: webpush support camera nickname

* fix: fix storage camera name is null

* chore: fix review detail and context menu camera nickname

* chore: fix use-stats and notification setting camera nickname

* fix: fix stats camera if not nickname need capitalize

* fix: fix debug page open camera web ui i18n and camera nickname support

* fix: fix camera metrics not use nickname

* refactor: refactor use-camera-nickname hook.
2025-08-26 11:15:01 -06:00
Josh Hawkins
6c3f99150c Improve LPR regex support (#19767)
* add regex support to events api for recognized_license_plate

* frontend

add ability to use regexes in the plate search box and add select all/clear all links to quickly select all filtered plates
2025-08-26 08:11:37 -05:00
Josh Hawkins
0dda37ac43 fix export dialog overflowing due to i18n time lengths (#19736)
wrap the pair of custom time pickers in a flex-wrap
2025-08-25 17:11:42 -06:00
Josh Hawkins
c260642604 Improve audio detection debugging (#19753)
* create audio activity manager

move publishing logic out of audio detector

* dispatcher changes

* correctly publish full array of audio detections in onConnect

* frontend websocket hooks

* line graph

* debug tab and i18n

* docs

* clean up

* fix i18n key
2025-08-25 13:40:21 -05:00
Nicolas Mowen
4fcb1ea7ac Unload HLS on unmount (#19747)
* Unload HLS player on unmount so segments don't continue to load

* Add query arg for event padding
2025-08-25 13:33:17 -05:00
Josh Hawkins
95131541c5 Consolidate documentation i18n keys (#19714)
* Consolidate documentation i18n keys

* individual translations
2025-08-22 17:19:00 -05:00
Josh Hawkins
a88760efa1 Display warning in frontend if shm size is too low (#19712)
* backend

refactor shm calculation to utility function so it can be used in frontend stats

* frontend

* fix check

* clean up
2025-08-22 13:48:27 -06:00
Nicolas Mowen
9dd7ead462 Camera Health Status (#19709)
* Send status of camera streams to mqtt

* Update docs

* Formatting

* Fix frontend querying fps
2025-08-22 06:42:36 -06:00
Josh Hawkins
4fe246f472 Fixes (#19708)
* use custom swr fetcher to check for audio support

The go2rtc API doesn't always return stream data for anything not being actively consumed, so audio support was not always being correctly deduced. So we can use a custom swr fetcher to call the endpoint that probes the streams, which returns the correct producers data.

* return correct mime type for thumbnail and latest frame endpoints

follow up to https://github.com/blakeblackshear/frigate/pull/19555
2025-08-22 07:04:30 -05:00
Nicolas Mowen
f39475a383 Support face recognition via RKNN (#19687)
* Add support for face recognition via RKNN

* Fix crash when adding camera in via UI

* Update docs regarding support for face recognition

* Formatting
2025-08-21 06:18:55 -06:00
Nicolas Mowen
361014f01c UI improvements (#19659)
* Add indicator when GenAI review infers suspicious activity

* Fix score filtering logic

* Enable mobile view for classification and optimize for mobile layout

* Add missing keys

* Don't require face rec

* fix key
2025-08-20 08:28:47 -05:00
Jan Šuklje
8f4b5b4bdb Refactored Viewer role Notifications settings (#19640)
- now each individual element is shown if allowed by role, instead of having multiple return statement for each role
2025-08-19 18:29:11 -06:00
Josh Hawkins
95cea06dd3 Revert video dimension layout fix for chrome (#19636)
originally introduced in https://github.com/blakeblackshear/frigate/pull/19414
2025-08-19 14:42:20 -05:00
Nicolas Mowen
ec2543c23f Fix hls not loading video in explore (#19625) 2025-08-19 13:14:14 -05:00
Nicolas Mowen
dace88bfce Genai review summaries (#19473)
* Generate review item summaries with requests

* Adjust logic to only send important items

* Don't mention ladder

* Adjust prompt to be more specific

* Add more relaxed nature for normal activity

* Cleanup summary

* Update ollama client

* Add more directions to analyze the frames in order

* Remove environment from prompt
2025-08-16 10:20:33 -05:00
markfrancisonly
8e663413bb Added total camera fps, total processed fps, and total skipped fps to stats api (#19469)
Co-authored-by: Mark Francis <markfrancisonly@gmail.com>
2025-08-16 10:20:33 -05:00
Nicolas Mowen
cc18d7f786 Add config for users to define additional concerns that GenAI should make note of in review summary (#19463)
* Don't default to openai

* Improve UI

* Allow configuring additional concerns that users may want the AI to note

* Formatting

* Add preferred language config

* Remove unused
2025-08-16 10:20:33 -05:00
Nicolas Mowen
92417a1b9c Review genai updates (#19448)
* Include extra level for normal activity

* Add dynamic toggling

* Update docs

* Add different threshold for genai

* Adjust webUI for object and review description feature

* Adjust config

* Send on startup

* Cleanup config setting

* Set config

* Fix config name
2025-08-16 10:20:33 -05:00
Nicolas Mowen
2cf8dd693c Review Item GenAI metadata (#19442)
* Rename existing function

* Keep track of thumbnial updates

* Tinkering with genai prompt

* Adjust input format

* Create model for review description output

* testing prompt changes

* Prompt improvements and image saving

* Add config for review items genai

* Use genai review config

* Actual config usage

* Adjust debug image saving

* Fix

* Fix review creation

* Adjust prompt

* Prompt adjustment

* Run genai in thread

* Fix detections block

* Adjust prompt

* Prompt changes

* Save genai response to metadata model

* Handle metadata

* Send review update to dispatcher

* Save review metadata to DB

* Send review notification updates

* Quick fix

* Fix name

* Fix update type

* Correctly dump model

* Add card

* Add card

* Remove message

* Cleanup typing and UI

* Adjust prompt

* Formatting

* Add log

* Formatting

* Add inference speed and keep alive
2025-08-16 10:20:33 -05:00
Nicolas Mowen
1f3755e45d Migrate object genai configuration (#19437)
* Move genAI object to objects section

* Adjust config propogation behavior

* Refactor genai config usage

* Automatic migration

* Always start the embeddings process

* Always init embeddings

* Config fixes

* Adjust reference config

* Adjust docs

* Formatting

* Fix
2025-08-16 10:20:33 -05:00
Josh Hawkins
21ab164bfe Ensure alertVideos persistence is loaded before displaying thumb or preview (#19432)
The default value of true would cause previews to be loaded in the background even if the local storage value was false
2025-08-16 10:20:33 -05:00
Nicolas Mowen
1add72884a Cleanup 2025-08-16 10:20:33 -05:00
Nicolas Mowen
fa1b88097b Improve the tablet layout (#19320)
* Improve the tablet layout

* Update imports sort

* Fix more imports
2025-08-16 10:20:33 -05:00
Nicolas Mowen
55e5a55fa2 Classification train updates (#19173)
* Improve model train button

* Add filters for classification

* Cleanup

* Don't run classification on false positives

* Cleanup filter

* Fix icon color
2025-08-16 10:20:33 -05:00
Josh Hawkins
8719216fa6 Dynamically enable/disable GenAI (#19139)
* config

* dispatcher and mqtt

* docs

* use config updater

* add switch to frontend
2025-08-16 10:20:33 -05:00
Josh Hawkins
22478df4d6 Optionally show tracked object paths in debug view (#19025) 2025-08-16 10:20:33 -05:00
Josh Hawkins
3609b41217 Semantic Search Triggers (#18969)
* semantic trigger test

* database and model

* config

* embeddings maintainer and trigger post-processor

* api to create, edit, delete triggers

* frontend and i18n keys

* use thumbnail and description for trigger types

* image picker tweaks

* initial sync

* thumbnail file management

* clean up logs and use saved thumbnail on frontend

* publish mqtt messages

* webpush changes to enable trigger notifications

* add enabled switch

* add triggers from explore

* renaming and deletion fixes

* fix typing

* UI updates and add last triggering event time and link

* log exception instead of return in endpoint

* highlight entry in UI when triggered

* save and delete thumbnails directly

* remove alert action for now and add descriptions

* tweaks

* clean up

* fix types

* docs

* docs tweaks

* docs

* reuse enum
2025-08-16 10:20:33 -05:00
Nicolas Mowen
28f816b49a Classification improvements (#19020)
* Move classification training to full process

* Sort class images
2025-08-16 10:20:33 -05:00
Nicolas Mowen
528f0d2b1f Improve classification UI (#18910)
* Move threhsold to base model config

* Improve score handling

* Add back button
2025-08-16 10:20:33 -05:00
Nicolas Mowen
13fb7bc260 Improve object classification (#18908)
* Ui improvements

* Improve image cropping and model saving

* Improve naming

* Add logs for training

* Improve model labeling

* Don't set sub label for none object classification

* Cleanup
2025-08-16 10:20:33 -05:00
Josh Hawkins
cf62bee170 Add ONVIF focus support (#18883)
* backend

* frontend and i18n
2025-08-16 10:20:33 -05:00
Nicolas Mowen
3327be05ea Classification model cover images (#18843)
* Move to separate component

* Add cover images for clssification models
2025-08-16 10:20:33 -05:00
Josh Hawkins
a6b80c0f9c 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 10:20:33 -05:00
Nicolas Mowen
1caf8b97c4 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 10:20:33 -05:00