← All models

face-landmark-detection Β· vision Β· MediaPipe Β· ~4 MB

FaceLandmarker β€” 478 points, 52 blendshapes

MediaPipe's FaceLandmarker finds a face in an image or video and returns a dense 478-point mesh, plus 52 blendshape coefficients β€” ARKit-style expression channels like jawOpen, mouthSmileLeft, and eyeBlinkRight β€” and a 4Γ—4 head-pose matrix. It's a real downloadable .task model that runs on-device via WebAssembly (with a GPU delegate when available). Drop a photo or turn on your webcam and watch the expression bars move.

At a glance

ModelMediaPipe FaceLandmarker (Google)
RuntimeMediaPipe Tasks Vision (@mediapipe/tasks-vision) β€” .task bundle
Output478 landmarks (x, y, z normalized), 52 blendshapes, 4Γ—4 facial transformation matrix
Faces1 by default (configurable via numFaces)
DelegateGPU when a WebGPU/WebGL adapter exists, otherwise CPU (XNNPACK)
Download~4 MB .task file, cached by the browser after first load
LicenseApache-2.0 (Google MediaPipe)
Web APIsWebAssembly, Canvas, getUserMedia β€” all Baseline widely available

Run it

Pick a sample face, drop your own photo, or use your webcam. The 478-point mesh is drawn on the canvas and the 52 blendshapes animate as a live bar panel.

Drop a face photo here, or click to choose
A smiling face A neutral face A calm portrait

Live blendshapes

The model's 52 expression coefficients, highest first (0 = not active, 1 = fully active). This is the same signal a face-driven avatar reads.

Detect a face to see its 52 blendshape values.

See inside

A face comes back as 478 normalized x, y, z landmarks, the 52 blendshapes above, and a 4Γ—4 transformation matrix that encodes where the head is pointing. Below are a handful of named landmark coordinates and the head pose (yaw/pitch/roll) decoded from that matrix β€” exactly what the model returned for the current face.

Detect a face to see its landmark coordinates and head pose.

Why it matters

Face-mesh tracking used to mean ARKit, a native SDK, or a cloud vision API. FaceLandmarker turns "where is the face, and what expression is it making?" into a local function call in any browser β€” private, offline, and fast enough for a live camera on a phone. The blendshapes are the real prize: 52 ready-made expression channels you can drive anything with.

Use cases

Basics

Mesh a sample face and read its landmark coordinates and head pose β€” feel what the model returns.

Practical

An attention / drowsiness monitor: blink, yawn, and look-away cues from the blendshapes, live.

Wild

An emoji that mirrors your face β€” a live puppet driven entirely by your blendshapes.

Multi-model

Face + Hands together: full-expression mesh with detailed finger tracking on one canvas.

How the API works

MediaPipe Tasks loads a .task bundle and gives you a landmarker you call per image or per video frame:

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

const vision = await FilesetResolver.forVisionTasks(".../wasm");
const face = await FaceLandmarker.createFromOptions(vision, {
  baseOptions: {
    modelAssetPath: ".../face_landmarker.task",   // ~4 MB
    delegate: "GPU",                               // or "CPU"
  },
  numFaces: 1,
  outputFaceBlendshapes: true,                     // the 52 expression channels
  outputFacialTransformationMatrixes: true,        // head-pose matrix
  runningMode: "IMAGE",                            // or "VIDEO"
});

const result = face.detect(imageElement);
// result.faceLandmarks         β†’ [ [ {x,y,z} Γ— 478 ], … ]  (normalized 0–1)
// result.faceBlendshapes       β†’ [ { categories:[ {categoryName,score} Γ— 52 ] }, … ]
// result.facialTransformationMatrixes β†’ [ { data:[16 floats] }, … ]

This page loads the model through the showcase's shared auto-init loader and draws the mesh on a canvas at the image's natural resolution; for the webcam it switches the task to VIDEO mode and calls detectForVideo each frame.

References