Spaces:
Running on Zero
Running on Zero
File size: 3,408 Bytes
4790c3a fed954e 4790c3a 5b9f834 4790c3a fed954e 4790c3a fed954e 5b9f834 | 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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | ---
title: Qwen Runner Vision — 12-Task Extraction + Fusion
emoji: 🧩
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 6.20.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Image → 12-task JSON + fused prompt on ZeroGPU
---
# Qwen Runner Vision — deterministic 12-task extraction + fusion
**Stick an image in → get a full JSON readout.** This Space showcases the vision
half of [`qwen-test-runner`](https://github.com/AbstractEyes/qwen-test-runner): a
**deterministic-first** pipeline that replaces a hallucinating VLM with hand-picked
Apache/MIT specialist models, one per task, then **fuses** everything into one
relational scene and a byte-deterministic prompt.
It runs the **batched extraction structure** on **ZeroGPU**.
## What comes out
Per image, the full readout:
- **12 task JSONs** — 11 from the specialist/derive engine
(`image_classification`, `bbox_grounding`, `ocr_text`, `data_type_differentiation`,
`data_type_utilization`, `structural_spatial_awareness`, `depth_analysis`,
`subject_fixation`, `segmentation`, `outline_association`, `style_structural_awareness`)
plus `semantic_association` from the fusion tier — with a per-task **schema-validity** map.
- **`FusedScene`** — entities (dedup + left-to-right ids), relations, the attribute
**ownership cascade** and the **shared basin** (uncertainty stored, never guessed),
a voted scene block, and a quality/accounting block.
- **`prompt_fused`** — the deterministic natural-language prompt, plus `fusion_confidence`.
- **Overlays** — detection boxes, SAM mask fills, subject box, outline, and a depth heatmap.
- **Download** — one row in the production column shape
(`tasks_json`, `tasks_valid`, `fused_json`, `prompt_fused`, `fusion_confidence`,
`proc_width/height`, plus `struct_*`/`age_audit` when those toggles are on).
## Everything is a toggle
It's a *multiple-possibility system*: **structurer** (`off` / Qwen3.5-0.8B / Qwen3.5-9B for
caption enrichment) · **tasks** (which to run/show) · **vocab** (COCO-80 / shapes / custom
phrases) · **specialists** (OCR, SAM masks, depth on/off) · **detection** (box/text
thresholds) · **fusion** (`t_own`, `t_margin`, `dedup_iou`, coord space) · **batch**
(`extract_batch`, `gdino_batch`) · optional **age-gate** pre-filter.
The core path needs no captions: the fusion attribute-ownership and shared-basin machinery
light up when you supply captions and pick a structurer, but entities/relations/scene come
from the image alone.
## Model ledger (Apache-2.0 — redistributable)
| role | checkpoint |
|---|---|
| detection (hub) | `IDEA-Research/grounding-dino-base` |
| segmentation | `facebook/sam-vit-base` |
| depth | `depth-anything/Depth-Anything-V2-Small-hf` |
| classification / style | `google/siglip2-so400m-patch14-384` |
| OCR | EasyOCR |
| structurer (optional) | `Qwen/Qwen3.5-0.8B` · `Qwen/Qwen3.5-9B` |
| age gate (optional) | `nateraw/vit-age-classifier` |
## Hardware
Select **ZeroGPU** in the Space's hardware settings. `large` (48 GB) is enough for the
default config and the 0.8B structurer; the 9B structurer wants `xlarge` (96 GB). The
fusion tier is CPU-only (torch-free) and runs off the GPU.
Full-corpus production (streaming an HF dataset → published `{src}-fused` parquet shards)
runs in Colab via `colab/produce_fused_dataset.py` — this Space is the interactive showcase. |