Commit Graph

3210 Commits

Author SHA1 Message Date
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
Josh Hawkins
32c7669b28
Search UI tweaks (#13965)
* Prevent keyboard shortcuts from running when input is focused

* fix reset button and update time pickers when using input

* simplify css

* consistent button order and spacing
2024-09-25 12:45:42 -06:00
Nicolas Mowen
fef30bc671
Peroparly handle text based responses (#13964) 2024-09-25 13:35:30 -05:00
Josh Hawkins
ae547d27e4
Use not instead of is None (#13962) 2024-09-25 11:53:25 -06:00
Josh Hawkins
be3e1831d4
Add ability to use 12 hour time in input time filter (#13961) 2024-09-25 12:15:08 -05:00
Nicolas Mowen
45aceea53b
Return version as html (#13960) 2024-09-25 10:06:17 -06:00
Nicolas Mowen
25819584bd
Add ability to filter search by time range (#13946)
* Add ability to filter by time range

* Cleanup

* Handle input with tags

* fix input for time_range filter

* fix before and after filters

* clean up

* Ensure the default value works as expected

* Handle time range in am/pm based on browser

* Fix arrow

* Fix text

* Handle midnight case

* fix width

* Fix bg

* Fix bg

* Fix mobile spacing

* y spacing

* remove left padding

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-09-25 10:05:40 -06:00
Nicolas Mowen
4c24b70d47
Do not use a default value of datetime for params (#13957)
* Do not use a default value of datetime for params

* Formatting

* Remove unused

* Undo
2024-09-25 10:49:54 -05:00
Josh Hawkins
4c12673fbb
Add ability to restrict genai to objects and zones at the camera level (#13958)
* Add ability to restrict genai to labels and zones at the camera level

* fix comment

* clarify docs

* use objects instead of labels

* docs

* object list
2024-09-25 09:42:39 -06:00
Nicolas Mowen
e935db5075
Api fixes (#13955)
* Fix false positive submission

* Make sure None is not sent as rate limit
2024-09-25 08:01:08 -05:00
Josh Hawkins
a7f1f8d327
Add 1s timeout to metadata subscriber in embeddings maintainer (#13947) 2024-09-24 19:08:12 -05:00
Josh Hawkins
8c540d7210
Add error logging to genai clients (#13943) 2024-09-24 14:04:35 -06:00
Nicolas Mowen
4c4b884f8e
Review api fixes (#13942)
* Fix order of review api

* remove uneccesary params
2024-09-24 14:32:50 -05:00
Josh Hawkins
1ae521f560
regenerate description fixes (#13940) 2024-09-24 12:34:29 -06:00
Nicolas Mowen
7854e1c2c1
Fix plus api (#13937)
* Fix plus api

* Fix regenerate api
2024-09-24 12:22:11 -05:00
Nicolas Mowen
a9ff795948
More api fixes (#13936)
* Set correect return type for raw config

* Simplify parsing

* Formatting
2024-09-24 09:54:03 -06:00
Nicolas Mowen
a8e2f97260
Improve performance of image fetching (#13933) 2024-09-24 09:50:20 -05:00
Nicolas Mowen
d17253b023
Fix apis (#13932) 2024-09-24 09:27:10 -05:00
Josh Hawkins
ecbf0410eb
Regenerate genai tracked object descriptions (#13930)
* add genai to frigateconfig

* add regenerate button if genai is enabled

* add endpoint and new zmq pub/sub model

* move publisher to app

* dont override

* logging

* debug timeouts

* clean up

* clean up

* allow saving of empty description

* ensure descriptions can be empty

* update search detail when results change

* revalidate explore page on focus

* global mutate hook

* description websocket hook and dispatcher

* revalidation and mutation

* fix merge conflicts

* update tests

* fix merge conflicts

* fix response message

* fix response message

* fix fastapi

* fix test

* remove log

* json content

* fix content response

* more json content fixes

* another one
2024-09-24 08:14:51 -06: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
gtsiam
dc54981784
Move more things out of FrigateApp (#13897)
* Moved FrigateApp.init_config() into FrigateConfig.load()

* Move frigate config loading into main

* Store PlusApi in FrigateConfig

* Register SIGTERM handler in main

* Ensure logging is setup during config parsing

* Removed pointless try

* Moved config initialization out of FrigateApp

* Made FrigateApp.shm_frame_count into a function

* Removed log calls from signal handlers

python's logging calls are not re-entrant, which caused at least one of
these to deadlock randomly.

* Reopen stdout/err on process fork

This helps avoid deadlocks (https://github.com/python/cpython/issues/91776).

* Make mypy happy

* Whoops. I might have forgotten to save.

Truly an amateur mistake.

* Always call FrigateApp.stop()
2024-09-24 07:07:47 -05:00
Josh Hawkins
a7ed90f042
try deleting zoom spaces if disabled (#13915) 2024-09-23 15:34:08 -05:00
Nicolas Mowen
08941ab39a
Improve hailo docs (#13910)
* Fix command for hailo8 install

* Update object_detectors.md
2024-09-23 09:53:54 -05:00
ofcedwards
b81a8d26e4
Disable keepalive for Safari in nginx vod location (#13909) 2024-09-23 08:02:50 -06:00
Nicolas Mowen
af84af7b7a
Don't print error for requesting camera info (#13905) 2024-09-23 08:49:34 -05:00
Josh Hawkins
0f813962be
Chroma fixes (#13902)
* Ensure descriptions saved in chroma are non-empty

* delete only existing ids in event cleanup

* add debug logging
2024-09-23 06:53:19 -06:00
Josh Hawkins
fe57f7f489
Search UI tweaks (#13903) 2024-09-23 06:39:20 -06:00
Sean Kelly
12e2c04486
Decrease number of X ticks on system and camera graphs (#13891) 2024-09-22 15:57:19 -06:00
Nicolas Mowen
6bafb68d77
Remove PyYAML usages and dependency (#13889) 2024-09-22 14:08:36 -05:00
gtsiam
e8763b3697
Removed usage of PyYAML for config parsing. (#13883)
* Ignore entire __pycache__ folder instead of individual *.pyc files

* Ignore .mypy_cache in git

* Rework config YAML parsing to use only ruamel.yaml

PyYAML silently overrides keys when encountering duplicates, but ruamel
raises and exception by default. Since we're already using it elsewhere,
dropping PyYAML is an easy choice to make.

* Added EnvString in config to slim down runtime_config()

* Added gitlens to devcontainer

* Automatically call FrigateConfig.runtime_config()

runtime_config needed to be called manually before. Now, it's been
removed, but the same code is run by a pydantic validator.

* Fix handling of missing -segment_time

* Removed type annotation on FrigateConfig's parse

I'd like to keep them, but then mypy complains about some fundamental
errors with how the pydantic model is structured. I'd like to fix it,
but I'd rather work towards moving some of this config to the database.
2024-09-22 10:56:57 -05:00
Nicolas Mowen
6f2924006c
Include radeontop in arm build (#13886) 2024-09-22 10:56:30 -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
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
Sean Kelly
535bf6e4b9
Update install_deps.sh fix typo (#13842) 2024-09-19 19:21:04 -06:00
Josh Hawkins
515f06ba6c
small spacing tweaks and fix config editor schema load (#13841) 2024-09-19 17:36:07 -06:00
Josh Hawkins
6c43e5dba9
Display warning when search embeddings models are being downloaded (#13840) 2024-09-19 16:14:20 -05: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
27e71eb142
Improve navigation (#13833)
* Fix infinite loop

* Fix review page not opening to historical review items

* Use query arg for search and remove unused recording opening

* Retain query

* Clean up typing
2024-09-19 11:01:57 -05:00
Nicolas Mowen
7c63cb5bca
Do not handle object if data is None (#13830) 2024-09-19 07:51:07 -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
Josh Hawkins
efd1194307
Improved search input (#13815)
* create input with tags component

* tweaks

* only show filters pane when there are actual filters

* special case for similarity searches

* similarity search tweaks

* populate suggestions values

* scrollbar on outer div

* clean up

* separate custom hook

* use command component

* tooltips

* regex tweaks

* saved searches with confirmation dialogs

* better date handling

* fix filters

* filter capitalization

* filter instructions

* replace underscore in filter type

* alert dialog button color

* toaster on success
2024-09-18 12:18:16 -06:00
Nicolas Mowen
5e0d8fe4c7
Make note of multi-model on GPU support (#13813)
* Make note of multi-gpu support

* fix typo
2024-09-18 12:05:27 -06: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