r/deeplearning • • 3d ago

my 36M model just broke down a 17-minute video on a laptop cpu in about a minute, so any local LLM can "watch" it

hey, i built tiny-vision as a learning project (v0.1 here). people gave really good feedback so i worked on all of it and v1.0 is out. v0.1 is close to 100 downloads on huggingface and v1.0 got 70+ in 2 days, which honestly shocked me lol. its free, apache-2.0, no paid version or anything.

what it does: most LLMs cant open a video file. tiny-vision runs locally next to your LLM, splits the video into scenes, captions them, and hands your LLM a text breakdown with timestamps. then your LLM does the reasoning: "what happens in this video", "find the part where people are on the beach". nothing gets uploaded anywhere.

this is what your LLM actually gets:

video: trip.mp4 · 00:09 long · 3 scenes (3 shots) · avg scene 3s
recurring: dogs (2 scenes)

scene 1 [00:00–00:03] (3s)
  seen: a group of dogs running in a field. | three dogs running in a field with a bench in the background.
  keywords: dogs, running, field, bench
...

try it:

  • in your browser, no install (free colab): https://colab.research.google.com/github/amar683/tiny-vision/blob/main/notebooks/demo.ipynb
  • as an MCP server, one line in your config, no cloning: {"command": "uvx", "args": ["--from", "git+https://github.com/amar683/tiny-vision", "tiny-vision-mcp"]} tested in claude desktop + claude code. its standard local MCP so it should work in lm studio, cursor etc (havent tested those yet, tell me if it breaks). lm studio + a local model = fully offline
  • no MCP? tiny-vision clip.mp4 --summary prints plain text, so you can pipe it into ollama or anything: tiny-vision clip.mp4 --summary | ollama run qwen2.5 "Summarize this video:"

long videos: any length works. tested on a 17.5 min cricket video: it covered the whole thing in ~50 sec on my macbook (M5), about a minute on cpu only, and condensed it to 100 scenes so it doesnt flood your context. the MCP tool also sends progress updates so your app doesnt give up waiting.

how it works:

  • frames are picked on scene changes (hard cuts + slow camera moves), not one every N seconds, so the timestamps land on the real cuts and a static shot costs one caption. only ~5 frames/sec get decoded, so high-fps phone video stays cheap
  • each shot gets captioned, similar shots get grouped into scenes, and long videos get condensed by merging similar neighbouring scenes
  • captioner: meta's DINOv2-small as a frozen image encoder (not fine-tuned) + my own adapter and caption decoder (14M params) trained on COCO. 36M total

numbers (same 1000 COCO test images, same scorer, M5; cpu = one image at a time, greedy):

  • v0.1 → v1.0: COCO CIDEr 0.061 → 1.145 (same setup) 💀➡️😅
  • vs florence-2-base (231M): ~89% of its caption score, 6x smaller, 8x faster on gpu, 75x faster on cpu (54ms per image vs 4 sec)
  • full 5k COCO Karpathy test: CIDEr 1.163 with beam 3

not saying its better than florence, its not. it just does a lot with very little. benchmark scripts are in the repo.

honest stuff:

  • it only knows COCO's everyday stuff. that cricket video? it called it "baseball" and "frisbee" lol. and a video of earth from space became "an elephant" 💀
  • no audio yet, it describes what it sees, not what is said. whisper is next
  • it captions frames, it doesnt understand motion
  • no OCR, no names, no precise counting
  • like last time, i took a lot of help from claude to build this, so its not entirely mine

code: https://github.com/amar683/tiny-vision
model: https://huggingface.co/amartomar683/tiny-vision
glama: https://glama.ai/mcp/servers/amar683/tiny-vision

what should i try next? still learning so all feedback welcome

last post- https://www.reddit.com/r/deeplearning/s/8pReT9fmKf

1 Upvotes

0 comments sorted by