Commit Graph

321 Commits

Author SHA1 Message Date
Nicolas Mowen
f9b246dbd0
Deps updates (#14556)
* Update nvidia deps

* Update python deps

* Update web deps
2024-10-24 08:48:14 -05:00
Nicolas Mowen
8ac4b001a2
Various fixes (#14410)
* Fix access

* Reorganize tracked object for imports

* Separate out rockchip build

* Formatting

* Use original ffmpeg build

* Fix build

* Update default search type value
2024-10-17 11:02:27 -05:00
Nicolas Mowen
edaccd86d6
Fix build (#14398) 2024-10-16 19:26:47 -05:00
Nicolas Mowen
9f866be110
Remove line in install deps (#14389) 2024-10-16 11:40:31 -05:00
Nicolas Mowen
06f47f262f
Use config attribute map instead of hard coded (#14387) 2024-10-16 07:27:36 -06:00
Nicolas Mowen
bc3a06178b
Embedding gpu (#14253) 2024-10-09 19:46:31 -06:00
Josh Hawkins
24ac9f3e5a
Use sqlite-vec extension instead of chromadb for embeddings (#14163)
* swap sqlite_vec for chroma in requirements

* load sqlite_vec in embeddings manager

* remove chroma and revamp Embeddings class for sqlite_vec

* manual minilm onnx inference

* remove chroma in clip model

* migrate api from chroma to sqlite_vec

* migrate event cleanup from chroma to sqlite_vec

* migrate embedding maintainer from chroma to sqlite_vec

* genai description for sqlite_vec

* load sqlite_vec in main thread db

* extend the SqliteQueueDatabase class and use peewee db.execute_sql

* search with Event type for similarity

* fix similarity search

* install and add comment about transformers

* fix normalization

* add id filter

* clean up

* clean up

* fully remove chroma and add transformers env var

* readd uvicorn for fastapi

* readd tokenizer parallelism env var

* remove chroma from docs

* remove chroma from UI

* try removing custom pysqlite3 build

* hard code limit

* optimize queries

* revert explore query

* fix query

* keep building pysqlite3

* single pass fetch and process

* remove unnecessary re-embed

* update deps

* move SqliteVecQueueDatabase to db directory

* make search thumbnail take up full size of results box

* improve typing

* improve model downloading and add status screen

* daemon downloading thread

* catch case when semantic search is disabled

* fix typing

* build sqlite_vec from source

* resolve conflict

* file permissions

* try build deps

* remove sources

* sources

* fix thread start

* include git in build

* reorder embeddings after detectors are started

* build with sqlite amalgamation

* non-platform specific

* use wget instead of curl

* remove unzip -d

* remove sqlite_vec from requirements and load the compiled version

* fix build

* avoid race in db connection

* add scale_factor and bias to description zscore normalization
2024-10-07 14:30:45 -06:00
Nicolas Mowen
9c751230a1
Include lsof in container (#14145) 2024-10-03 17:23:37 -05:00
Nicolas Mowen
e725730982
Fix shared memory frames being stuck when a camera capture crashed (#14140)
* Fix shared memory frames being stuck when a camera capture crashed

* Update ffmpeg build
2024-10-03 09:31:07 -06:00
Nicolas Mowen
18bf7f93fa
Improve rocm handling of different models (#14072)
* Improve rocm handling of different models

* Formatting

* Fix type check
2024-09-30 16:40:46 -05:00
Nokius
b54032bdc7
make the hailo user instalation script a bit more failsafe (#13992)
This will checks if the firmware folder is present if not it will created it informs the user to reboot to load the firmware for the hailo8l detector.
2024-09-28 05:55:17 -06:00
Josh Hawkins
40fe3b4358
Search functionality and UI tweaks (#13978)
* Portal tooltips

* Add ability to time_range filter chroma searches

* centering and padding consistency

* add event id back to chroma metadata

* query sqlite first and pass those ids to chroma for embeddings search

* ensure we pass timezone to the api call

* remove object lifecycle from search details for non-object events

* simplify hour calculation

* fix query without filters

* bump chroma version

* chroma 0.5.7

* fix selecting camera group in cameras filter button
2024-09-26 15:30:56 -05:00
Nicolas Mowen
20fd1db0f4
Update hailo driver to 4.18 (#13991) 2024-09-26 12:16:08 -06:00
Josh Hawkins
68465aed49
Increase healthcheck start period to 5 minutes (#13968) 2024-09-25 15:14:10 -06:00
Nicolas Mowen
fc3aac96f2
Remove incorrect (#13966) 2024-09-25 14:53:17 -05:00
Rui Alves
cffc431bf0
Frigate HTTP API using FastAPI (#13871)
* POC: Added FastAPI with one endpoint (get /logs/service)

* POC: Revert error_log

* POC: Converted preview related endpoints to FastAPI

* POC: Converted two more endpoints to FastAPI

* POC: lint

* Convert all media endpoints to FastAPI. Added /media prefix (/media/camera && media/events && /media/preview)

* Convert all notifications API endpoints to FastAPI

* Convert first review API endpoints to FastAPI

* Convert remaining review API endpoints to FastAPI

* Convert export endpoints to FastAPI

* Fix path parameters

* Convert events endpoints to FastAPI

* Use body for multiple events endpoints

* Use body for multiple events endpoints (create and end event)

* Convert app endpoints to FastAPI

* Convert app endpoints to FastAPI

* Convert auth endpoints to FastAPI

* 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

* Added starlette plugin to expose custom headers

* Use slowapi as the limiter

* Use query parameters for the frame latest endpoint

* Use query parameters for the media snapshot.jpg endpoint

* Use query parameters for the media MJPEG feed endpoint

* Revert initial nginx.conf change

* Added missing even_id for /events/search endpoint

* Removed left over comment

* Use FastAPI TestClient

* severity query parameter should be a string

* Use the same pattern for all tests

* Fix endpoint

* Revert media routers to old names. Order routes to make sure the dynamic ones from media.py are only used whenever there's no match on auth/etc

* Reverted paths for media on tsx files

* Deleted file

* Fix test_http to use TestClient

* Formatting

* Bind timeline to DB

* Fix http tests

* Replace filename with pathvalidate

* Fix latest.ext handling and disable uvicorn access logs

* Add cosntraints to api provided values

* Formatting

* Remove unused

* Remove unused

* Get rate limiter working

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-24 07:05:30 -06:00
ofcedwards
b81a8d26e4
Disable keepalive for Safari in nginx vod location (#13909) 2024-09-23 08:02:50 -06:00
Nicolas Mowen
6bafb68d77
Remove PyYAML usages and dependency (#13889) 2024-09-22 14:08:36 -05:00
Nicolas Mowen
6f2924006c
Include radeontop in arm build (#13886) 2024-09-22 10:56:30 -05: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
Sean Kelly
535bf6e4b9
Update install_deps.sh fix typo (#13842) 2024-09-19 19:21:04 -06: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
ddf3a687a3
Use intel apt for out of tree drivers (#13829) 2024-09-19 07:41:08 -06: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
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
Nicolas Mowen
90d7fc6bc5
Install no deps separately for wheel (#13799)
* Install no deps separately for wheel

* Fix order

* fix arg
2024-09-17 11:04:51 -06:00
Nicolas Mowen
f7eaace7ae
Change path for rockchip ffmpeg (#13792) 2024-09-17 07:04:38 -06:00
gtsiam
8573016bef
Formatting improvements (#13765)
* Format makefiles

* Handle all errors in rocm makefile

* Remove CURRENT_UID and GID from makefile as they are unused

* Removed unused vite.svg asset

* Sort frigate-dictionary
2024-09-17 07:39:44 -05:00
Nicolas Mowen
36d7eb7caa
Support ONNX model caching (#13780)
* Support model caching

* Cleanup
2024-09-16 18:18:11 -06: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
Nicolas Mowen
e4ea35e626
Add onnxruntime nvidia providers (#13756) 2024-09-15 20:30:30 -05:00
Nicolas Mowen
0c86c77d42
Ffmpeg 6 (#13754)
* Move back to ffmpeg 6

* Use ffmpeg 6
2024-09-15 11:42:52 -06:00
Nicolas Mowen
fc145016ea
Use smarter logic for default ffmpeg handling (#13748) 2024-09-15 09:01:15 -06: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
Nicolas Mowen
4f10f82580
Install onevpl tools for intel (#13730)
* Install onevpl tools for intel

* Use updated intel lib
2024-09-13 21:18:56 -05: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
Nicolas Mowen
641f1244dd
Update ffmpeg (#13720) 2024-09-13 09:55:42 -05:00
Nicolas Mowen
17901fcfef
Fix arm build (#13608) 2024-09-07 09:40:31 -05:00
Nicolas Mowen
149339a8d9
Install onnxruntime with openvino execution provider (#13587)
* Install onnxruntime with openvino execution provider

* Update requirements-wheels.txt

* Still include openvino
2024-09-06 14:18:48 -05:00
Nicolas Mowen
18a6aa1824
Update ffmpeg to 7.0.2 (#13578)
* Update to ffmpeg 7.0

* Reduce CPU by not changing pixel format

* Add basic vulkan support

* Adjust gamma after vaapi change

* Formatting
2024-09-05 18:27:32 -06:00
Nicolas Mowen
cf7718132a Update python deps (#13413) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
c16450adc8 Hailo amd64 support (#12820)
* Support building docker image for amd64 and arm64

* Support installations on amd64 and arm64

* Run build in new job

* Update docs
2024-08-29 20:19:50 -06:00
Nicolas Mowen
3abf89596a Disable semantic search by default (#12568)
* Disable semantic search by default and don't start processes unless enabled

* Conditionally create embeddings

* Fix typing
2024-08-29 20:19:50 -06:00
Nicolas Mowen
690ee3dc15 Implement support for notifications (#12523)
* Setup basic notification page

* Add basic notification implementation

* Register for push notifications

* Implement dispatching

* Add fields

* Handle image and link

* Add notification config

* Add field for users notification tokens

* Implement saving of notification tokens

* Implement VAPID key generation

* Implement public key encoding

* Implement webpush from server

* Implement push notification handling

* Make notifications config only

* Add maskable icon

* Use zod form to control notification settings in the UI

* Use js

* Always open notification

* Support multiple endpoints

* Handle cleaning up expired notification registrations

* Correctly unsubscribe notifications

* Change ttl dynamically

* Add note about notification latency and features

* Cleanup docs

* Fix firefox pushes

* Add links to docs and improve formatting

* Improve wording

* Fix docstring

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

* Handle case where native auth is not enabled

* Show errors in UI

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-08-29 20:19:50 -06:00
spanner3003
4a35573210 Initial support for Hailo-8L (#12431)
* Initial support for Hailo-8L

Added file for Hailo-8L detector including dockerfile, h8l.mk, h8l.hcl, hailo8l.py, ci.yml and ssd_mobilenat_v1.hef as the inference network.

Added files to help with the installation of Hailo-8L dependences like generate_wheel_conf.py, requirements-wheel-h8l.txt and modified setup.py to try and work with any hardware.

Updated docs to reflect Initial Hailo-8L support including oject_detectors.md,  hardware.md and installation.md.

* Update .github/workflows/ci.yml

typo h8l not arm64

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

* Update docs/docs/configuration/object_detectors.md

Clarity for the end user and correct uses of words

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

* Update docs/docs/frigate/installation.md

typo

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

* update Installation.md to clarify Hailo-8L installation process.

* Update docs/docs/frigate/hardware.md

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update hardware.md add Inference time.

* Oops no new line at the end of the file.

* Update docs/docs/frigate/hardware.md typo

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update dockerfile to download the ssd_modilenet_v1 model instead of having it in the repo.

* Updated dockerfile so it dose not download the model file.

add function to download it at runtime.

update model path.

* fix formatting according to ruff and removed unnecessary functions.

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-08-29 20:19:50 -06:00
Daniel
d93d6262ce Use 127.0.0.1 for chroma (#12135) 2024-08-29 20:19:50 -06:00
Jason Hunter
36cbffcc5e Semantic Search for Detections (#11899)
* 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
2024-08-29 20:19:50 -06:00
Nicolas Mowen
e01b6ee76b
Fix case where user's cgroup says it has 0 cpu cores (#13271) 2024-08-22 08:06:26 -05:00