Day 14: Stage 0 capstone: 20 photos, endpoint live, explanations written
Stage 0 capstone: verification over plausibility
This roadmap's governing rule is that a stage is done when its exit criteria pass — a deployed endpoint, a measured number, an explanation you could defend in an interview — not when the code merely runs once. Today is that check for Stage 0, against the roadmap's own three exit criteria.
Exit criterion 1: 20 photos, ≥16 clean without manual tuning
Run the batch and tally honestly
Gather 20 garment photos on varied backgrounds (plain studio, cluttered, patterned, varying lighting) — deliberately not cherry-picked to be easy. Run the Day 12 CLI over all 20 with no per-image parameter tuning. Count how many produced a clean cutout. The bar is ≥16/20 (80%). If you're below it, the honest move is to diagnose which failure mode (Day 11's callout — color-similarity, cluttered background, poor rectangle fit) is dominant, not to hand-tune parameters until the demo set passes.
from pathlib import Path
from catalog.pipeline import process_image
import cv2
results = []
for path in sorted(Path("validation_photos").glob("*.jpg")):
try:
out = process_image(str(path))
cv2.imwrite(f"validation_output/{path.stem}.png", out)
results.append((path.name, "processed — inspect visually"))
except Exception as e:
results.append((path.name, f"FAILED: {e}"))
for name, status in results:
print(name, "-", status)
# then eyeball validation_output/ (Day 6's imshow habit) and tally clean vs notExit criterion 2: three one-paragraph explanations
Write these out — the roadmap explicitly asks for a paragraph you could give in an interview, not a bullet list:
- Image as a NumPy array: what its shape and dtype mean, and how that connects to everything else in this roadmap (Day 3, Day 4)
- Why HSV beats RGB for color filtering: the tangled-vs-separated color/brightness argument, with a concrete example (Day 8)
- What a convolution kernel does: the slide-multiply-sum operation, and its connection to what a CNN learns automatically in Stage 1 (Day 9)
Exit criterion 3: endpoint deployed, called from Next.js
Stage 0 exit criteria — verify each one, don't assume
The weekly operating loop, starting now
The roadmap's weekly loop applies from here on: Mon-Fri is 1h consume / 1h apply, Sat-Sun builds the stage deliverable, and Sunday's last 30 minutes is a short log — what you built, measured, broke, and verified vs. merely assumed. 33 of these logs exist by Day 230; they're interview material as much as this code is. Write today's before moving to Stage 1.
Your Catalog Tool gets 14/20 clean cutouts on the validation set — below the 16/20 bar. What's the roadmap-correct next move?