* Add Thai (still need to merge weblate)
* Apply attribute logic to all label types
* Fix area check
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Don't use timezone in export dialog timestamps
Revert an unnecessary change made in https://github.com/blakeblackshear/frigate/pull/18257
* Ensure notifications register button is only disabled when both all cameras and every individual camera is disabled
* Send test notification if any cameras are enabled
* clarify docs about disabling cameras
* fix crash in autotracking zoom
* clean up
* masks and zones i18n fixes
* Check if camera is enabled in config
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Only check if an object is stationary to avoid mqtt snapshot
* docs heading tweak
* Add more API descriptions
* Add missing lib for new rocm onnxruntime whl
* Update inference times to reflect better rocm performance
* Cleanup resetting tracked object activity
* remove print
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Not everyone is using /dev/dri/card0. I recommend switching to these more generic parameters for intel_gpu_top_command (line 307 in the 0.16.0-beta2 version of services.py):
intel_gpu_top_command += ["-d", "sriov"]
* Add option to not trim clip
* Improve API
* Update snapshot for new best objects
* Fix missing strings
* Convert to separate key
* Always include bounding box on snapshots
* improve autotracking relative zooming time calculation
* update proxy docs to note the need for comma separated header roles
* Add count translation
* tracked object lifecycle i18n fix
* update speed estimation docs
* clarity
* Re-initialize onvif information when toggling camera on live view
* Move time ago to card info and add face area
* Clarify face recognition docs
* Increase minimum face recognition area
* use clipFrom to in vod module endpoint to start at the correct time
* Cleanup media api
* Don't change duration
* Use search detail dialog for face library
* Move to segment based
* Cleanup
* Add back duration modification
* clean up docs
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Fix the `Any` typing hint treewide
There has been confusion between the Any type[1] and the any function[2]
in typing hints.
[1] https://docs.python.org/3/library/typing.html#typing.Any
[2] https://docs.python.org/3/library/functions.html#any
* Fix typing for various frame_shape members
Frame shapes are most likely defined by height and width, so a single int
cannot express that.
* Wrap gpu stats functions in Optional[]
These can return `None`, so they need to be `Type | None`, which is what
`Optional` expresses very nicely.
* Fix return type in get_latest_segment_datetime
Returns a datetime object, not an integer.
* Make the return type of FrameManager.write optional
This is necessary since the SharedMemoryFrameManager.write function can
return None.
* Fix total_seconds() return type in get_tz_modifiers
The function returns a float, not an int.
https://docs.python.org/3/library/datetime.html#datetime.timedelta.total_seconds
* Account for floating point results in to_relative_box
Because the function uses division the return types may either be int or
float.
* Resolve ruff deprecation warning
The config has been split into formatter and linter, and the global
options are deprecated.
* Add camera name tooltip to previews in recording view
* Apply face area check to cv2 face detection
* Delete review thumbnails
* Don't import hailo until it is used
* Add comment
* Clean up camera name
* Filter out empty keys when updating yaml config
HA ingress seems to randomly add an equal sign to the PUT urls for updating the config from the UI. This fix prevents empty keys from being processed, but still allows empty values.
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Catch error and show toast when failing to delete review items
* i18n keys
* add link to speed estimation docs in zone edit pane
* Implement reset of tracked object update for each camera
* Cleanup
* register mqtt callbacks for toggling alerts and detections
* clarify snapshots docs
* clarify semantic search reindexing
* add ukrainian
* adjust date granularity for last recording time
The api endpoint only returns granularity down to the day
* Add amd hardware
* fix crash in face library on initial start after enabling
* Fix recordings view for mobile landscape
The events view incorrectly was displaying two columns on landscape view and it only took up 20% of the screen width. Additionally, in landscape view the timeline was too wide (especially on iPads of various screen sizes) and would overlap the main video
* face rec overfitting instructions
* Clarify
* face docs
* clarify
* clarify
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* face library i18n fixes
* face library i18n fixes
* add ability to use ctrl/cmd S to save in the config editor
* Use datetime as ID
* Update metrics inference speed to start with 0 ms
* fix android formatted thumbnail
* ensure role is comma separated and stripped correctly
* improve face library deletion
- add a confirmation dialog
- add ability to select all / delete faces in collections
* Implement lazy loading for video previews
* Force GPU for large embedding model
* GPU is required
* settings i18n fixes
* Don't delete train tab
* webpush debugging logs
* Fix incorrectly copying zones
* copy path data
* Ensure that cache dir exists for Frigate+
* face docs update
* Add description to upload image step to clarify the image
* Clean up
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* fix onvif reinitialization
* api docs: clarify usage of clip.mp4 endpoint
* Always show train tab
* Add description to API
* catch lpr model inference exceptions
* always apply motion mask when using yolov9 plate detection
* lpr faq
* fix incorrect focus when reopening search detail dialog on video tab
* only use keyboard listener in face library when train tab is active
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* use async/await instead of asyncio.run()
* fix autotracking
* create cameras in same event loop that will use them
* more debug
* try using existing event loop instead of creating a new one
* merge dev
* fixes
* run get_camera_info onvifcontroller calls in dedicated loop
* move coroutine call with loop to api
* use asyncio for autotracking move queues
* clean up
* fix calibration
* improve exception logging
* frigate+ pane i18n fix
* catch more exceptions
* explore search result tooltip i18n fix
* i18n fix
* remove comments about deprecated strftime_fmt
* Catch producers exists but is None
* Formatting
* fix live camera view i18n
* Add default role config for proxy users
This allows users to specify a default role for users when using a proxy for auth. This can be useful for users who can't/don't want to define a header mapping for the remote-role header.
* update reference config and auth docs
* clarify face rec camera level config
* clarify auth docs
* Fix onnx not working with openvino
* Update openvino to fix failed npu plugin check
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
On startup, the object processing pipeline would be delayed for 10ms every iteration through the loop while the end event subscriber blocked. For users with large numbers of cameras and a fair amount of detected objects, this would cause the detected objects queue length to rise and frames to be eventually dropped, leading to processing delays, incorrect frame times applied to thumbnail_data, and other seemingly unexplainable things.
* add zoom time to movement predictions
* config migrator
* add space to face rename regex
* more debug
* only calculate zoom time of relative move
* fix test
* make migrated movement weight a zero
* check for str and bool for movestatus support
* Support automatic language selection
* Handle non-matching keys
* Cleanup
* Handle region specific language codes from browser
* Fix passing in requestor
* Send tracked object updates for face and license_plate objects
* Update docs
* Add to type enum
* Add camera to object description update
* Formatting
* Consolidate yue-Hant
* Add missing
* Only auto-populate some config fields down to the camera level
- Don't populate LPR and face global-only settings down to the camera level
- Ensure LPR mixin uses camera level min_area
- Explicitly forbid extra config values for LPR and face
* lpr docs tweak
* remove extra text already in i18n key
* consistency
* fix check for snapshot score
for manual events, snapScore is 0, so "0" gets displayed instead of a condition being evaluated.
* fix ongoing events from being returned for all review queries
The existing condition will include any record with a null end_time regardless of when it started, as long as the start_time is greater than the after param. With this fix, both the start time needs to be within the specified range, and for events that have already ended, their end time must be before the before param
* Base alert toggles on width not device class
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Don't update thumbnail/snapshot if frame is not in the frame cache
This follows up on changes originally made in https://github.com/blakeblackshear/frigate/pull/17671 - it is possible that is_better_thumbnail is true but the frame_time for the object is not the same as the current_frame_time. So rather than checking the frame cache, this change will only update the thumbnail_data when the two frame time values are the same.
* add camera name to debug log
* Don't limit review summary query
The /review/summary endpoint was being restricted to the last 30 days, so unreviewed alerts and detections weren't showing in the calendar before that point. This change removes the WHERE clause so that the endpoint returns all results.
* fix
* remove unneeded test
we are now returning all results so we don't need to test for > month_ago
* fix
FFmpeg adds an extra delay for the first start of the stream. For some cameras the stream start can be 1 second, for some cameras it can be more than 5 seconds. Frigate by default used a timeout of 5 seconds and drops the connection without waiting for a response from go2rtc. Originally suggested by @AlexxIT in https://github.com/AlexxIT/go2rtc/issues/1633
* Add npu usages as a statistic
* Support showing NPU stats in dashboard
* Add sys volume mount for npu usages
* Fix type
* Simplify check
* Cleanup
* Cleanup
* add support for multi-line plates
* config for model size
* default to small model
* add license plate as attribute to motorcycle
* use model size
* docs
* attribute map
* i18n key fix
* Save initial frame of new objects to frame cache
Objects that move quickly through the frame and are only seen briefly may not have the update() method called to save thumbnail_data, and may not have the initial frame saved to the tracked object frame cache. This caused a "Frame missing from frame cache" message that was patched by #7313 but this sometimes caused the wrong frame to be chosen for the thumb/snapshot.
* Tracking tweaks
- When registering new objects, use the past detections from Norfair to populate self.positions and self.stationary_box_history. This prevents the first call of update_position() from triggering a +1 on the object's stationary count (because the iou would be 1.0).
- Add a specific tracker for dedicated LPR cam license_plate objects using a lower R value and higher distance threshold to account for fast moving plates.
- Add helpful debug messages and keep them disabled with `if False:`
* Correctly ensure updates are more periodic when lpr or face detection is needed
* Cleanup
* Update api schema
* Don't update for stationary objects
* Simplify check
* Remove
* Merge nearby horizontal boxes
* only publish to recognized plate field if object already has a sub label
* don't overwrite sub labels in any situation
* always publish sub label if it's a known plate
* remove license plate from attributes for dedicated lpr cameras
* ensure we always have a color
* use frigate+ models with dedicated lpr cameras
* docs
* docs clarity
* docs enrichments
* use license_plate as object type
* Section faces by event id
* Make score keeping more robust
* layout improvements
* Cleanup dialog
* Fix clicking behavior
* Add view in explore option
* math.round
* Don't require events
* Cleanup
* Remove selection
* Don't require
* Change dialog size with snapshot
* Use filename as key
* fix key
* Rework layout for mobile
* Handle mobile landscape
* Fix train issue
* Match logic
* Move deletion logic
* Fix reprocessing
* Support creating a new face
* Translations
* Do sorting in frontend
* Adjust unknown
* Cleanup
* Set max limit to faces to recognize
* Fix sorting
* Fix
* add config validator for face and lpr
* more lpr docs tweaks
* fix object lifecycle point clicking for aspect ratios less than 16/9
* fix semantic search indexing i18n keys
* remove ability to set system language
* clarify debug output
* Don't assume landmark file is downloaded
* Rewrite build model task to be asynchronous so it doesn't block the pipeline
* Handle case where face recognition does not respond
* Cleanup
* Make daemon thread
* Increase frequency of updates when internal face detection is used
* Adjust number of required faces based on detection type
* Adjust min_score config to unknown_score
* Only for person
* Improve typing
* Update face rec docs
* Cleanup ui colors
* Cleanup
* Refactor face recognition to allow for running lbph or embedding
* Cleanup
* Use weighted average for faces
* Set correct url
* Cleanup
* Update docs
* Update docs
* Use scipy trimmed mean
* Normalize
* Handle color and gray landmark detection
* Upgrade to new arcface model
* Implement sigmoid function
* Rename
* Rename to arcface
* Fix
* Add face recognition model size to ui config
* Update toast
* Add ability to update Frigate+ model to latest
* UI tweaks
* further UI tweaks
* UI tweaks: add width and height, fix select
* Add placeholder while API call in progress
* Fix Frigate+ enabled check
* Fix config change lost when reloading page
* Add persistent message requiring restart
* Drop down supported detectors and dimensions
* Add width and height to display
* Update FrigatePlusSettingsView.tsx
* Temp fix for Codespaces not loading
* Add i18n, format
* remove unneeded brackets
* missing colon
* Revert "Temp fix for Codespaces not loading"
This reverts commit 75b19674ce.
* Move database and config from homeassistant /config to addon /config
* Re-implement config migration for the add-on
* Align some terms
* Improve function name
* Use local variables
* Add model.path migration
* Fix homeassistant config path
* Ensure migration scripts run before go2rtc and frigate
* Migrate all files I know
* Add ffmpeg.path migration
* Update docker/main/rootfs/etc/s6-overlay/s6-rc.d/prepare/run
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Improve some variable names and organization
* Update docs to reflect addon config dir
* Update live.md with /addon_configs
* Move addon config section to configuration doc
* Align several terminologies and improve text
* Fix webrtc example config title
* Capitalize Add-on in more places
* Improve specific add-on config dir docs
* Align bash and python scripts to prefer config.yml over config.yaml
* Support config.json in migration shell scripts
* Change docs to reflect config.yml is preferred over config.yaml
* If previous config was yaml, migrate to yaml
* Fix typo in edgetpu.md
* Fix formatting of Python files
* Remove HailoRT Beta add-on variant from docs
* Add migration for labelmap and certs
* Fix variable name
* Fix new_config_file var unset
* Fix addon config directories table
* Improve db migration to avoid migrating files like .db.bak
* Fix echo location
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* docs fps recommendation
* add detection_threshold to example
* send uncoverted yuv frame
* copy and convert
* ensure thumbnail is encoded as webp
* keep as jpeg
* config options
* processing in maintainer
* detect and process dedicated lpr plates
* create camera type, add manual event and save snapshot
* use const
* ensure lpr events are always detections, typing fixes
* docs
* docs tweaks
* add preprocessing and penalization for low confidence chars
* ensure config file is updated with booleans instead of strings
* catch onvif error
* ensure object type is available as a ptz tracker
* update live view docs
* Ensure doesn't fail due to missing dir
* Remove redundant settings from tabs
* Adjust selection method for mobile
* Fix button descendent error
* Ensure train is option on mobile
* Cleanup face images
* Cleanup
* Fix case where objects are returned as null
* Fix enabled status not being persisted
* Use config as source of truth when refreshed
* Ensure camera always have config object updated
* Cleanup typing