scofield7419 /Video-of-Thought

Video Chain of Thought, Codes for ICML 2024 paper: "Video-of-Thought: Step-by-Step Video Reasoning from Perception to Cognition"

★ 1,019⑂ 7👁 3⑃ 0● 15▤ 0
PythonApache-2.0Created 2024-05-06haofei.vip/VoT/
+26
Daily
1,019
stars
7
forks
3
watchers
0
prs
15
issues
0
releases

README

🤔🎞️ Video-of-Thought: Step-by-Step Video Reasoningfrom Perception to Cognition


  ICML 2024 (Oral)



  Hao Fei,
  Shengqiong Wu,
  Wei Ji,
  Hanwang Zhang,
  Meishan Zhang,
  Mong Li Lee,
  Wynne Hsu



  
  
  
  
  
  


Video-of-Thought (VoT) brings chain-of-thought reasoning to video. It
decomposes a complex video question into five sub-problems that move from
low-level pixel perception (which objects matter, where they are, how they
move) to high-level cognition (what the actions imply, which answer is most
plausible, and whether that answer survives a perception- and commonsense-based
check). The perception side is powered by MotionEpic, a video MLLM that
reads and generates spatial-temporal scene graphs (STSGs) for fine-grained,
pixel-level grounding.

This repository is a complete, tested re-implementation of the paper:

 🧠 The VoT reasoning engine: all five steps with the paper's prompts, multiple-choice and
  open-ended QA, ranking, and verification with Step-4 re-execution. It works with any video LLM.
 🔌 An API version that needs no training: run VoT on GPT-4o/GPT-5, Claude, or any
  OpenAI-compatible server (vLLM/SGLang with Qwen2.5-VL, InternVL, ...), optionally grounded on
  STSGs from a detector + tracker or a VLM parser.
 🎞️ MotionEpic: the CLIP ViT-L/14 + Q-Former + recurrent graph transformer + Vicuna (LoRA)
  architecture, the five video–STSG grounding objectives, and the three-stage training recipe.
 📊 Benchmarks: converters and paper-style reports for NExT-QA, STAR, VLEP, IntentQA,
  Social-IQ, Causal-VidQA, MSR-VTT-QA and ActivityNet-QA, plus a resumable evaluation runner.



---

 📰 News

 2025-09 — Codebase updated with API version.
 2024-07 — VoT presented as an oral paper at ICML 2024.

 📑 Contents

Method · Installation · Quick start · API version ·
MotionEpic · Evaluation · Configuration ·
Repository layout · Citation

---

 🔍 Method

 Spatial-temporal scene graphs as the grounding interface

A video is sampled into frames; each frame carries a scene graph whose nodes are
objects (label, feature, bbox) and whose edges are subject–predicate–object
triplets. Temporal coreference edges link the same object across adjacent
frames, so a tracklet is simply a connected path through the STSG. MotionEpic
reads STSGs through a graph encoder and writes them as text, which makes the
grounding explicit, checkable and reusable by later reasoning steps.



text
Frame 1: {
    Objects: [{"car-1": [0.0, 13.4, 7.0, 8.1]}, {"street": [9.0, 13.5, 16.5, 15.0]}],
    Triplets: [("car-1", "on the left", "street")]
}
...
Temporal Coreference Edge: [
    {Frame 1 - 2: [("car-1", "car-1"), ("street", "street")]}
]


vot.stsg provides the data model, a serializer/parser for this grammar (tolerant to the
formatting slips of real model outputs), tracklet extraction, k-hop neighbour scenes and
target-to-node matching.

 MotionEpic



| Component | Paper setting | Code |
|---|---|---|
| LLM | Vicuna-7B v1.5, frozen + LoRA | vot/models/motionepic/

Top issues

Snapshot: 2026-11-28T10:06:57Z · Data license Apache-2.0 · JSON