Commit Graph

1152 Commits

Author SHA1 Message Date
Nicolas Mowen
63d8c3662a
Add multiselect and batch actions to review items (#10161)
* Implement context menu for batch operations and implement apis

* reduce preview calculations on rerenders

* Add button to mark above items as reviewed

* Use context menu for mark as reviewed

* Cleanup
2024-02-29 19:53:29 -07:00
Nicolas Mowen
ea9316e770
Update and migrate mqtt to v2 (#10160) 2024-03-01 00:59:47 +00:00
Nicolas Mowen
cb30450060
Migrate pydantic to V2 (#10142)
* Run pydantic migration tool

* Finish removing deprecated functions

* Formatting

* Fix movement weights type

* Fix movement weight test

* Fix config checks

* formatting

* fix typing

* formatting

* Fix

* Fix serialization issues

* Formatting

* fix model namespace warnings

* Update formatting

* Format go2rtc file

* Cleanup migrations

* Fix warnings

* Don't include null values in config json

* Formatting

* Fix test

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-02-29 16:10:13 -07:00
Andrew Jackson
a1424bad6c
Fix permission error accessing /run/secrets (#10097)
Checks that the service has read access to the directory before trying
to read it
2024-02-28 17:18:34 -06:00
Nicolas Mowen
b5becad63f
Use alerts for live page gifs and allow opening recordings directly from them (#10135)
* Use alerts for gifs at top instead of events

* Add ability to open to recordings from event gif

* cleanup

* Formatting

* Add padding
2024-02-28 14:24:34 -06:00
Andrew Reiter
5edaaceaf2
Fix iOS playback of H.265 clips (#10105)
* Fix iOS playback of H.265 clips

* CI
2024-02-28 03:41:36 +00:00
Nicolas Mowen
f95ce913b1
Publish finished reviews to mqtt / ws and use that for source of update banner (#10072)
* Add reviews to frontend

* Update ready when new review is saved

* fix

* Formatting
2024-02-27 06:37:39 -07:00
Andrew Reiter
00c2caa1b7
Fix erroneous warning (#10070)
Customizing only the detector model path results in the warning
"Customizing more than a detector model path is unsupported." because
`{} is not {}` evaluates to True
2024-02-27 06:48:56 -06:00
JC
7eb89ca67c
Add missing frame_time argument to ObjectTracker.match_and_update() (#10079)
And some little type hints
2024-02-27 06:48:01 -06:00
Nicolas Mowen
3f1bd891e4
Use a rolling average of iou to determine if an object is no longer stationary (#9381)
* Use a rolling average of iou to determine if an object is no longer stationary

* Use different box variation to designate when an object is stationary on debug

* In progress

* Use average of boxes instead of average of iou

* Update frigate/track/norfair_tracker.py

Co-authored-by: Blake Blackshear <blake@frigate.video>

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-02-26 07:37:56 -06:00
Marc Altmann
2aee974e11
Update FFmpeg presets for Rockchip (#10034)
* update Rockchip FFmpeg presets

* disable afbc for rockchip ffmpeg presets

* allow changing aspect ratio
2024-02-26 12:13:42 +00:00
Nicolas Mowen
7b11ff1af6
Fix reviewed filter (#10039) 2024-02-25 15:36:18 -07:00
Nicolas Mowen
4e5546cc78
Fix reviewed filter (#10038) 2024-02-25 15:49:08 -06:00
Nicolas Mowen
9801534f11
Implement Review Filters (#10031)
* Get cameras filter working

* Implement label and review filters

* Fix

* Add time selection

* Cleanup

* Cleanup

* cleanup

* remove commented code

* Fix
2024-02-25 13:04:44 -06:00
Nicolas Mowen
7ccc7fb393
Allow 2 fps for previews where active fast objects are detected (#10025)
* Allow 2 fps for previews where active fast objects are detected

* Cleanup
2024-02-25 06:35:11 -06:00
Josh Hawkins
824e5ec3a3
Use first onvif profile with ptz config (#10012)
* Use zoom space id in Onvif RelativeMove setup (#9859)

* use zoom space id in onvif relativemove setup

* better handle cases when zooming is disabled

* Fix birdseye camera comparison (#9887)

* Format (#9889)

* use first onvif profile with ptz config

* Use zoom space id in Onvif RelativeMove setup (#9859)

* use zoom space id in onvif relativemove setup

* better handle cases when zooming is disabled

* use first onvif profile with ptz config

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-24 06:49:34 -07:00
Nicolas Mowen
02dfa1222e
Fix cross contaimation of labels (#10009) 2024-02-23 19:15:08 -06:00
Nicolas Mowen
74a8fee69c
Use manual jpg when preview is not finished yet (#9997)
* Use manual jpg when preview is not finished yet

* Ensure safe filename and improve sorting

* Ensure name is correct

* Formatting
2024-02-23 14:38:11 -06:00
JC
fc94fcb2ac
Setting motion masks to zero, rather than 255, will speed up calibration, as the average frame starts out at zero (#9992) 2024-02-23 06:08:05 -06:00
Nicolas Mowen
fa57a3db28
No reviews for objects without position changes, create frame initially for detection / alert (#9984) 2024-02-22 18:03:13 -06:00
Nicolas Mowen
6626b8d758
Show statusbar with cpu and gpu stats (#9968)
* Show statusbar with cpu and gpu stats

* fix gif logic
2024-02-21 20:27:02 -06:00
Nicolas Mowen
33c77d03c7
Reorganize stats (#9960)
* Reorganize stats

* Fix tests
2024-02-21 14:10:28 -06:00
Nicolas Mowen
509e46adc8
Review segment UI (#9945)
* Add ui for events

* Display data for review items

* Use preview thumbnails

* Implement paging

* Show icons for what was detected

* Show progress bar on preview thumbnail

* Hide the overlays on hover and update reviewed status

* Dim previews that have been reviewed

* Show audio icons

* Cleanup preview thumb player

* initial implementation of review timeline

* Use timeout for hover playback

* Break apart mobile and desktop views

* Show icons for sub labels

* autoplay first video on mobile

* Only show the last 24 hours by default

* Rework scrolling to fix nested scrolling

* Final scroll cleanups

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-02-21 13:07:32 -07:00
Nicolas Mowen
e608297c31
quick db fix (#9946) 2024-02-20 18:53:56 -07:00
Nicolas Mowen
940be5dc6f
Create ReviewSegment table in DB for organizing detections to be reviewed (#9918)
* Add review to database

* Create main manager for review segments

* Upsert and maintain review segments

* Update logic for adding new segments

* Add api

* Support deleting review segments on recording cleanup

* Add field for alert labels

* Formatting

* Logic fixes

* Save 16:9 thumbnail for review segment

* Ensure that crop is 16:9

* Fix non detected objects being added

* Only include true positives

* Add sub labels to data
2024-02-20 16:26:09 -07:00
Rob Arnold
aa99e11e1a
Autodetect AMD GPUs for VAAPI GPU stats (#9898)
* Add autodetection logic

* Fix formatting

* Add some explanatory comments

* Actually fix lint
2024-02-20 23:21:54 +00:00
Marc Altmann
299511cd9d
Update FFmpeg for Rockchip image (#9912)
* update build files

* update ffmpeg presets

* remove fix for HA add-on
2024-02-20 23:21:24 +00:00
Nicolas Mowen
f64ffa3a56
Fix black bar at bottom of previews (#9923) 2024-02-20 23:20:56 +00:00
Nicolas Mowen
dba21b606d
Convert config updating and video/audio queues to use zmq (#9893)
* Add config pub / sub pattern

* remove recording from feature metrics

* remove audio and feature metrics

* Check for updates from all cameras

* remove birdseye from camera metrics

* remove motion and detection camera metrics

* Ensure that all processes are stopped

* Stop communicators

* Detections

* Cleanup video output queue

* Use select for time sensitive polls

* Use ipc instead of tcp
2024-02-19 07:26:59 -06:00
John Vandenberg
3cff3a086b
fix typos (#9895) 2024-02-17 16:01:50 -06:00
Martin Weinelt
5720b63d70
Import escape function directly from markupsafe (#9858)
Adds a direct dependency on markupsafe, instead of relying on the
implicit dependency via Flask.

This is in preparation of Flask 3.0 support, which will drop compat for
importing escape indirectly.
2024-02-16 06:08:44 -06:00
Nicolas Mowen
dd3dc7949a
Use zmq for inter process communication (#9309)
* Use zmq for inter process communication

* Use localhost for reply and request

* Use pyobj instead of json and Need to use separate requestors for each audio listener

* Cleanup port defining
2024-02-14 18:24:36 -06:00
Blake Blackshear
198dbbdff1 Merge remote-tracking branch 'origin/master' into dev 2024-02-14 18:20:55 -06:00
Josh Hawkins
764736b223
update dev builds message (#9853) 2024-02-14 18:12:33 -06:00
Nicolas Mowen
ac0059cc1a
Make default region multiplier consistent (#9685)
* Make default region multiplier consistent

* Adjust tests
2024-02-13 23:25:00 +00:00
Nicolas Mowen
63bc1b1582
Improve thumbnails and live player (#9828)
* Don't show gif until event is over and fix aspect

* Be more efficient about updating events

* ensure previews are sorted

* Don't show live view when window is not visible

* Move debug camera to separate view

* Improve jpg loading

* Ensure still is updated on player live finish

* Don't reload when window not visible

* Only disconnect instead of full remove

* Use start time instead of event over to determine gif
2024-02-13 01:28:36 +00:00
Nicolas Mowen
b9e20fc833
Fix gif creation and add better error handling (#9797)
* Add better error handling

* Fix end_ts logic

* Formatting
2024-02-11 08:06:16 -06:00
Nicolas Mowen
bcbea8da7d
Create API to create gif from previews and show instead of still thumbnails (#9786)
* Start working on animation

* Change output file

* Create preview gif

* Show animated gif for event thumb

* Remove favorite

* Cleanup
2024-02-11 07:23:45 -06:00
Josh Hawkins
dc2e8f7f70
Onvif: skip non-video profiles in setup (#9708)
* use first h264 onvif profile

* error if profile remains unset

* move create_ptz_service call

* add profile logger debug
2024-02-10 13:41:24 -06:00
harakas
cd5f4b1534
detectors/edgetpu: yolov8 support (#9782)
* detectors/edgetpu: add support for yolov8 models

* docs: edgetpu yolov8 running

* docs: edgetpu yolov8 attribution and language

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 13:39:28 -06:00
Maximo Guk
86341c3172
Add error handling for unsupported label uploading to frigate+ (#9775) 2024-02-10 13:35:17 -06:00
Nicolas Mowen
91cdf64602
Birdseye enhancements (#9778)
* Center single camera view

* Implement scaling factor

* Add config for maximum number of cameras

* Add config for inactivity threshold

* update docs
2024-02-10 11:55:13 -06:00
harakas
44d8cdbba1
AMD GPU support with the rocm detector and YOLOv8 pretrained model download (#9762)
* ROCm AMD/GPU based build and detector, WIP

* detectors/rocm: separate yolov8 postprocessing into own function; fix box scaling; use cv2.dnn.blobForImage for preprocessing; assert on required model parameters

* AMD/ROCm: add couple of more ultralytics models; comments

* docker/rocm: make imported model files readable by all

* docker/rocm: readme about running on AMD GPUs

* docker/rocm: updated README

* docker/rocm: updated README

* docker/rocm: updated README

* detectors/rocm: separated preprocessing functions into yolo_utils.py

* detector/plugins: added onnx cpu plugin

* docker/rocm: updated container with limite label sets

* example detectors view

* docker/rocm: updated README.md

* docker/rocm: update README.md

* docker/rocm: do not set HSA_OVERRIDE_GFX_VERSION at all for the general version as the empty value broke rocm

* detectors: simplified/optimized yolov8_postprocess

* detector/yolo_utils: indentation, remove unused variable

* detectors/rocm: default option to conserve cpu usage at the expense of latency

* detectors/yolo_utils: use nms to prefilter overlapping boxes if too many detected

* detectors/edgetpu_tfl: add support for yolov8

* util/download_models: script to download yolov8 model files

* docker/main: add download-models overlay into s6 startup

* detectors/rocm: assume models are in /config/model_cache/yolov8/

* docker/rocm: compile onnx files into mxr files at startup

* switch model download into bash script

* detectors/rocm: automatically override HSA_OVERRIDE_GFX_VERSION for couple of known chipsets

* docs: rocm detector first notes

* typos

* describe builds (harakas temporary)

* docker/rocm: also build a version for gfx1100

* docker/rocm: use cp instead of tar

* docker.rocm: remove README as it is now in detector config

* frigate/detectors: renamed yolov8_preprocess->preprocess, pass input tensor element type

* docker/main: use newer openvino (2023.3.0)

* detectors: implement class aggregation

* update yolov8 model

* add openvino/yolov8 support for label aggregation

* docker: remove pointless s6/timeout-up files

* Revert "detectors: implement class aggregation"

This reverts commit dcfe6bbf6f.

* detectors/openvino: remove class aggregation

* detectors: increase yolov8 postprocessing score trershold to 0.5

* docker/rocm: separate rocm distributed files into its own build stage

* Update object_detectors.md

* updated CODEOWNERS file for rocm

* updated build names for documentation

* Revert "docker/main: use newer openvino (2023.3.0)"

This reverts commit dee95de908.

* reverrted openvino detector

* reverted edgetpu detector

* scratched rocm docs from any mention of edgetpu or openvino

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* renamed frigate.detectors.yolo_utils.py -> frigate.detectors.util.py

* clarified rocm example performance

* Improved wording and clarified text

* Mentioned rocm detector for AMD GPUs

* applied ruff formating

* applied ruff suggested fixes

* docker/rocm: fix missing argument resulting in larger docker image sizes

* docs/configuration/object_detectors: fix links to yolov8 release files

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 06:41:46 -06:00
Nicolas Mowen
64988c9be0
Streamline live view (#9772)
* Break out live page

* Improving layouts and add chip component

* Improve default camera player sizing

* Improve live updating

* Cleanup and fit figma

* Use fixed height

* Masonry layout

* Fix stuff

* Don't force heights

* Adjust scaling

* Cleanup

* remove sidebar (#9731)

* remove sidebar

* keep sidebar on mobile for now and add icons

* Fix revalidation

* Cleanup

* Cleanup width

* Add chips for activity on cameras

* Remove dashboard from header

* Use Inter font (#9735)

* Show still image when no activity is occurring

* remove unused search params

* add playing check for webrtc

* Don't use grid at all for single column

* Fix height on mobile

* a few style updates to better match figma (#9745)

* Remove active objects when they become stationary

* Move to sidebar only and make settings separate component

* Fix layout

* Animate visibility of chips

* Sidebar is full screen

* Fix tall aspect ratio cameras

* Fix complicated aspect logic

* remove

* Adjust thumbnail aspect and add text

* margin on single column layout

* Smaller event thumb text

* Simplify basic image view

* Only show the red dot when camera is recording

* Improve typing for camera toggles

* animate chips with react-transition-group (#9763)

* don't flash when going to still image

* revalidate

* tooltips and active tracking outline (#9766)

* tooltips

* fix tooltip provider and add active tracking outline

* remove unused icon

* remove figma comment

* Get live mode working for jsmpeg

* add small gradient below timeago on event thumbnails (#9767)

* Create live mode hook and make sure jsmpeg can be used

* Enforce env var

* Use print

* Remove unstable

* Add tooltips to thumbnails

* Put back vite

* Format

* Update web/src/components/player/JSMpegPlayer.tsx

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-02-10 05:30:53 -07:00
Nicolas Mowen
00804a0f81
Don't fail if message is received before websocket start (#9634) 2024-02-05 17:53:16 -06:00
Josh Hawkins
a33f2f117e
more robust onvif checks (#9635) 2024-02-05 17:52:47 -06:00
Nicolas Mowen
50563eef8d
Nms optimize for stationary cars (#9684)
* Use different nms values for different object types

* Add tests

* Format tests
2024-02-05 17:52:06 -06:00
Josh Hawkins
3df8b5829c
Small autotracking changes (#9571)
* ignore web-new

* remove web-new

* catch exceptions for unsupported cameras

* don't split up large ptz movements

* fix ruff
2024-02-02 06:23:14 -06:00
Nicolas Mowen
2d0864c723
Adjust kalman filter used for norfair tracker (#9538)
* Adjust kalman filter

* Add comment

* Formatting
2024-02-02 06:22:56 -06:00
Nicolas Mowen
c5819478d3
Web & ffmpeg bug fixes (#9525)
* Fix scaling for long timeline lists

* Better handle taller video in player

* Fix birdseye options

* Fix ffmpeg auto detect
2024-02-01 06:44:10 -06:00