AI article

Checking passport photos against government specs in the browser with MediaPipe

Community description: Government photo rules read like a spec sheet. The DS-160 (US visa) wants a square JPEG between...

Dev.to | Sep 30, 2026 | Jason T.

Automated excerpt

Government photo rules read like a spec sheet. Every measurement downstream (head height, eye line, crop box) assumes an upright head, so the first step is to rotate around the midpoint between the irises: res = face. detect(source); // re-run landmarks on the levelled image Is rotating allowed? Every official spec measures head height from the chin to the crown (top of the hair), but the face mesh stops at the hairline.

Selected automatically from source text; not independently written or fact-checked. Read the original for full context.

Read the original article

More AI news