MediaPipe model path
Pick a custom modelAssetPath only when stock SelfieSegmenter + GPU post is not enough and the Pixel-class budget still has room. Heavy in-browser Multiclass / DeepLab / MODNet / SAM is a skip.
walk
need
Stock SelfieSegmenter + GPU post good enough?
Full tree
- need — stock SelfieSegmenter + GPU post good enough?
- yes → KEEP
- no → budget — Pixel-class ms × tiles > 1000/hz
- over → SKIP-heavy (Multiclass / DeepLab / MODNet / SAM in browser)
- under → labels — thousands of room/multi-person masks?
- yes → TRAIN MobileNetV3-small + light decoder
- no → DISTILL SAM2/MODNet teacher → same student
- then both → train | distill student I/O 256² or 144×256, 2-class, MobileNet ops, fp16 → export fp16 TFLite + ImageSegmenter metadata (background/person), no custom ops → runtime CPU WASM first, GPU if ops allow → swap modelAssetPath, polarity check (lab mapped bundled class 0 → a=1; Google card says 0=bg / 1=person), A/B vs stock
Dead ends (static only, not walkable): Model Maker fine-tune · LoRA shipped tflite · no Keras weights (mediapipe#6325, #5617)