Commit Graph

105 Commits

Author SHA1 Message Date
Nicolas Mowen
add68b8860
Improve logging (#18867)
* Ignore numpy get limits warning

* Add function wrapper to redirect stdout and stderr to logpipe

* Save stderr too

* Add more to catch

* run logpipe

* Use other logging redirect class

* Use other logging redirect class

* add decorator for redirecting c/c++ level output to logger

* fix typing

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-06-25 07:24:45 -06:00
Jimmy
ab7b12da54
Add Mesa Teflon as a TFLite detector (#18310)
* Refactor common functions for tflite detector implementations

* Add detector using mesa teflon delegate

Non-EdgeTPU TFLite can use the standard .tflite format

* Add mesa-teflon-delegate from bookworm-backports to arm64 images
2025-06-06 13:41:04 -06:00
Josh Hawkins
c16e536b46
Fixes (#18338)
* improve spacing of face selection in mobile drawer

* fix spacing

* sort face names alphabetically

* Improve face selection dialog

* Use a state to track when face image loads

The naturalWidth and naturalHeight will always be 0 until the image loads. So we use onLoad and a state to track loading and then calculate the area after it has loaded

* Verify that a camera only tracks objects that are possible to track

* Fix test

* genai docs tweak

* Disable openvino model cache

* Clenaup

* Sanitize floats for estimated speed and angle

Users can configure speed zones in such a way that velocity estimates from Norfair cause a value of inf to be stored as an estimated speed. FastAPI doesn't serialize inf as a float, so trying to return this value would result in an API error. Sanitizing the value before storing should correct this.

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2025-05-22 09:38:14 -06:00
Martin Weinelt
4d4d54d030
Fix various typing issues (#18187)
* 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.
2025-05-13 08:27:20 -06:00
Josh Hawkins
2c9bfaa49c
Fixes (#18176)
* 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>
2025-05-13 08:27:07 -06:00
Josh Hawkins
8094dd4075
Fixes (#18117)
* 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>
2025-05-09 07:36:44 -06:00
Nicolas Mowen
212784b68e
implement RKNN downloads for yolov9 and yolox models (#17875)
* Add other rockchip download models

* Specify newer release version

* Specify newer release version

* Update docs for rknn downloads

* Update hardware docs
2025-04-23 12:22:23 -05:00
Nicolas Mowen
d5f9153c94
Remove unused pattern (#17842) 2025-04-21 14:11:34 -06:00
Nicolas Mowen
38ffe21b69
Add support for rockchip GPU stats (#17812)
* Set rockchip GPU name

* Add support for calculating rockchip GPU load

* Format consistently

* Fix access error
2025-04-19 16:34:05 -05:00
Nicolas Mowen
89b54f19c8
Add YOLOv9 support to RKNN (#17791)
* Add yolov9

* Undo

* Update docs for rknn yolov9

* Update docs notes

* Add infernece times table
2025-04-18 16:51:04 -06:00
Nicolas Mowen
1cdc9b6097
Implement YOLOx for RKNN (#17788)
* Implement yolox rknn inference and post processing

* rework docs
2025-04-18 14:44:02 -06:00
Nicolas Mowen
68382d89b4
Cleanup detection (#17785)
* Fix yolov9 NMS

* Improve batched yolo NMS

* Consolidate grids and strides calculation

* Use existing variable

* Remove

* Ensure init is called
2025-04-18 10:26:34 -06:00
Nicolas Mowen
19aaa64fe9
Add support for yolox models to onnx detector (#17773) 2025-04-18 06:40:06 -05:00
Nicolas Mowen
8270967cdc
UI Fixes (#17762)
* Fix handling of non existing cameras in groups

* Update docs

* Improve typing
2025-04-17 13:48:09 -06:00
Nicolas Mowen
15fe79178b
Improve async object detector support (#17712)
* Move object detection to folder

* Add input store type

* Add hwnc

* Add hwcn

* Fix test
2025-04-15 08:55:38 -05:00
Nicolas Mowen
bd0ee86db9
Refactor yolov9 detector to support v3, v4, v7 as well (#17697)
* Implement blobbed yolov7 post processing and consolidate yolo implementation

* Update documentation

* Add repo

* fix name
2025-04-14 16:05:41 -05:00
Nicolas Mowen
18af06237c
Support RF-DETR models with OpenVINO (#17321)
* Add support for openvino to run rf-detr models

* Add more inference time examples

* organize

* Add example to docs

* Add support for yolo generic
2025-03-23 14:02:16 -06:00
Nicolas Mowen
48e4c44b32
Add support for RF-DETR models (#17298)
* Add support for rf-detr models

* Add docs for rf-detr model

* Cleanup
2025-03-21 19:55:46 -05:00
Jason Hunter
e340c9aaba
Add openvino support for the DFINE model (#17238)
* add openvino support for the dfine model

* update docs to show DFINE support for openvino

* remove warning about OpenVINO for DFINE
2025-03-19 07:23:24 -05:00
Nicolas Mowen
db541abed4
Fix model errors (#17171) 2025-03-16 06:01:15 -05:00
OmriAx
7411a8bafa
Hailo Official integration (#16906)
* Adding Models

* Final Async Update

* Bug Fixing

* Fix

* Adding fixes

* Working async infer

* Final Documenatation and debug update

* Removing some extra prints

* Post-process correct label push

* config docs fix

* Review Fix

* Review fix 2.0

* Fixing the ASYNC API to work from 30ms to 10ms

* Fix for multi stream async infernce

* Format

* Fix #3

* Format#2

* Remove Unnessery includes

* Sort Imports
2025-03-11 13:36:07 -06:00
Nicolas Mowen
71e6e04d77
Remove rocm detector (#16913)
* Remove rocm detector plugin

* Update docs to recommend using onnx for rocm

* Formatting
2025-03-03 08:16:14 -06:00
Nicolas Mowen
0128ec2ba6
Upgrade RocM to 6.3.3 (#16900)
* Simplify rocm install and update to 6.3.1

* Build out more necessary packages

* Update to 6.3.3

* Set bake version

* Fix typo

* Ensure NHWC is used

* Reset dev changes

* Write to cache
2025-03-02 21:46:46 -06:00
Martin Weinelt
458134de5d
Reuse constants (#16874) 2025-02-28 21:35:09 -07:00
Jason Hunter
0de928703f
Initial implementation of D-FINE model via ONNX (#16772)
* initial implementation of D-FINE model

* revert docker-compose

* add docs for D-FINE

* remove weird auto-format issue
2025-02-24 08:56:01 -07:00
Nicolas Mowen
0f0b2687af
Add support for YoloV9 to OpenVINO (#16495)
* Add support for yolov9 to OpenVINO

* Cleanup detector docs

* Fix link
2025-02-11 11:23:19 -07:00
Nicolas Mowen
198d067e25
Implement support for YOLOv9 via ONNX (#16459)
* WIP yolov9

* Implement post processing for yolov9

* Cleanup detection

* Update docs to make note of supported yolov9

* Move post processing to separate utility

* Add note about other models
2025-02-10 15:00:12 -06:00
Nicolas Mowen
9236898a9d Sub label sensors (#16218)
* Support mqtt sensors for logo attributes

* Expose in api
2025-02-08 12:47:01 -06:00
Marc Altmann
4c7d4e6c0a rockchip: update dependencies and add script for model conversion (#15699)
* rockchip: update dependencies and add script for model conversion

* rockchip: update docs

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2025-02-08 12:47:01 -06:00
Blake Blackshear
c4727f19e1
Simplify plus submit (#15941)
* remove unused annotate file

* improve plus error messages

* formatting
2025-01-11 07:04:11 -07:00
Nicolas Mowen
d57a61b50f
Simplify model config (#15881)
* Add migration to migrate to model_path

* Simplify model config

* Cleanup docs

* Set config version

* Formatting

* Fix tests
2025-01-07 20:59:37 -07:00
FL42
1b7fe9523d
fix: use requests.Session() for DeepStack API (#15505) 2024-12-14 07:54:13 -07:00
Nicolas Mowen
0e3fb6cbdd
Standardize handling of config files (#15451)
* Standardize handling of config files

* Formatting

* Remove unused
2024-12-11 18:46:42 -06:00
Nicolas Mowen
357ce0382e
Fixes (#14668)
* Fix environment vars reading

* fix yaml returning none

* Assume rocm model is onnx despite file extension
2024-10-29 15:34:07 -05:00
Nicolas Mowen
4e25bebdd0
Add ability to configure model input dtype (#14659)
* Add input type for dtype

* Add ability to manually enable TRT execution provider

* Formatting
2024-10-29 10:28:05 -05:00
Nicolas Mowen
5f77408956
Update logos handling (#14396)
* Add attribute for logos

* Clean up tracked object to pass model data

* Update default attributes map
2024-10-16 16:22:34 -05:00
Nicolas Mowen
9adffa1ef5
Detection adjustments (#14329) 2024-10-13 21:34:51 -05:00
Josh Hawkins
833768172d
UI tweaks (#14326)
* small tweaks for frigate+ submission and debug object list

* exclude attributes from labels colormap
2024-10-13 15:48:54 -06:00
Nicolas Mowen
6df541e1fd
Openvino models (#14283)
* Enable model conversion cache for openvino

* Use openvino directly for onnx embeddings if available

* Don't fail if zmq is busy
2024-10-11 10:47:23 -06:00
Rémi Bédard-Couture
dcaed0e90f
Log correct tensorRT version when debugging (#14182) 2024-10-06 15:33:03 -06:00
gtsiam
54900ae318
Properly call super() in subclasses (#14124) 2024-10-02 19:35:46 -06:00
gtsiam
bbbb3b4a06
Split config.py into multiple files (#14038)
* Replace logging.warn with logging.warning

* Install config global state early

* Split config.py into more manageable pieces
2024-09-28 14:21:42 -05:00
Nicolas Mowen
38d398c967
Dynamic attributes config (#14035)
* Add config for attribute map and generate all labels from the map

* Update docs

* Formatting

* Use the dynamic label map

* Fix check

* Fix docs typo
2024-09-28 07:49:04 -06:00
Nicolas Mowen
05fe7f8a48
Fixes & Tweaks (#14013)
* Rework to create util for onnx initialization

* Fix shm log

* Fix onClick exceptoins
2024-09-27 07:41:48 -06:00
Nicolas Mowen
a65aaab849
Fixes (#13990)
* Fix ROCm input name

* Fix incorrect parsing of None
2024-09-26 12:42:21 -05:00
Nicolas Mowen
a5595189ed
Fix ROCm inference (#13988) 2024-09-26 12:16:26 -05:00
Nicolas Mowen
062c305cd8
Remove context file (#13885) 2024-09-22 08:38:23 -06:00
Nicolas Mowen
61a4a4bc2f
Update openvino to 2024.3 (#13861) 2024-09-20 17:20:11 -05:00
Nicolas Mowen
1a51ce712c
Simplify tensorrt building (#13851)
* Simplify tensorrt building

* Use engine context cache
2024-09-20 10:49:44 -05:00
Nicolas Mowen
4515eb4637
Rocm yolonas (#13816)
* Implement ROCm detectors

* Cleanup tensor input

* Fixup image creation

* Add support for yolonas in onnx

* Get build working with onnx

* Update docs and simplify config

* Remove unused imports
2024-09-18 19:34:07 -05:00