Menu

One photo, three face shape tools, three answers: how an on-device classifier works
📰

One photo, three face shape tools, three answers: how an on-device classifier works

DEV Community: computervision·Landmark Dev·8 days ago
#WepW30RK
Reading 0:00
15s threshold

I run The Face Report, a site with a face shape detector that works in the browser. This month I put one portrait through it and through two other free face shape tools. As far as I can tell, all three use the same 478-point MediaPipe face mesh. They gave three answers: Heart at 88%, Round at 72%, and Oval, borderline with Diamond.

The landmark model does not decide a face shape. It gives you points. Someone has to write the rule that turns those points into a label, and that rule is where the tools differ. This post shows how ours works, with code you can run, and what I got wrong.

Get the landmarks

import { FaceLandmarker , FilesetResolver } from " @mediapipe/tasks-vision " ;

const files = await FilesetResolver . forVisionTasks ( " https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/wasm " ); const landmarker = await FaceLandmarker .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.