
How face unlock maps your face in 3D
Face unlock projects thousands of invisible dots onto your face, builds a depth map and checks it with a neural network on the phone itself.
Key takeaways
An infrared dot projector paints your face with an invisible pattern.
An infrared camera turns the shifted dots into a 3D depth map.
An on-device neural network compares it with your enrolled face.
Face data stays in secure hardware; apps only get a yes or a no.
Glance at your phone and it unlocks. On phones with 3D face unlock, such as the iPhone's Face ID, that glance starts a fast sequence: infrared light, a depth map, a neural network and a locked-down part of the chip. Some other phones rely on the ordinary front camera alone, which is simpler and generally easier to fool. This breakdown follows the 3D approach.
Step 1: Invisible light hits your face
When the phone senses you might be looking at it, two infrared light sources switch on. A flood illuminator bathes your face in infrared light so the system can see you even in the dark. A dot projector casts a precise pattern of dots onto your face. On Face ID, Apple says that pattern contains more than 30,000 dots. Infrared sits just outside the range of light human eyes can see, so you notice none of it.
Step 2: The dots become a depth map
An infrared camera photographs how the dot pattern lands. On a flat wall, the dots would sit in a predictable arrangement. On a face, each dot shifts depending on how far that point is from the camera, so the tip of your nose bends the pattern differently from your cheeks. From those shifts, the system calculates a depth map: a 3D model of the shape of your face, captured alongside a flat infrared image.
This is why holding up a printed photo does not work. A photo has color and detail, but it has no depth.
Step 3: A neural network compares the math
The depth map and infrared image go to a neural network running inside protected hardware on the phone's own chip. It converts them into a compact mathematical representation and compares that with the one saved when you set up face unlock. It is not looking for a pixel-perfect match. It was trained to judge whether two faces belong to the same person, allowing for glasses, hats, beards and changing light.
- Attention check: by default, Face ID requires your eyes to be open and looking at the screen.
- Adapting: the stored representation is gradually updated as your appearance changes.
- Fallback: the phone asks for your passcode after a restart, after several failed attempts or when it has not been unlocked for a while.
Step 4: The secure enclave guards the data
Your face data stays on the device and is not uploaded to the cloud. It is encrypted and protected by the Secure Enclave, an isolated section of the chip with its own protected memory. The main operating system and apps never see your face data. They only receive a yes or a no, and a yes releases the keys that unlock your phone.
Why it matters
3D face unlock is both convenient and much harder to fool than a photo, because it measures shape, not just appearance. Apple states that the chance a random person could unlock Face ID is less than one in a million, while noting the odds are higher for twins, close siblings and young children. Your passcode is still the master key, so make it a strong one: anyone who knows it can get into your phone.



