Problem
Classic video analytics systems handle only narrow events, such as license plates or line crossing. Multimodal LLMs can answer open questions about video, but only on very short clips and with serious hardware. Converting every frame to text with a large model and then running standard RAG is too slow and expensive for indexing long recordings. An MTS AI researcher wanted a general system that answers free-form requests over long video without heavy hardware.
Example from the article: a surveillance user asks "find frames with yellow taxi cars" or "warn me if a fire or a fight happens in the frame".
Solution in brief
Leave the language model out of indexing. Embed sampled frames with a small CLIP image encoder, store the vectors in FAISS, and embed the text query with the same CLIP model. Search is a nearest-neighbour lookup, and language models are optional add-ons for query translation and answer checking.
Questions this case answers
- How to search large collections of unstructured media by a free-text query on modest hardware when per-item captioning with a large model is too slow and costly
- How to let users configure a detection system with natural-language requests instead of retraining a model for every new event type
- How to search long video recordings by a free-text request without running a heavy multimodal model on every frame?
- How to let a user find frames such as 'yellow taxi' or 'fire' in a video when the system is not pre-trained on those events?
Tools and methods
- CLIP — one model that puts frames and text queries into the same vector space
- FAISS — vector database for fast nearest-neighbour search over frame vectors
- ffmpeg, OpenCV — extract frames from video
- LLM via API (optional) — translates the query into English, ideally to a single keyword
- Multimodal LLM (optional) — comments on found frames and drops false positives
- telethon — Telegram bot interface that bypasses the 20 MB file limit of telebot
Google or a one-time email code. No password.