* 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>
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.
* 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
* recordings data pub/sub
* function to process recording stream frames
* model runner
* lpr model runner
* refactor to mixin class and use model runner
* separate out realtime and post processors
* move model and mixin folders
* basic postprocessor
* clean up
* docs
* postprocessing logic
* clean up
* return none if recordings are disabled
* run postprocessor handle_requests too
* tweak expansion
* add put endpoint
* postprocessor tweaks with endpoint
* Moved FrigateApp.init_config() into FrigateConfig.load()
* Move frigate config loading into main
* Store PlusApi in FrigateConfig
* Register SIGTERM handler in main
* Ensure logging is setup during config parsing
* Removed pointless try
* Moved config initialization out of FrigateApp
* Made FrigateApp.shm_frame_count into a function
* Removed log calls from signal handlers
python's logging calls are not re-entrant, which caused at least one of
these to deadlock randomly.
* Reopen stdout/err on process fork
This helps avoid deadlocks (https://github.com/python/cpython/issues/91776).
* Make mypy happy
* Whoops. I might have forgotten to save.
Truly an amateur mistake.
* Always call FrigateApp.stop()
* Install multiple ffmpeg versions and add config to make it configurable
* Update docs
* Run ffprobe too
* Cleanup
* Apply config to go2rtc as well
* Fix ffmpeg bin
* Docs
* Restore path
* Cleanup env var
* Fix ffmpeg path for encoding
* Fix export
* Formatting
* Refactor recordings config to be based off of review items
* Update object processing logic for when an event is created
* Migrate to deciding recording retention based on review items
* Refactor recording expiration to be based off of review items
* Remove remainder of recording events access
* Handle migration automatically
* Update version and cleanup
* Update docs
* Clarify docs
* Cleanup
* Target camera config
* Safely access all fields
* Initial re-implementation of semantic search
* put docker-compose back and make reindex match docs
* remove debug code and fix import
* fix docs
* manually build pysqlite3 as binaries are only available for x86-64
* update comment in build_pysqlite3.sh
* only embed objects
* better error handling when genai fails
* ask ollama to pull requested model at startup
* update ollama docs
* address some PR review comments
* fix lint
* use IPC to write description, update docs for reindex
* remove gemini-pro-vision from docs as it will be unavailable soon
* fix OpenAI doc available models
* fix api error in gemini and metadata for embeddings
* intentionally handle queues during shutdown and carefully manage shutdown order
* more carefully manage shutdown to avoid threadlocks
* use debug for signal logging
* ensure disabled cameras dont break shutdown
* typo
* Allow deleting failed in progress exports
* Fix comparison and preview retrieval
* Fix stretching of event cards
* Reset edit state when group changes
* Allow specifying group
* Save review thumbs in dedicated folder
* Create exports table
* Save exports to DB and save thumbnail for export
* Save full frame always
* Fix rounded corners
* Save exports that are in progress
* No need to remove spaces
* Reorganize apis to use IDs
* Use new apis for frontend
* Get video playback working
* Fix deleting and renaming
* Import existing exports to DB
* Implement downloading
* Formatting
* Only update frame time if it is older
* Support manual detections as review items
* Don't handle api detections in recordings
* Store recordings for manual events
* Add dialog to export recordings
* Add export dialog functionality
* Add ability to name exports
* Add ability to choose custom time range on timeline
* Add ability to choose custom time range on timeline
* Add custom time selection
* Make hot keys optional for typing name of export
* Tweaks to dialog
* Tweaks to dialog
* round corners more
* Final tweaks