Live model · Face ID

How Face ID Actually Works

Face ID projects more than 30,000 infrared dots onto your face and an infrared camera beside the projector reads them. Each dot lands shifted by an amount that depends on how far away it hit, so the shifts become a depth map. The phone brings its own infrared light, so a dark room changes nothing.

Infrared dots to a depth map, row by row

The dot projector casts 529 infrared dots on the face, 35 cm away. The infrared camera sits beside it, so each dot lands shifted sideways: the nearer the spot it hit, the bigger the shift. The room's light (dark room) changes nothing: the dots are the only light the camera reads.
StopStructured light
In front of the phoneLightDistanceSeed
Rows read0 of 23Dots read0Dots lost0Relief–Depth step2.6 mm

Depth map: how far each dot stands out, mm

080 mm

Seen from above: this row's dots, and the phone

050100150200250300350-75-50-250255075across the face, mmdistance from the phone, mmprojectorcamera

Projector and camera are drawn apart to read; the model puts them 20 mm apart.

How far each dot in the row shifted, px: nearer shifts more

343638404244465101520dot, left to rightshift, px
  • CH1 Dot projector, and the row it's reading
  • CH4 Infrared camera, and the shifts it sees

Watch the Python behind this model run, line by line

How to read the stage

The projector casts 529 dots, row by row, on a face 35 cm away. The chart is each dot's sideways shift; the biggest, in row 13, is 43.25 px, the nose tip, which puts it 277 mm from the phone. Read every row and the depth map stands 73 mm deep. Turn on 3D to see it as a face, then try a printed photo under Break it.

Why the dark doesn't matter

Apple's TrueDepth camera is a dot projector, an infrared camera and a flood illuminator: the dots give depth, and the flood light gives the camera a 2D infrared image. Neither needs the room's light. Bright sunlight is the harder case, because it carries infrared of its own; on the stage, direct sun drowns 168 of the 529 dots and the map gets holes.

From a depth map to yes or no

Enrollment reduces your face to numbers and keeps them as a template. A later scan is reduced the same way and measured against it: under the threshold, it unlocks. Here the numbers are depths at twelve landmarks, and the next morning you come in at 1.1 mm, under 1.2. At that threshold none of 1,000 strangers gets in, and your twin gets in 2 times in 20.

Your template against a new face, and 1,000 strangers

Enrollment: Face ID scans your face and keeps the numbers it reduces it to. Here those are 12 depths at fixed landmarks, averaged over three scans into your template, and every later match is a comparison against it.
StopMatching
Who's lookingThresholdSeed
Distance–Verdict–

The depth map

080 mm

Twelve numbers: depth at each landmark, mm

LandmarkEnrolledThis faceOff by
Nose tip72.0––
Bridge50.7––
Left eye36.7––
Right eye37.0––
Left cheek46.7––
Right cheek46.3––
Chin42.0––
Left jaw30.0––
Right jaw30.0––
Brow30.7––
Left temple26.3––
Right temple26.0––

Strangers let in, of 1,000

0102030405000.511.522.53threshold, mmstrangersthreshold 1.2

Your scans turned away, of 20

0510152000.511.522.53threshold, mmscansthreshold 1.2
  • CH4 Your scans turned away

Watch the Python behind this model run, line by line

One in a million

Apple puts the chance that a random person unlocks your phone at under 1 in 1,000,000, against 1 in 50,000 for Touch ID. The threshold sets that trade-off: on the stage, 0.9 mm turns you away 6 times in 20, and 2.0 mm lets 5 strangers in. Apple warns the odds are worse for twins, siblings who look like you and children under 13. Five failed tries and it asks for the passcode.

Photos, masks and closed eyes

Apple says Face ID always requires depth, which a print or a photo on a screen doesn't have; the stage's photo is 0 mm deep and fails before any comparison. Face ID also checks attention: your eyes have to be open and looking at the phone. Apple randomizes the order of its captures and projects a pattern unique to each device, which makes a recorded scan harder to replay.

What the model leaves out

The faces are synthetic shapes, not scans, and the projector casts 529 dots, not 30,000. Apple's matcher is a neural network trained on over a billion images that turns the depth map and the infrared image into its own numbers; twelve landmark depths stand in for that. The real system also keeps its template in the Secure Enclave and updates it as your face changes.

Questions

Does Face ID work in the dark?
Yes. Apple says it works indoors, outdoors and in total darkness, because the TrueDepth camera lights your face with its own infrared: a dot projector for depth and a flood illuminator for the infrared image. In a very dark room you may see a faint glow from it.
Can a photo unlock Face ID?
No. Face ID needs depth, and a printed photo or a photo on another screen is flat. On the stage, the photo's depth map is 0 mm deep, so it's turned away before any match is tried.
Can my twin unlock my iPhone?
Possibly. Apple says the false-match odds are different for twins and siblings who look like you, and recommends a passcode if that worries you. On the stage, your twin gets in 2 times in 20 at the default threshold.
Why does Face ID fail with my eyes closed?
Face ID is attention-aware: it checks that your eyes are open and looking at the phone before it unlocks, which makes it harder to unlock without your knowledge. If that gets in your way, Apple's setting is Settings > Accessibility > Face ID & Attention > Require Attention for Face ID.
How many times can Face ID fail?
Five unsuccessful match attempts in a row, and the iPhone asks for your passcode before Face ID can be used again.

More of how it works