* Add isort and ruff linter
Both linters are pretty common among modern python code bases.
The isort tool provides stable sorting and grouping, as well as pruning
of unused imports.
Ruff is a modern linter, that is very fast due to being written in rust.
It can detect many common issues in a python codebase.
Removes the pylint dev requirement, since ruff replaces it.
* treewide: fix issues detected by ruff
* treewide: fix bare except clauses
* .devcontainer: Set up isort
* treewide: optimize imports
* treewide: apply black
* treewide: make regex patterns raw strings
This is necessary for escape sequences to be properly recognized.
* Move to events package
* Improve handling of external events
* Handle external events in the event queue
* Pass in event processor
* Check event json
* Fix json parsing and change defaults
* Fix snapshot saving
* Hide % score when not available
* Correct docs and add json example
* Save event png db
* Adjust image
* Formatting
* Add catch for failure ending event
* Add init to modules
* Fix naming
* Formatting
* Fix http creation
* fix test
* Change to PUT and include response in docs
* Add ability to set bounding box locations in snapshot
* Support multiple box annotations
* Cleanup docs example response
Co-authored-by: Blake Blackshear <blake@frigate.video>
* Cleanup docs wording
Co-authored-by: Blake Blackshear <blake@frigate.video>
* Store full frame for thumbnail
* Formatting
* Set thumbnail height to 175
* Formatting
---------
Co-authored-by: Blake Blackshear <blake@frigate.video>
* Add network bandwidth usage to System table display in System.jsx and update get_bandwidth_stats function in util.py to include go2rtc processes
* black...
* Add network bandwidth usage to system table in web UI and improve regex in get_bandwidth_stats function to include frigate detector processes
* black...
* Update bandwidth calculation to include both incoming and outgoing traffic
* black:(
* Add Deepstack detector plugin with configurable API URL, timeout, and API key
* Update DeepStack plugin to recognize 'truck' as 'car' for label indexing
* Add debug logging to DeepStack plugin for better monitoring and troubleshooting
* Refactor DeepStack label loading from file to use merged labelmap
* Black format
* add documentation draft
* fix link to codeproject website
* Apply suggestions from code review
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* nvml
* black...black...black...
* small fix for avoid errors on strange GPUs and old drivers
* fix type errors
* fix type errors
* fix unittest process crash
where the tests for tests?..
* it's impossible to mock low-level library
* fix double % for other GPU types
* remove space before gpu statistic values
* test refactor process stats
* Update util.py
* bugfix
* black formatting
* add missing processes field to StatsTrackingTypes class
* fix python checks and tests...
* use psutil for calcilate cpu utilization on get_cpu_stats
* black...black...black...
* add cpu average
* calculate statiscts for logger process
* add P-ID for other processes in System.jsx
* Apply suggestions from code review
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* make page beautiful again :)
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* avoid executing external tools by using Python's built-in os module to interact with the filesystem directly
* Refactor recording cleanup script to use os module instead of subprocess
* black format util.py
* Ooooops
* Refactor get_cpu_stats() to properly identify recording process
* Organize event table to be more generalized
* Add appropriate fields to data
* Move tracked object logic to own function
* Add source type to event queue
* rename enum
* Fix types that are used in webUI
* remove redundant
* Formatting
* fix typing
* Rename enum
* Add option to sort cameras inside Birdseye
* Make default order to be sorted alphabetically
* Add docs for sorting cameras
* Update index.md for cameras
* Remove irelevant comments
* Move recordings management to own process and ensure db multiprocess access
* remove reference to old threads
* Cleanup directory remover
* Mypy fixes
* Fix mypy
* Add support back for setting record via MQTT and WS
* Formatting
* Fix rebase issue
* Add support for ptz commands via websocket
* Fix startup issues
* Fix bugs
* Set config manually
* Add more commands
* Add presets
* Add zooming
* Fixes
* Set name
* Cleanup
* Add ability to set presets from UI
* Add ability to set preset from UI
* Cleanup for errors
* Ui tweaks
* Add visual design for pan / tilt
* Add pan/tilt support
* Support zooming
* Try to set wsdl
* Fix duplicate logs
* Catch auth errors
* Don't init onvif for disabled cameras
* Fix layout sizing
* Don't comment out
* Fix formatting
* Add ability to control camera with keyboard shortcuts
* Disallow user selection
* Fix mobile pressing
* Remove logs
* Substitute onvif password
* Add ptz controls ot birdseye
* Put wsdl back
* Add padding
* Formatting
* Catch onvif error
* Optimize layout for mobile and web
* Place ptz controls next to birdseye view in large layout
* Fix pt support
* Center text titles
* Update tests
* Update docs
* Write camera docs for PTZ
* Add MQTT docs for PTZ
* Add ptz info docs for http
* Fix test
* Make half width when full screen
* Fix preset panel logic
* Fix parsing
* Update mqtt.md
* Catch preset error
* Add onvif example to docs
* Remove template example from main camera docs
* Migrate db path to /config
* Ensure oneshot runs
* Put logic inside of Frigate's run
* Use new db default path in code
* Fix missing config dir
* Upgrade yq to 4.33.3
* Create timeline table
* Fix indexes
* Add other fields
* Adjust schema to be less descriptive
* Handle timeline queue from tracked object data
* Setup timeline queue in events
* Add source id for index
* Add other fields
* Fixes
* Formatting
* Store better data
* Add api with filtering
* Setup basic UI for timeline in events
* Cleanups
* Add recordings snapshot url
* Start working on timeline ui
* Add tooltip with info
* Improve icons
* Fix start time with clip
* Move player logic back to clips
* Make box in timeline relative coordinates
* Make region relative
* Get box overlay working
* Remove overlay when playing again
* Add disclaimer when selecting overlay points
* Add docs for new apis
* Fix mobile
* Fix docs
* Change color of bottom center box
* Fix vscode formatting
It is an alias for the python float type, and got deprecated in 1.20 and
was removed in 1.24. The rest of the project already uses float32
(single), so I believe this is also correct here, as opposed to float64
(double).
It supports the same entrypoints, given that tflite is a small cut-out
of the big tensorflow picture.
This patch was created for downstream usage in nixpkgs, where we don't
have the tflite python package, but do have the full tensorflow package.
* Add docs for time / date styling
* Convert 12hour time format option to enum
* Change option in web
* Add docs with examples
* Fix errors in docs
* Fix mismatched names
* Initial commit that adds YOLOv5 and YOLOv8 support for OpenVINO detector
* Fixed double inference bug with YOLOv5 and YOLOv8
* Modified documentation to mention YOLOv5 and YOLOv8
* Changes to pass lint checks
* Change minimum threshold to improve model performance
* Fix link
* Clean up YOLO post-processing
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Add ability to GPU device to be automatically detected when multiple exist
* Add logging info
* Fix access
* Fix
* Formatting
* Fix path of device
* Use log error instead of raise
* Remove log which could apply to other caess
* Set default value
* rework logic and support auto gpu selection for encoding gpu as well
* dont wait so long for queues
* implement stop methods for comms
* set the detection events on exit and return early from processing
* handle the stop event in the broadcast threads
* short circuit the detection process exit code if it already exited
* some logging for stats thread
* just keep the log process alive 1 second after the last log message
* ensure the multiprocessing queues are emptied and closed
* Update frigate/log.py
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Update frigate/log.py
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* mypy fixes
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Initial commit to enable Yolox models with OpenVINO in Frigate
* Fix ModelEnumtType import error in openvino.py
* Initial edit of the docs to include verbage about yolox
* Initial edit of the docs to include verbage about yolox
* Elaborate configuration and limitations in docs.
* Add capability to dynamically determine number of classes in yolox model
* Further refinements
* Removed unnecesarry comments, improved documentation, addressed PR items
* Fixed lint formatting issues
* Restart ffmpeg if process exceeds detect fps by 10
* Update frigate/video.py
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
* spelling
---------
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
* Refator s6 scripts to the new format
* Remove unneeded workaround
* Migrate logging to new s6 format
* Remove more unnecessary s6 variables
* Fix prepare-log and when go2rtc is not present in config
* Restart the whole container if either Frigate or go2rtc fails
* D
* Fix service name in finish
* Fix nginx finish comment
* Restart improvements
* Fix devcontainer
* Fix format
* Update Dockerfile
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Add config fields
* Clean up camera default values
* Set recordings timezone with config if available
* Adjust for timezone config
* Cleanup setting of the timezone
* Don't fail on MSE check iPad
* Fix MSE check for birdseye
* Add docs
* Fix test
* Add in_progress parameter to /api/events to filter the results.
* Change in_progress to default to no filtering, 0 means no in progress, 1 means only in progress.
* Fix code format with black.
* Clear blank line.