Photo curation pipeline (1/3): cheap local pre-filters (blur, exposure, aspect, dedupe) #5

Closed
opened 2026-10-14 11:03:03 +00:00 by xrisk · 7 comments
Owner

Goal

Add a zero-model, deterministic pre-filter stage to the clock-photo ingest pipeline that enriches per-image metadata with quality metrics, stage-local verdicts and reasons (blur, exposure, resolution, aspect, duplicates). Stage 1 does not remove images or decide final use; the final pipeline combines stage evidence under an explicit selection policy. Measure real batch throughput rather than promise milliseconds.

This is stage 1 of a 3-stage photo-curation pipeline. Overall goal: only photos that look good as a living-room TV wallpaper (the full-screen clock background) should make it into clock photo sets. Companion stages, filed as separate issues: stage 2 = Clef decision-model judge (local M1), stage 3 = LAION aesthetic predictor baseline. Work on this issue independently; do not implement the other stages.

Why

The clock background renders full-screen on a TV over AirPlay. Junk photos (motion blur, under/over-exposure, tiny archival scans, duplicates) waste model-judge time and degrade the kiosk. Cheap heuristics kill most of this for free, with no model download and no network.

What to build

A maintainer-run Python script under scripts/ (follow the style of scripts/discover-clock-photos.py: argparse, stdlib-first, ROOT/MANIFEST constants, self-documenting docstring with usage examples). It scans a photo set (or the whole manifest) and writes per-photo verdicts + reasons to a JSON sidecar, written atomically (temp file beside the target + mv — see the atomic-write rule in .wiki/wiki/references/task-routing.md → "Clock photos").

Filters to evaluate (keep it simple; calibrate thresholds on the existing pool):

  • Resolution — decoded original bytes after EXIF orientation: width ≥1920 and height ≥1080 for no-upscale 16:9 cover on the current AirPlay display. Measure before thumbnailing/preparation; do not use API dimensions or prepared 1280px downloads as original evidence.
  • Aspect ratio — near 16:9 preferred; flag anything that would lose too much subject in a center cover-crop (extreme panoramas, tall portraits).
  • Blur — Laplacian variance below a calibrated threshold (numpy/OpenCV).
  • Exposure — histogram stats: mean brightness, % blown highlights, % crushed shadows; flag too-dark / flat / blown-out images (a living room is a bright ambient environment).
  • Near-duplicates — perceptual hash (e.g. imagehash average/phash) against the set.
  • Handle EXIF orientation explicitly (transpose before measuring).

Deps: Pillow + numpy (+ imagehash; opencv-python-headless only if a numpy Laplacian is inadequate). No torch, no ML stack or model downloads. Scorer is offline; original acquisition is explicitly invoked network work. Measure actual throughput.

Where it plugs in

Current ingest flow (see scripts/discover-clock-photos.py docstring):
discover-clock-photos.py (Openverse discovery) → fetch-clock-photos.sh (build-time download) → --clock-photo-probe (Vision segmentation fills clockY/depth) → gen-photo-credits.py.

Required ingest route: discover → acquire/retain full-resolution originals → stage-1 metadata → later-stage evidence → final selection policy → selected render-asset preparation / Vision bake → final output manifest + credits. Stage 1 recommends; a future explicit consumer policy may skip model/Vision work for unusable originals. Existing probe/bake and runtime selection remain unchanged in the draft.

Original acquisition is included in this issue and PR #10: explicit maintainer command scripts/fetch-clock-originals.py new-york, separate ignored worktree-local storage and hashed atomic download receipts, resume/retry, no build hook or app/shared-cache mutations. Include all 518 New York entries (505 download URLs plus 13 seeds resolved from Commons File pages). Retain raw bytes without resizing/reencoding. Acquisition and analysis resource limits must produce honest error evidence, not silently reduced originals.

Repo context (read first)

  • AGENTS.md — product constraints + source-control workflow: work in a git worktree under .worktrees/ on a feat/… branch (e.g. git worktree add .worktrees/<short> -b feat/<short>); commit freely on the branch; run make test (selftest + jstest) before proposing a merge; never merge/fast-forward/push to main without explicit operator confirmation; push to remote only when asked.
  • .wiki/_index.md + .wiki/wiki/references/task-routing.md — canonical routing; the "Clock photos" section documents the manifest, the probe, the atomic-write rule, and the on-demand image push path. (Note: the wiki says the manifest lives at Resources/photos/manifest.json; the actual path is Sources/TVDashboard/Resources/photos/manifest.json.)
  • Manifest (single source of truth): Sources/TVDashboard/Resources/photos/manifest.json — per-photo file/caption/credit/date/author/license/source/downloadUrl/clockY/depth. Read Sources/TVDashboard/Clock/ClockPhotoLibrary.swift to see how it is loaded and whether adding a curation field needs tolerant decoding (the config tolerant-decode gotcha in task-routing applies to DashboardConfig; check the manifest loader too).
  • Kiosk constraints: the TV view is read-only and glanceable. Curation is an operator-time maintainer tool — it must not add any UI, controls, or settings to the TV-facing app, and the app must stay resilient offline (filtering happens at ingest time, never at display time).
  • Update .wiki/ (and commit the change on your feature branch) if you introduce a durable route, convention, or decision.

Decisions already made (do not re-litigate)

  • No Jev (TypeSafe): closed-source, API-only, text-only — rejected.
  • No Cloudflare Workers AI API path for Clef — not planned for now; everything is local on the M1 Pro.
  • This stage is heuristics only. ML judging is stage 2; the aesthetic baseline is stage 3.

Acceptance criteria

  • Acquire full-resolution New York originals separately; report coverage/download errors and stage-1 results on those bytes.
  • Script measures batch throughput and writes atomic metadata sidecar with per-photo metrics, stage-local verdicts and machine-readable reasons. No source removals or implicit final selection.
  • Thresholds are documented and calibrated against the existing pool (show the score distributions, not just magic numbers).
  • No heavyweight deps; offline deterministic scoring. Network confined to explicit original acquisition.
  • make test still passes.

Metadata location / schema decisions (operator confirmed 2026-10-15)

  • Keep source attribution manifest unchanged. Stage 1 enriches metadata in generated, ignored .photo-curation/prefilter.json (explicit per-set output paths allowed), not a runtime Application Support cache or committed pool output.
  • Commit the structural schema: docs/photo-prefilter.schema.json. Records join on (set_id, file, sha256) with report-level analysis/config/provenance. Metrics and stage-local verdict/reasons remain distinct from final eligibility.
  • Later stages append their evidence; final versioned policy decides use and generates output membership. The stage-evidence merger/final policy is not yet implemented. Missing/error/stale evidence must not imply eligibility.
  • Full-resolution acquisition uses .photo-curation/originals/<set>/ and downloads.json, schema docs/photo-original-download.schema.json. Original and derived asset hashes/dimensions must not be conflated.

Current New York prepared-pool evidence

Analysis v2 scanned all 518 local prepared images and the built app resource copy read-only; reports identical including byte hashes. 518 decoded, 0 errors, 0 pass / 518 reject / 0 review. Times 5.483s / 5.511s (~94 images/s). Every image fails resolution because build fetch downsizes to 1280px long edge (510 exactly 1280px; largest long edge 1687px, max oriented width 1280px). This does NOT prove originals are low-res.

Other overlapping flags: crop review 193, extreme crop 1, dark exposure 6, crushed shadows 3, blown highlights 1, low contrast 1, low blur metric 1, near duplicate 7, exact duplicates 0. Ignoring resolution solely as a diagnostic: 317 pass / 200 review / 1 reject, not eligible outputs. See repository docs for distributions/commands.

Full-resolution acquisition is authorized and running as part of PR #10; original-byte analysis and real flagged-image review remain pending. Scorer limits (32MiB/40M pixels) can yield errors for large originals. Runtime preparation also has a separate 1600px/q0.7 limit; no render change is included so far.

# Goal Add a **zero-model, deterministic pre-filter stage** to the clock-photo ingest pipeline that enriches per-image metadata with quality metrics, stage-local verdicts and reasons (blur, exposure, resolution, aspect, duplicates). Stage 1 does not remove images or decide final use; the final pipeline combines stage evidence under an explicit selection policy. Measure real batch throughput rather than promise milliseconds. This is **stage 1 of a 3-stage photo-curation pipeline**. Overall goal: *only photos that look good as a living-room TV wallpaper (the full-screen clock background) should make it into clock photo sets.* Companion stages, filed as separate issues: stage 2 = Clef decision-model judge (local M1), stage 3 = LAION aesthetic predictor baseline. Work on this issue independently; do **not** implement the other stages. # Why The clock background renders full-screen on a TV over AirPlay. Junk photos (motion blur, under/over-exposure, tiny archival scans, duplicates) waste model-judge time and degrade the kiosk. Cheap heuristics kill most of this for free, with no model download and no network. # What to build A maintainer-run Python script under `scripts/` (follow the style of `scripts/discover-clock-photos.py`: argparse, stdlib-first, `ROOT`/`MANIFEST` constants, self-documenting docstring with usage examples). It scans a photo set (or the whole manifest) and writes per-photo verdicts + reasons to a JSON sidecar, written **atomically** (temp file beside the target + `mv` — see the atomic-write rule in `.wiki/wiki/references/task-routing.md` → "Clock photos"). Filters to evaluate (keep it simple; calibrate thresholds on the existing pool): - **Resolution** — decoded original bytes after EXIF orientation: width ≥1920 and height ≥1080 for no-upscale 16:9 cover on the current AirPlay display. Measure before thumbnailing/preparation; do not use API dimensions or prepared 1280px downloads as original evidence. - **Aspect ratio** — near 16:9 preferred; flag anything that would lose too much subject in a center cover-crop (extreme panoramas, tall portraits). - **Blur** — Laplacian variance below a calibrated threshold (numpy/OpenCV). - **Exposure** — histogram stats: mean brightness, % blown highlights, % crushed shadows; flag too-dark / flat / blown-out images (a living room is a bright ambient environment). - **Near-duplicates** — perceptual hash (e.g. `imagehash` average/phash) against the set. - Handle **EXIF orientation** explicitly (transpose before measuring). Deps: Pillow + numpy (+ `imagehash`; `opencv-python-headless` only if a numpy Laplacian is inadequate). **No torch, no ML stack or model downloads.** Scorer is offline; original acquisition is explicitly invoked network work. Measure actual throughput. # Where it plugs in Current ingest flow (see `scripts/discover-clock-photos.py` docstring): `discover-clock-photos.py` (Openverse discovery) → `fetch-clock-photos.sh` (build-time download) → `--clock-photo-probe` (Vision segmentation fills `clockY`/`depth`) → `gen-photo-credits.py`. Required ingest route: discover → acquire/retain full-resolution originals → stage-1 metadata → later-stage evidence → final selection policy → selected render-asset preparation / Vision bake → final output manifest + credits. Stage 1 recommends; a future explicit consumer policy may skip model/Vision work for unusable originals. Existing probe/bake and runtime selection remain unchanged in the draft. Original acquisition is included in this issue and PR #10: explicit maintainer command `scripts/fetch-clock-originals.py new-york`, separate ignored worktree-local storage and hashed atomic download receipts, resume/retry, no build hook or app/shared-cache mutations. Include all 518 New York entries (505 download URLs plus 13 seeds resolved from Commons File pages). Retain raw bytes without resizing/reencoding. Acquisition and analysis resource limits must produce honest error evidence, not silently reduced originals. # Repo context (read first) - `AGENTS.md` — product constraints + source-control workflow: work in a git worktree under `.worktrees/` on a `feat/…` branch (e.g. `git worktree add .worktrees/<short> -b feat/<short>`); commit freely on the branch; run `make test` (selftest + jstest) before proposing a merge; **never merge/fast-forward/push to `main` without explicit operator confirmation**; push to remote only when asked. - `.wiki/_index.md` + `.wiki/wiki/references/task-routing.md` — canonical routing; the "Clock photos" section documents the manifest, the probe, the atomic-write rule, and the on-demand image push path. (Note: the wiki says the manifest lives at `Resources/photos/manifest.json`; the actual path is `Sources/TVDashboard/Resources/photos/manifest.json`.) - Manifest (single source of truth): `Sources/TVDashboard/Resources/photos/manifest.json` — per-photo `file`/`caption`/`credit`/`date`/`author`/`license`/`source`/`downloadUrl`/`clockY`/`depth`. Read `Sources/TVDashboard/Clock/ClockPhotoLibrary.swift` to see how it is loaded and whether adding a curation field needs tolerant decoding (the config tolerant-decode gotcha in task-routing applies to `DashboardConfig`; check the manifest loader too). - Kiosk constraints: the TV view is read-only and glanceable. Curation is an **operator-time maintainer tool** — it must not add any UI, controls, or settings to the TV-facing app, and the app must stay resilient offline (filtering happens at ingest time, never at display time). - Update `.wiki/` (and commit the change on your feature branch) if you introduce a durable route, convention, or decision. # Decisions already made (do not re-litigate) - **No Jev** (TypeSafe): closed-source, API-only, text-only — rejected. - **No Cloudflare Workers AI API path for Clef** — not planned for now; everything is local on the M1 Pro. - This stage is heuristics only. ML judging is stage 2; the aesthetic baseline is stage 3. # Acceptance criteria - Acquire full-resolution New York originals separately; report coverage/download errors and stage-1 results on those bytes. - Script measures batch throughput and writes atomic metadata sidecar with per-photo metrics, stage-local verdicts and machine-readable reasons. No source removals or implicit final selection. - Thresholds are documented and calibrated against the existing pool (show the score distributions, not just magic numbers). - No heavyweight deps; offline deterministic scoring. Network confined to explicit original acquisition. - `make test` still passes. # Metadata location / schema decisions (operator confirmed 2026-10-15) - Keep source attribution manifest unchanged. Stage 1 enriches metadata in generated, ignored `.photo-curation/prefilter.json` (explicit per-set output paths allowed), not a runtime Application Support cache or committed pool output. - Commit the structural schema: `docs/photo-prefilter.schema.json`. Records join on `(set_id, file, sha256)` with report-level analysis/config/provenance. Metrics and stage-local verdict/reasons remain distinct from final eligibility. - Later stages append their evidence; final versioned policy decides `use` and generates output membership. The stage-evidence merger/final policy is not yet implemented. Missing/error/stale evidence must not imply eligibility. - Full-resolution acquisition uses `.photo-curation/originals/<set>/` and `downloads.json`, schema `docs/photo-original-download.schema.json`. Original and derived asset hashes/dimensions must not be conflated. # Current New York prepared-pool evidence Analysis v2 scanned all 518 local prepared images and the built app resource copy read-only; reports identical including byte hashes. 518 decoded, 0 errors, 0 pass / 518 reject / 0 review. Times 5.483s / 5.511s (~94 images/s). Every image fails resolution because build fetch downsizes to 1280px long edge (510 exactly 1280px; largest long edge 1687px, max oriented width 1280px). This does NOT prove originals are low-res. Other overlapping flags: crop review 193, extreme crop 1, dark exposure 6, crushed shadows 3, blown highlights 1, low contrast 1, low blur metric 1, near duplicate 7, exact duplicates 0. Ignoring resolution solely as a diagnostic: 317 pass / 200 review / 1 reject, not eligible outputs. See repository docs for distributions/commands. Full-resolution acquisition is authorized and running as part of PR #10; original-byte analysis and real flagged-image review remain pending. Scorer limits (32MiB/40M pixels) can yield errors for large originals. Runtime preparation also has a separate 1600px/q0.7 limit; no render change is included so far.
Author
Owner

Planning update — awaiting operator approval

Planning for this stage is complete; every recommendation below is unapproved. No implementation, tests, inference, or calibration has begun, and no repository, app, or cache state was modified.

Proposed scope. One maintainer-run scripts/prefilter-clock-photos.py in the style of scripts/discover-clock-photos.py (argparse, ROOT/MANIFEST constants, usage docstring). It reads Sources/TVDashboard/Resources/photos/manifest.json plus on-disk bytes and writes per-photo verdicts atomically (temp beside target + mv). Deps: Pillow + numpy only; compute a small deterministic aHash/dHash directly, since upstream imagehash pulls in SciPy and OpenCV is unnecessary. Pipeline per image: EXIF transpose → long-edge check (≥1100, matching MIN_LONG_EDGE) → 16:9 center-cover-crop loss estimate → Laplacian variance (blur) → mean luminance / blown-highlight / crushed-shadow stats → near-duplicate hash distance within the set. Verdicts pass/reject/review/error with machine-readable reasons; review stays a real borderline bucket, error for undecodable bytes. Thresholds are selected only after pooled/per-set distributions are shown.

Shared contract (reconciled with #6/#7). Stage-owned, gitignored sidecars under worktree-local .photo-curation/ — not bundled resources; keyed by set/file/SHA256 with schema + config provenance and pass/reject/review/error; only a fresh pass advances a photo. Commit schemas/tests/docs, never generated pool results. Default here is report-only: source photos, manifest, quarantine/deletion, and display-time filtering all stay unchanged, preserving offline display.

Key findings / unresolved risks.

  • Pool is 649 manifest entries (new-york 518, street-photography 131); only the 13 committed seeds exist on disk here — 636 files need fetching before any real calibration, so no score distributions or timing are claimed yet.
  • Discovery already gates resolution/aspect (MIN_LONG_EDGE/MIN_SHORT_EDGE, aspect 0.5–2.0), so blur/exposure/dedupe are the genuinely new filters.
  • The probe cannot skip rejects today: ClockPhotoLibrary.availablePhotos prunes only missing files, --clock-photo-probe segments every on-disk file, and neither reads sidecars. Sidecars are runtime-safe (manifest loader ignores unknown keys).
  • Locked env fact: this Python has no Pillow/numpy; the repo is otherwise stdlib-only, so a dedicated isolated env is required.

Validation still needed (after approval). Model-free: fetch the missing photos, run the pass over the full pool, publish distributions/proposed cuts, re-run to prove deterministic identical output. GUI-capable make test separately scheduled. #6/#7 env/model work stays serialized and separately approved.

Questions for the operator

  1. Deps/env: approve Pillow+numpy in an isolated env (no scipy/imagehash/OpenCV)? Default: yes, installed only at implementation start.
  2. Hook ownership (issue-specific): should #5 own an OPT-IN probe/bake allowlist (consuming only reviewed passes) so rejects are never segmented? Default: yes, #5 owns it — otherwise defer a small probe/bake change and the "rejects never segmented" acceptance criterion remains incomplete. Confirm scope.
  3. Calibration sign-off: approve thresholds only after the full-pool distribution run? Default: yes; report per-set distributions, treat heavy review mass as a loosen signal.
  4. Pool provisioning: approve fetching the 636 missing photos into this worktree for calibration (shares the download cache; no relaunch, no installed-bundle changes)? Default: yes, fetch-only at implementation time.
  5. Timing: is "milliseconds per image" a hard requirement? Default: soft target measured on the M1 Pro, not asserted.

Companion stages #6 and #7 consume this sidecar contract; see those issues for model-specific scope.

**Planning update — awaiting operator approval** Planning for this stage is complete; every recommendation below is **unapproved**. **No implementation, tests, inference, or calibration has begun**, and no repository, app, or cache state was modified. **Proposed scope.** One maintainer-run `scripts/prefilter-clock-photos.py` in the style of `scripts/discover-clock-photos.py` (argparse, `ROOT`/`MANIFEST` constants, usage docstring). It reads `Sources/TVDashboard/Resources/photos/manifest.json` plus on-disk bytes and writes per-photo verdicts atomically (temp beside target + `mv`). Deps: **Pillow + numpy only**; compute a small deterministic aHash/dHash directly, since upstream `imagehash` pulls in SciPy and OpenCV is unnecessary. Pipeline per image: EXIF transpose → long-edge check (≥1100, matching `MIN_LONG_EDGE`) → 16:9 center-cover-crop loss estimate → Laplacian variance (blur) → mean luminance / blown-highlight / crushed-shadow stats → near-duplicate hash distance within the set. Verdicts `pass`/`reject`/`review`/`error` with machine-readable reasons; `review` stays a real borderline bucket, `error` for undecodable bytes. Thresholds are selected only after pooled/per-set distributions are shown. **Shared contract (reconciled with #6/#7).** Stage-owned, gitignored sidecars under worktree-local `.photo-curation/` — not bundled resources; keyed by set/file/SHA256 with schema + config provenance and pass/reject/review/error; only a fresh pass advances a photo. Commit schemas/tests/docs, never generated pool results. Default here is **report-only**: source photos, manifest, quarantine/deletion, and display-time filtering all stay unchanged, preserving offline display. **Key findings / unresolved risks.** - Pool is 649 manifest entries (new-york 518, street-photography 131); only the 13 committed seeds exist on disk here — 636 files need fetching before any real calibration, so no score distributions or timing are claimed yet. - Discovery already gates resolution/aspect (`MIN_LONG_EDGE`/`MIN_SHORT_EDGE`, aspect 0.5–2.0), so blur/exposure/dedupe are the genuinely new filters. - The probe cannot skip rejects today: `ClockPhotoLibrary.availablePhotos` prunes only missing files, `--clock-photo-probe` segments every on-disk file, and neither reads sidecars. Sidecars are runtime-safe (manifest loader ignores unknown keys). - Locked env fact: this Python has no Pillow/numpy; the repo is otherwise stdlib-only, so a dedicated isolated env is required. **Validation still needed (after approval).** Model-free: fetch the missing photos, run the pass over the full pool, publish distributions/proposed cuts, re-run to prove deterministic identical output. GUI-capable `make test` separately scheduled. #6/#7 env/model work stays serialized and separately approved. **Questions for the operator** 1. **Deps/env:** approve Pillow+numpy in an isolated env (no scipy/imagehash/OpenCV)? Default: yes, installed only at implementation start. 2. **Hook ownership (issue-specific):** should #5 own an OPT-IN probe/bake allowlist (consuming only reviewed passes) so rejects are never segmented? Default: yes, #5 owns it — otherwise defer a small probe/bake change and the "rejects never segmented" acceptance criterion remains incomplete. Confirm scope. 3. **Calibration sign-off:** approve thresholds only after the full-pool distribution run? Default: yes; report per-set distributions, treat heavy `review` mass as a loosen signal. 4. **Pool provisioning:** approve fetching the 636 missing photos into this worktree for calibration (shares the download cache; no relaunch, no installed-bundle changes)? Default: yes, fetch-only at implementation time. 5. **Timing:** is "milliseconds per image" a hard requirement? Default: soft target measured on the M1 Pro, not asserted. Companion stages #6 and #7 consume this sidecar contract; see those issues for model-specific scope.
Author
Owner

add deps appropriately to pyproject. this can be a batch job. I dont understand 2,3, 4. otherwise LGTM

add deps appropriately to pyproject. this can be a batch job. I dont understand 2,3, 4. otherwise LGTM
Author
Owner

Implementation is beginning as a conservative, report-only draft. To clarify questions 2/3/4: (2) scoring photos alone does not stop Vision work; a separately, explicitly opted-in selection before the probe would skip non-passing photos. A heuristic pass is not operator approval. (3) threshold tuning means looking at which real photos each cutoff flags and their score distributions, rather than choosing unexplained constants. (4) a new worktree has only 13 seed photos out of 649 manifest entries, so full calibration needs more local image bytes. I will add Pillow + numpy appropriately to pyproject in an isolated env, use provisional thresholds, and test synthetic/seed inputs first. No deletion, final threshold policy, bulk fetch, or resource-heavy/GUI run is assumed approved.

Implementation is beginning as a conservative, report-only draft. To clarify questions 2/3/4: (2) scoring photos alone does not stop Vision work; a separately, explicitly opted-in selection before the probe would skip non-passing photos. A heuristic pass is not operator approval. (3) threshold tuning means looking at which real photos each cutoff flags and their score distributions, rather than choosing unexplained constants. (4) a new worktree has only 13 seed photos out of 649 manifest entries, so full calibration needs more local image bytes. I will add Pillow + numpy appropriately to pyproject in an isolated env, use provisional thresholds, and test synthetic/seed inputs first. No deletion, final threshold policy, bulk fetch, or resource-heavy/GUI run is assumed approved.
Author
Owner

Initial draft published: #10 (WIP #10, main <- feat/photo-prefilters, commit 3b0bff5). Report-only Pillow + numpy scorer, locked optional pyproject extra, atomic worktree-local evidence, distributions, schema/docs/wiki and synthetic tests are implemented. No source-photo/manifest/runtime/UI changes.

Actual validation: 10 model-free synthetic tests passed; locked isolated env sync, py_compile and diff checks passed. Repeat reports were byte-identical. Final seed-only runs: 0.187s / 0.174s, 649 entries but only 13 decoded seeds and 636 missing inputs recorded as errors; decoded verdicts 7 pass / 2 reject / 4 review. This is not full-pool calibration or throughput evidence.

Pending: provision additional local bytes under separately scheduled permission, inspect real flagged photos/distributions and review provisional cutoffs. The explicit pre-Vision fresh-pass selection hook is deferred in this initial draft; existing probe/bake still process all present files, so report generation alone does not stop segmentation. Heuristic pass does not imply manual approval. make test, GUI/physical checks and real Vision runs were not run. Running main-checkout dashboard was left untouched; no fetch/build/launch/quit or shared runtime-cache/config writes. Draft is not complete or merge-ready; #6/#7 remain paused. Detailed commands/contracts and follow-up checklist are in the repository docs.

Initial draft published: https://git.rishav.io/xrisk/tvd/pulls/10 (WIP #10, main <- feat/photo-prefilters, commit 3b0bff5). Report-only Pillow + numpy scorer, locked optional pyproject extra, atomic worktree-local evidence, distributions, schema/docs/wiki and synthetic tests are implemented. No source-photo/manifest/runtime/UI changes. Actual validation: 10 model-free synthetic tests passed; locked isolated env sync, py_compile and diff checks passed. Repeat reports were byte-identical. Final seed-only runs: 0.187s / 0.174s, 649 entries but only 13 decoded seeds and 636 missing inputs recorded as errors; decoded verdicts 7 pass / 2 reject / 4 review. This is not full-pool calibration or throughput evidence. Pending: provision additional local bytes under separately scheduled permission, inspect real flagged photos/distributions and review provisional cutoffs. The explicit pre-Vision fresh-pass selection hook is deferred in this initial draft; existing probe/bake still process all present files, so report generation alone does not stop segmentation. Heuristic pass does not imply manual approval. make test, GUI/physical checks and real Vision runs were not run. Running main-checkout dashboard was left untouched; no fetch/build/launch/quit or shared runtime-cache/config writes. Draft is not complete or merge-ready; #6/#7 remain paused. Detailed commands/contracts and follow-up checklist are in the repository docs.
Author
Owner

Operator scope update: source resolution must be checked before photos become eligible for TV display. Replace discovery floors (~1100px) with EXIF-oriented source width >=1920 and height >=1080, matching the current AirPlay desktop and ensuring 16:9 cover requires no upscaling. Test exact boundaries, panorama/portrait cases and orientation before thumbnailing. Implemented in draft PR #10 as analysis v2. Report-only evidence does not yet enforce runtime eligibility; fresh-pass ingest selection remains an acceptance gap. Separately, current runtime encoding can reduce >350KB sources to 1600px/quality 0.7 and is not changed by this request.

Operator scope update: source resolution must be checked before photos become eligible for TV display. Replace discovery floors (~1100px) with EXIF-oriented source width >=1920 and height >=1080, matching the current AirPlay desktop and ensuring 16:9 cover requires no upscaling. Test exact boundaries, panorama/portrait cases and orientation before thumbnailing. Implemented in draft PR #10 as analysis v2. Report-only evidence does not yet enforce runtime eligibility; fresh-pass ingest selection remains an acceptance gap. Separately, current runtime encoding can reduce >350KB sources to 1600px/quality 0.7 and is not changed by this request.
Author
Owner

Original acquisition is now implemented locally as part of #5/PR #10: separate raw-byte storage, hashed atomic receipts, safe resume, all 518 New York identities including seeds. Batch is running; a supervisor retries failures and runs the final scorer afterwards. Partial original scan: 283 decoded, 169 pass / 32 reject / 82 review; 235 errors mostly not-yet-downloaded (216), with 3 byte-limit, 7 invalid EXIF and 9 unsafe/undecodable. Not final calibration. All 15 synthetic tests pass. Local changes are staged but commit/push currently blocked: configured signing agent refuses commit signatures. PR body refreshed to distinguish local implementation from remote diff.

Original acquisition is now implemented locally as part of #5/PR #10: separate raw-byte storage, hashed atomic receipts, safe resume, all 518 New York identities including seeds. Batch is running; a supervisor retries failures and runs the final scorer afterwards. Partial original scan: 283 decoded, 169 pass / 32 reject / 82 review; 235 errors mostly not-yet-downloaded (216), with 3 byte-limit, 7 invalid EXIF and 9 unsafe/undecodable. Not final calibration. All 15 synthetic tests pass. Local changes are staged but commit/push currently blocked: configured signing agent refuses commit signatures. PR body refreshed to distinguish local implementation from remote diff.
Author
Owner

Original acquisition and full-pool stage-1 analysis for New York are complete and pushed in PR #10 (commit 13865ae):

• Acquisition: all 518 New York identities (505 download URLs + 13 seeds) downloaded and verified to .photo-curation/originals/new-york/ (2.9 GiB), 0 errors.
• Analysis of original bytes (31.461s, ~16.5 images/s): 487/518 decoded, 279 pass (53.9%), 60 reject (11.6%), 148 review (28.6%), 31 error (6.0%). Full report in .photo-curation/new-york-originals-v2.json.
• In contrast to the prepared assets where fetch downsized 100% of photos to 1280px (causing 100% resolution failure), only 58 original photos (11.2%) fail the 1080p requirement.
• 31 input errors reflect analysis bounds on raw files (9 files >32 MiB like 213 MiB Brooklyn Bridge TIFF; 8 invalid EXIF orientation; 14 unsafe/undecodable decompressed limits).
• All 15 synthetic unit tests pass. Commit-signing issue resolved; changes pushed to PR #10.

Original acquisition and full-pool stage-1 analysis for New York are complete and pushed in PR #10 (commit 13865ae): • Acquisition: all 518 New York identities (505 download URLs + 13 seeds) downloaded and verified to .photo-curation/originals/new-york/ (2.9 GiB), 0 errors. • Analysis of original bytes (31.461s, ~16.5 images/s): 487/518 decoded, 279 pass (53.9%), 60 reject (11.6%), 148 review (28.6%), 31 error (6.0%). Full report in .photo-curation/new-york-originals-v2.json. • In contrast to the prepared assets where fetch downsized 100% of photos to 1280px (causing 100% resolution failure), only 58 original photos (11.2%) fail the 1080p requirement. • 31 input errors reflect analysis bounds on raw files (9 files >32 MiB like 213 MiB Brooklyn Bridge TIFF; 8 invalid EXIF orientation; 14 unsafe/undecodable decompressed limits). • All 15 synthetic unit tests pass. Commit-signing issue resolved; changes pushed to PR #10.
xrisk closed this issue 2026-10-16 12:05:30 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
xrisk/tvd#5
No description provided.