Segmentation¶
Every rendered look is automatically segmented — each garment on each model gets its own mask — so that ReviewHub can attribute a grade to one garment on one model instead of only to a whole image. Garment-level grades are the highest-signal feedback the system receives.
Pipeline (v3)¶
- SAM 3 person-detect → 3 model crops (fallback to fixed thirds)
- Per manifest slot, SAM 3 concept prompts using the garment's NAME ("Quilted Technical Coat") — attribute-qualified names work; generic "jacket" does not
- Sanity checks (area range + centroid position per slot); on failure,
Gemini describes what is ACTUALLY worn (deviation handling) and SAM retries
with that phrase — deviations are recorded (
deviation_detected) - Layer subtraction so crops show only their own garment
- Outputs per garment: mask SVG, crop PNG, and a grayscale hitmap where pixel value = garment index (1-based — 0 is background; ReviewHub reads the pixel under the cursor to know what you clicked)
Reliability¶
- Per-image SAM calls run in parallel; batches run 8 images concurrently
- A 10-minute reconciliation sweep segments anything that slipped through (fire-and-forget tasks die with their process; the sweep cannot miss)
- Failures land in
pipeline_eventswith reasons