Spaces:
Running on Zero
Running on Zero
File size: 1,631 Bytes
265c2dc b4bac7c 265c2dc b4bac7c 265c2dc b4bac7c 7d3ee2b b4bac7c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ---
title: SpaceTimeVLM
emoji: 🧭
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 6.32.0
app_file: app.py
short_description: Spatial questions about a video, answered with 3D cues
python_version: "3.12"
startup_duration_timeout: 1h
license: cc-by-nc-4.0
models:
- DarioVajda/SpaceTimeVLM-2B
- DarioVajda/SpaceTimeVLM-4B
- DarioVajda/SpaceTimeVLM-9B
---
# SpaceTimeVLM demo
Upload a video of a scene, ask a spatial question and get the answer of
[SpaceTimeVLM-2B](https://huggingface.co/DarioVajda/SpaceTimeVLM-2B),
[4B](https://huggingface.co/DarioVajda/SpaceTimeVLM-4B) or
[9B](https://huggingface.co/DarioVajda/SpaceTimeVLM-9B), or of all three on the same frames.
- The video is decoded with ffmpeg (which applies the rotation flag of phone videos) and 8, 16 or 32 frames are
sampled uniformly.
- The frames are sampled as soon as the video is added, before the question is sent.
- With the Space variable `SPACETIME_PREPARE=1`, the chosen model also runs over the frames ahead of the question
and keeps that cache, so the answer only runs the question's tokens. It is off by default: on the first test the
answer still took the full path, so preparing only cost GPU quota.
- "Short answer" wraps the question in the VSI-Bench prompt used for the benchmark scores on the model cards.
- The Space variable `SPACETIME_SIZES` (for example `2B,4B`) loads fewer models.
The models are under CC BY-NC 4.0 (non-commercial use). The example video is an excerpt of
[UE4Arch.com - Viennese apartment](https://commons.wikimedia.org/wiki/File:UE4Arch.com_-_Viennese_apartment.webm)
by UE4Arch.com (CC BY-SA 4.0).
|