Photo curation pipeline (3/3): fast LAION aesthetic predictor baseline #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a fast, deterministic LAION aesthetic predictor as a lightweight scoring baseline in the clock-photo curation pipeline: a CLIP ViT-L/14 image encoder + a linear head trained on human aesthetic ratings, ~0.6 GB, runs on CPU/MPS in milliseconds per image, outputs a 1–10 score you threshold. This is stage 3 of 3. Companion issues: #5 (stage 1, cheap local pre-filters) and #6 (stage 2, Clef decision-model judge). Work on this issue independently; do not implement the other stages.
What it is / is not (important — read before planning)
What to build
A maintainer-run script under
scripts/(style ofdiscover-clock-photos.py) that:mv— see the atomic-write rule in.wiki/wiki/references/task-routing.md),Placement in the flow: alongside/after the pre-filters (#5), before or in parallel with the Clef judge (#6) — it is cheap enough to always run.
Repo context (read first)
AGENTS.md— product constraints + source-control workflow: worktree under.worktrees/on afeat/…branch; commit freely;make testbefore proposing a merge; never merge/push tomainwithout explicit operator confirmation; push only when asked..wiki/_index.md+.wiki/wiki/references/task-routing.md— canonical routing; "Clock photos" section (manifest, probe, atomic-write rule, push path). (Wiki says manifest is atResources/photos/manifest.json; actual path isSources/TVDashboard/Resources/photos/manifest.json.)Sources/TVDashboard/Resources/photos/manifest.json(file/caption/credit/date/author/license/source/downloadUrl/clockY/depth); loaderSources/TVDashboard/Clock/ClockPhotoLibrary.swift.discover-clock-photos.py→fetch-clock-photos.sh→--clock-photo-probe→gen-photo-credits.py..wiki/(committed on your feature branch) for durable decisions.Decisions already made (do not re-litigate)
Acceptance criteria
.gitignore).make testpasses.Open questions for the planning agent
Planning update — awaiting operator approval
Planning inspection is complete. No implementation, tests, inference, or calibration have begun. All recommendations below remain unapproved.
Proposed scope and findings
Add an independent maintainer-only aesthetic scorer, distribution/threshold report, and optional comparison against a supplied Clef sidecar (#6). Include model-free fixture tests, pinned dependency specifications, and concise schema/provenance documentation. No display-time scoring, app changes, source-photo edits, manifest edits, quarantine, or deletion.
Recommend the referenced LAION V1 linear head (
sa_0_4_vit_l_14_linear.pth) plus OpenAI CLIP ViT-L/14, using a separate pinned PyTorch/OpenCLIP environment, not the MLX environment for #6. The upstream notebook uses normalized 768-dimensional image embeddings and a linear head, with no text input. Repository licenses for LAION and OpenAI CLIP are MIT; document that LAION provides no separate weight-specific model card in its root listing. Do not silently substitute V2.The linear output targets human 1–10 ratings but is not mathematically bounded to that range. V1 was trained on synthetic-image ratings, making historical/monochrome photo bias a material calibration risk. CLIP encoding—not the tiny head—dominates computation; footprint, MPS compatibility, and full-pool throughput remain unmeasured.
The manifest currently has 649 entries; this worktree has 13 seeds, leaving 636 photos missing.
ClockPhotoLibrary.swiftfilters absent files only. Existing fetch/probe/bake paths do not consume curation verdicts: a sidecar alone cannot prevent segmentation or change rotation.Questions for the operator
Shared interface: Approve separate stage-owned, gitignored
.photo-curation/sidecars outside bundled resources, keyed by set/file/SHA256 with schema/config/model provenance and pass/reject/review/error semantics? Recommended default: yes; only fresh passes advance in an explicitly enabled downstream pipeline. Commit schemas/tests/docs, not generated pool results. This gates caching and compatibility with #5/#6; a baseline pass is not a semantic wallpaper endorsement.Integration ownership: Should #5 own an opt-in probe/bake allowlist while #6/#7 remain independent sidecar producers, with source photos/manifest unchanged and no runtime filtering? Recommended default: yes. Alternatively defer integration, explicitly leaving “rejects never segmented” incomplete. This gates cross-stage scope, not a runtime behavior change in #7.
Model/runtime: Approve the V1/OpenAI ViT-L/14 pairing, isolated pinned PyTorch/OpenCLIP environment, and documented MIT provenance caveat? Recommended default: yes. This gates dependency/artifact selection; no hosted judging or ONNX conversion is proposed.
Calibration/performance: Choose the threshold only after pooled/per-set distributions and sample review, treating under-one-minute as a measured MPS target, not a CPU guarantee? Recommended default: yes; no active threshold initially. This gates honest acceptance criteria. Validate repeatability/device differences, near-threshold examples, and bias; compare Clef only on current hash-matched records, reporting exclusions and disagreements. Agreement is not accuracy.
Execution scheduling: Proceed only after approval with implementation and model-free validation first, then separately request permission/scheduling for isolated-env installs, photo/model provisioning, serialized model pilots/full-pool calibration, and GUI-capable
make test? Recommended default: yes. Validate atomic publication, invalidation, errors, and comparison fixtures before model runs. No relaunch or replacement of the running dashboard.Status: awaiting operator answers and explicit implementation approval.