A local face scan can pass its first test and still fail on the third photo. The portrait appears, the landmarks look right, and the request log shows no image upload. Then someone rapidly replaces the photo on an iPhone. The old job paints a mesh over the new preview, or both decodes stay alive long enough for the tab to reload under memory pressure. Treating a scan as a short-lived job with explicit resource ownership addresses all three failures.
The interface in this example returns 468 core MediaPipe Face Mesh landmarks. Models that add iris refinement can return the 468 core points plus ten iris points, for a total of 478. A caller that needs iris centers should declare that requirement separately. Pin the model and index map together, and accept only the point counts declared by that bundle. Project the known refined output onto the 468-point interface only after checking its ordering.…