Commit Graph

1432 Commits

Author SHA1 Message Date
Rui Alves
78c1103239 Use FastAPI TestClient 2024-09-21 15:12:50 +01:00
Rui Alves
83def10dc3 Removed left over comment 2024-09-21 15:03:56 +01:00
Rui Alves
ebda6597cc Added missing even_id for /events/search endpoint 2024-09-21 14:16:19 +01:00
Rui Alves
8a3f512d5a Merge branch 'fastapi-poc-media-endpoints' into fastapi-poc-notification-preview
# Conflicts:
#	frigate/__main__.py
#	frigate/api/event.py
2024-09-21 14:15:21 +01:00
Rui Alves
06055a2483 Merge branch 'fastapi-poc' into fastapi-poc-media-endpoints 2024-09-21 14:10:54 +01:00
Rui Alves
baa4cf64f0 Merge branch 'dev' into fastapi-poc 2024-09-21 14:10:37 +01:00
Rui Alves
d1146a9d27 Use query parameters for the media MJPEG feed endpoint 2024-09-21 14:01:03 +01:00
Rui Alves
c33327175a Use query parameters for the media snapshot.jpg endpoint 2024-09-21 12:48:13 +01:00
Rui Alves
17788bb9c7 Use query parameters for the frame latest endpoint 2024-09-21 12:36:47 +01:00
Rui Alves
6dadeeb488 Use slowapi as the limiter 2024-09-21 12:00:10 +01:00
Nicolas Mowen
61a4a4bc2f
Update openvino to 2024.3 (#13861) 2024-09-20 17:20:11 -05:00
Josh Hawkins
176af55e8c
Fix similarity search (#13856)
* add event_id param to api

* exclude query from filtertype

* update review pane link for similarity search

* update filter group for similarity param and fix switch bug

* unneeded prop

* update query and input for similarity search param

* use undefined instead of empty string for query with similarity search
2024-09-20 12:05:55 -05:00
Nicolas Mowen
1a51ce712c
Simplify tensorrt building (#13851)
* Simplify tensorrt building

* Use engine context cache
2024-09-20 10:49:44 -05:00
Rui Alves
fb804bac4e Added starlette plugin to expose custom headers 2024-09-20 11:15:50 +01:00
Nicolas Mowen
d498fabe72
Update ffmpeg to 7 and update intel hwaccel docs (#13834)
* Update ffmpeg to 7 and update intel hwaccel docs

* Formatting

* Redo early gen naming

* Add gamma back in

* Fix table

* Add link to intel docs

* Add hwaccel arg for disabling gamma

* Formatting

* Fix tests

* Formatting

* Fix nvidia
2024-09-19 13:29:58 -06:00
Nicolas Mowen
7c63cb5bca
Do not handle object if data is None (#13830) 2024-09-19 07:51:07 -06:00
Rui Alves
8f8d8e1e4c Removed flask app in favour of FastAPI app. Implemented FastAPI middleware to check CSRF, connect and disconnect from DB. Added middleware x-forwared-for headers 2024-09-19 10:17:14 +01:00
Rui Alves
655d24a653 Convert auth endpoints to FastAPI 2024-09-19 08:41:59 +01: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
Nicolas Mowen
e44a9e8921
Use cpu provider for embeddings models (#13806) 2024-09-17 17:20:18 -05:00
Josh Hawkins
ff9e1da1de
Revert "Rewrite yaml loader (#13803)" (#13805)
This reverts commit 38ff46e45c.
2024-09-17 15:03:22 -06:00
Nicolas Mowen
1ed8642010
Refactor onnx providers (#13804)
* Ensure dirs exist for model caches

* Formatting

* Don't use tensorrt for embeddings
2024-09-17 15:54:44 -05:00
gtsiam
38ff46e45c
Rewrite yaml loader (#13803)
* Ignore entire __pycache__ folder instead of individual *.pyc files

* Rewrite the yaml loader to match PyYAML

The old implementation would fail in weird ways with configs that were
incorrect in just the right way. The new implementation just does what
PyYAML would do, only diverging in case of duplicate keys.

* Clarify duplicate yaml key ValueError message

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

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-17 15:52:55 -05:00
Nicolas Mowen
2362d0e838
Override onnx clip loading (#13800)
* Set caching options for hardware providers

* Always use CPU for searching

* Use new install strategy to remove onnxruntime and then install post wheels
2024-09-17 13:24:35 -06:00
gtsiam
edababa88e
Work through most of the cspell warnings in python (#13794) 2024-09-17 10:41:46 -05:00
gtsiam
1c24f0054a
Make logging code self-contained (#13785)
* Make logging code self-contained.

Rewrite logging code to use python's builting QueueListener, effectively
moving the logging process into a thread of the Frigate app.

Also, wrap this behaviour in a easy-to-use context manager to encourage
some consistency.

* Fixed typing errors

* Remove todo note from log filter

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

* Do not access log record's msg directly

* Clear all root handlers before starting app

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-17 08:26:25 -05:00
Rui Alves
11186b4e70 Convert app endpoints to FastAPI 2024-09-17 10:14:04 +01:00
Rui Alves
747f72b0fc Convert app endpoints to FastAPI 2024-09-17 10:04:31 +01:00
Rui Alves
db2d65b78e Use body for multiple events endpoints (create and end event) 2024-09-17 09:34:43 +01:00
Nicolas Mowen
36d7eb7caa
Support ONNX model caching (#13780)
* Support model caching

* Cleanup
2024-09-16 18:18:11 -06:00
Nicolas Mowen
4fc8d33d31
Fix detections logic (#13781) 2024-09-16 18:23:10 -05:00
Nicolas Mowen
2f69f5afe6
Add support for yolonas via ONNX and allow TensorRT execution provider to work correctly (#13776)
* Add support for yolonas in onnx

* Add correct deps

* Set ld library path

* Refactor cudnn to only be used in amd64

* Add onnx to docs and add explainer at the top

* Undo change

* Update comment

* Remove uneccesary

* Remove line change
2024-09-16 16:17:31 -05:00
Josh Hawkins
9bcb928715
check for onvif movement support before attempting movement (#13771) 2024-09-16 10:46:35 -06:00
Rui Alves
55d33cebb8 Use body for multiple events endpoints 2024-09-16 16:53:22 +01:00
Josh Hawkins
e3edcf057c
write prompts for genai at the camera level (#13767) 2024-09-16 08:46:11 -06:00
Nicolas Mowen
06ccf7e9e9
Always close connection to shm frame after detection (#13766) 2024-09-16 07:56:20 -06:00
Rui Alves
1b601b8c35 Convert events endpoints to FastAPI 2024-09-16 10:44:03 +01:00
Rui Alves
cc259736da Fix path parameters 2024-09-15 18:48:36 +01:00
Rui Alves
ce1c048adc Convert export endpoints to FastAPI 2024-09-15 18:45:37 +01:00
Nicolas Mowen
0c86c77d42
Ffmpeg 6 (#13754)
* Move back to ffmpeg 6

* Use ffmpeg 6
2024-09-15 11:42:52 -06:00
Rui Alves
349891b0a6 Convert remaining review API endpoints to FastAPI 2024-09-15 18:29:42 +01:00
Rui Alves
640dce6bc2 Convert first review API endpoints to FastAPI 2024-09-15 17:40:23 +01:00
Rui Alves
023f1431f2 Convert all notifications API endpoints to FastAPI 2024-09-15 17:08:41 +01:00
Nicolas Mowen
fc145016ea
Use smarter logic for default ffmpeg handling (#13748) 2024-09-15 09:01:15 -06:00
Rui Alves
1f11d825ef Merge branch 'fastapi-poc' into fastapi-poc-media-endpoints
# Conflicts:
#	frigate/api/media.py
2024-09-15 14:46:23 +01:00
Rui Alves
aa82e56db6 Merge branch 'dev' into fastapi-poc 2024-09-15 14:40:24 +01:00
Nicolas Mowen
d5acd11164
Ffmpeg fixes (#13739)
* Only include hwaccel args if detect is being used

* Include both libmfx libraries
2024-09-14 13:22:03 -05:00
Nicolas Mowen
088a0fb4a5
Ffmpeg cleanup (#13737) 2024-09-14 07:03:39 -06:00
Josh Hawkins
5aee70ac7a
Explore view fixes (#13726)
* return description consistently under data object

* description type

* navigate to history view from explore video tab
2024-09-13 14:44:31 -06:00
Nicolas Mowen
5ff476c6f9
Configurable ffmpeg (#13722)
* 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
2024-09-13 15:14:51 -05:00