Video understanding pipeline
Index video by scene with captions, keyframe embeddings and aligned transcripts, then answer questions with timestamped citations while measuring grounding IoU and counting hallucinations.
The capstone and what it builds on
- 1Video Understanding Pipeline (Scene, QA, Search)The capstone brief
- 2Video Understanding - Temporal ModelingPhase 4: Computer vision
- 3Video-Language Models: Temporal Tokens and GroundingPhase 12: Multimodal AI
- 4Long-Video Understanding at Million-Token ContextPhase 12: Multimodal AI
- 5CLIP and Contrastive Vision-Language PretrainingPhase 12: Multimodal AI
- 6Whisper - Architecture & Fine-TuningPhase 6: Speech and audio
- 7Multimodal RAG and Cross-Modal RetrievalPhase 12: Multimodal AI
- 8Advanced RAG (Chunking, Reranking, Hybrid Search)Phase 11: LLM engineering and RAG
What You'll Build
A video QA system: videos are cut into scenes, each scene gets a VLM caption, a keyframe embedding and an aligned transcript slice, all stored in a multi-vector index. Questions run against all three representations, the best scene's time window is refined, and a VLM answers with (video, start, end) citations and frame previews. You measure grounding IoU and report accuracy separately for counting, action-order and descriptive questions.
Requirements
- Ingest local MP4s or URLs you are allowed to use; downscale if needed and persist
{video_id, file_path}. - Scene segmentation (PySceneDetect or TransNetV2) producing
{scene_id, start_ms, end_ms, keyframe_path}. - ASR with word timestamps (faster-whisper or Whisper) sliced per scene.
- Per-scene VLM caption plus a keyframe embedding (CLIP or SigLIP class).
- Multi-vector index with three named vectors (caption, keyframe, transcript) and payload
{video_id, scene_id, start_ms, end_ms, keyframe_path}. - Query: three dense searches merged with reciprocal rank fusion, top-k scenes.
- Temporal grounding that refines (start, end) within the top scene, for example by scoring sampled frames or transcript word timestamps against the query.
- VLM synthesis given the query, top scenes (frames) and transcripts, required to cite
(video_id, start_ms, end_ms)and return frame previews. - Evaluation on at least 50 questions you write with gold time windows (at least 10 counting, 10 action-order, the rest descriptive): mean IoU and recall at IoU 0.5 for grounding, QA accuracy overall and per class, and ingest throughput (video hours per compute hour or per dollar).
- UI with timestamp links, a thumbnail strip and jump-to-frame playback.
Constraints
- Model-agnostic: any OpenAI-compatible endpoint (including the KatalockAi API) or a local model (for example via Ollama, llama.cpp or vLLM) may be used. No named commercial model is required; record which model you used in the README. The answerer and captioner must accept images (a local VLM such as Qwen2.5-VL 3B or SmolVLM, or any hosted VLM).
- Hardware: a GPU (free Colab or similar) speeds up captioning and ASR. CPU path: PySceneDetect, faster-whisper small, a small CLIP and a small or hosted VLM on about 2 hours of video.
- Substitution: the lesson ingests 100 hours and reports ActivityNet-QA and NeXT-GQA. Here at least 2 hours across 10 or more videos plus your own 50-question set are accepted; a 50-question slice of a public benchmark is optional.
- Respect video licences: use your own recordings or openly licensed content and do not commit large video files.
Stretch Goals
- Compare a pooled single vector per scene against the multi-vector index.
- Build a strict counting mode that lists each counted instance with a timestamp for the user to verify.
- Add speaker diarisation and support "what did speaker X say about Y" queries.
How to Submit
- Public GitHub repo with
ingest/,index/,query/,grounding/,eval/(questions with gold windows, results),ui/andREADME.md. - README: video sources and licences, how to ingest and ask, results per question class, IoU numbers, throughput and limitations.
- Paste the eval output, three example answers with timestamps (one counting, one action-order) and the ingest throughput numbers.
How It's Reviewed
Professor Katalock reads your repository and the evidence you paste, and scores each criterion out of 100. You pass with a weighted total of 70 or more and no criterion below 40. A copied or padded submission is flagged and fails.
Submit
Push your work to a public GitHub repository with a README that explains how to run it, then paste the evidence below. Up to 3 reviews a day, free.
- Eval output: mean IoU, R@0.5, accuracy overall and per class
- Three example answers with timestamps and frame previews (one counting, one action-order)
- Ingest throughput numbers with hardware
- Description or screenshot link of the UI with thumbnail strip
- Short reflection on why counting questions failed where they did
Reviews are done by AI against the rubric above. They check the evidence in your repository; they are not a substitute for a human code review, and a review can be wrong. If you think it is, improve the README so the evidence is unmistakable and resubmit.