-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Semantic Search for Events #8998
Conversation
…shear#8673) * Generate low res low fps previews for recordings viewer * Make sure previews end on the hour * Fix durations and decrase keyframe interval to ensure smooth scrubbing * Ensure minimized resolution is compatible with yuv * Add ability to configure preview quality * Fix * Clean up previews more efficiently * Use iterator
* Add external sub label to timeline * Include icon * Update timeline.py Co-authored-by: Sergey Krashevich <svk@svk.su> * Formatting --------- Co-authored-by: Sergey Krashevich <svk@svk.su>
) * Write a low resolution low fps stream from decoded frames (blakeblackshear#8673) * Generate low res low fps previews for recordings viewer * Make sure previews end on the hour * Fix durations and decrase keyframe interval to ensure smooth scrubbing * Ensure minimized resolution is compatible with yuv * Add ability to configure preview quality * Fix * Clean up previews more efficiently * Use iterator * Ensure final frame in preview is not duplicated * initial react/ts framework * fix gitignore glob excluding ts files * ignore folders in web-new * SWRConfig changes for swr 2.x * use frigateConfig type in websocket handlers --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* remove rtmp from python * remove rtmp from nginx * remove rtmp from docs * fix test for missing role
* Add config editor to new webUI and fix double scroll * Address review comments and enable light theme for vscode
…akeblackshear#8895) * Add support for review grid * Cleanup reloading on focus * Adjust timeline api to include metadata and before * Be more efficient about getting info * Adjust to new data format * Cleanup types * Cleanup text * Transition to history * Cleanup * remove old web implementations * Cleanup
* Add table and oveview components * Add toooltips for cards * Add storage * Undo
* Use constant aspect ratio for review grid * Add infinite scrolling * Don't have horizontal scrolling * Handle autoplay for mobile * Load more efficiently
* Add support for live views * Lint fixes * Fix width * Fix lint * Cleanup hooks
* Playback recording when clicking on review item * Add timeline overlay selector * Lint fixes * Lint fixes * Set video plays inline * Stop autoplay on open * Reverse order * Improve autoplay performance * Remove chromecast icon by default * Improve margin and remove lazy image loading to reduce jumping * Fix root margin for mobile * Fix scrolling behavior * Fix width
* Show camera dashboard * Cleanup * Cleanup * Cleanup * Cleanup * fix * Fix input color * Show recent events on dashboard
* fixup build * swap frontends
And yes, I know that I added the frontend to the old web - but the new frontend only uses timeline for now, and it does not have enough detail to perform this type of search, or filters implemented at this point in time. |
Implementation is mostly done at this point. I implemented the frontend in For the new UI, what do you think about a search bar at the top that is available on every page? When searched, it shows a styled dropdown of matching events allowing for additional filtering, downloading, or opening in the recordings/timeline viewer. ExamplesSearch for "man with brown hair and beard"Search for "golfers"Search for "black and white dog" |
…/usr/bin/env /usr/bin/python3 /home/vscode/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 40321 -- -m frigate
I've updated the docs and have been running this in production for a couple of days. I think it's ready for review now. |
@@ -337,6 +342,13 @@ def cleanup_timeline_db(db: SqliteExtDatabase) -> None: | |||
|
|||
migrate_db.close() | |||
|
|||
def init_embeddings(self) -> None: | |||
self.embeddings: Optional[Embeddings] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all of these new services I think it would be good to only run them if this has been enabled in the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the case with the client. The init method will return a ValueError if semantic_search
is not enabled and self.embeddings
will remain None
. See: https://github.com/blakeblackshear/frigate/pull/8998/files#diff-a87fb799a0f5537bd6fb9049628a14131fb21e8bc2f0fc21363d664bb6aff7feR50-R51
@@ -584,19 +597,26 @@ def start_timeline_processor(self) -> None: | |||
) | |||
self.timeline_processor.start() | |||
|
|||
def start_embeddings_processor(self) -> None: | |||
self.embeddings_processor = EmbeddingProcessor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, only start the service if enabled in the config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class will return and kill the thread immediately if semantic_search
is not enabled. See: https://github.com/blakeblackshear/frigate/pull/8998/files#diff-bb5fcf4020ca2bf73e181a7b467529ec9f574c7292f720b742014f795b82054aR47-R48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I figured that was the case but think it might be better to have it explicit in this file vs the implicit behavior. Not a big deal though
you seen this project? |
I had not until now. GPT-4 Vision can be integrated this way relatively easy as well, or that project can be updated to submit the summary as a description directly to Frigate and have it indexed and searchable. I like the use of multiple image frames representing a fuller context, but wanted to keep it relatively simple for the first implementation. |
530b0f9
to
944afd7
Compare
@blakeblackshear need to reopen this with new base branch just fyi |
Closing this for now. New PR will be forthcoming targeting the new UI for 0.14 after discussing with @NickM-27 and @blakeblackshear. |
Implementation for #8980
Still a work in progress, but far enough along to play around with if interested. I still need to implement a way to keep the Events database and the vector database in sync and add missing historical events to the vector database on startup.