Day 76: Error handling across a 4-model pipeline
Failing gracefully, four ways
Four models means four failure points: no person detected, pose fails on an odd angle, segmentation produces a fragmented mask, parsing mislabels regions. A production pipeline handles each explicitly — degrade gracefully, return partial results with honest confidence, and never emit a confident garbage measurement. This is your backend reliability instinct applied to ML: the pipeline should tell the truth about what it couldn't do.
- No person / low detection confidence → return an error asking for a clearer photo; don't guess.
- Pose partially fails → measure only the dimensions whose keypoints are visible; mark the rest unavailable.
- Fragmented mask → fall back to pose-only measurement, lower the confidence, add a warning.
- Parsing disagrees with pose/silhouette → flag the conflict, prefer the more-trusted source, surface it in warnings.
Partial + honest beats complete + wrong
A response that says 'shoulder width: 42cm (high confidence), arm length: unavailable (left wrist occluded)' is more useful — and more trustworthy — than one that confidently invents an arm length from a bad keypoint. The roadmap's whole ethos is verification over plausibility; graceful degradation is that ethos in the pipeline's error paths.
Key terms
- Graceful degradation
- Returning partial, honestly-labelled results when some pipeline stages fail, rather than crashing or fabricating output.
- Fallback
- Using an alternative source (e.g. pose-only) when a preferred one (parsing) fails.
The left wrist keypoint is occluded, so arm length can't be measured reliably. What is the roadmap-correct behavior?