How does face unlock work?
Short answer: Face ID lights your face with invisible infrared light, then projects thousands of infrared dots (over 30,000 in Apple's 2017 guide) that an infrared camera reads. How far each dot shifts gives a 3D depth map, so it measures your face, which is why a flat photo can't unlock it.
How it works
Your phone can unlock for you in pitch darkness, but not for a photo of you. We zoomed into the parts next to the selfie camera to see what it's actually seeing:
- 1Its own light. A flood illuminator washes your face in infrared light: invisible to you, daylight to its camera. That's how it works in the dark.
- 230,000+ dots. The dot projector fires more than 30,000 invisible dots (Apple's 2017 figure; Apple now just says "thousands"). Teardown analyses describe a tiny laser shining through a patterned lens that copies its light into the dots.
- 3The shift is depth. The phone knows where each dot would land on a flat wall. Its infrared camera sits off to one side, so the closer a bit of your face is, the further its dot slides. Measure every slide and you get a 3D map.
- 4Eyes open. It checks that your eyes are open and looking at the screen, so it won't unlock while you're asleep. (You can turn this off in Accessibility settings.)
- 5Numbers, not photos. A neural network in a locked-off part of the chip, the Secure Enclave, turns the map into a list of numbers and checks it against yours. In normal use no photo is kept, and it quietly adapts as your face changes.
- 6The odds. Apple puts the chance of a random stranger unlocking it at about 1 in 1,000,000. It's higher for identical twins, siblings and children under 13.
MYTHA photo of you can unlock face unlock.
REALLYNot Face ID: it needs depth, and a photo is flat, so every dot lands flat. But some Android phones use only the selfie camera, which their makers say is less secure than a PIN. That's why your banking app might ask for your fingerprint.
People also ask
Does Face ID work in total darkness?
Yes. Apple designed Face ID to work even in total darkness, because it brings its own infrared light.
Does Face ID store a photo of my face?
Not in normal use. It keeps a mathematical representation inside the Secure Enclave, and the face images it captures to unlock are discarded.
Is Android face unlock as secure as Face ID?
It depends on the phone. Google and Samsung both say their camera-based face unlock is less secure than a strong PIN or a fingerprint.
Why does my banking app ask for my fingerprint instead of my face?
On Android, only face unlock rated Class 3, the top biometric class, can unlock an app's strongest security keys. Where face unlock is rated lower, the app can ask for a fingerprint or PIN instead.
Read the transcript
Your phone can unlock for you in pitch darkness, but not for a photo of you. So what is it actually seeing? It's all hiding next to the selfie camera First it floods your face with infrared light invisible to you daylight to its camera Then the dot projector fires inside a tiny laser shines through a patterned lens that copies its light into more than 30,000 invisible dots The phone knows exactly where each top would land on a flat wall on your face every dot lands somewhere else Why the camera sits off to one side of the projector? So the closer a bit of your face is the bigger its dots slide measure every slide and you get depth So it doesn't look at your face. It measures it a photo is flat. So every dot lands flat rejected It even checks that your eyes are open and looking at the screen so it won't unlock while you're asleep Then a neural network and a locked off part of the chip turns that 3d map into a list of numbers and checks it against Yours no photo of you is kept and it quietly adapts as your face changes Apple puts the odds of a random stranger getting in about one in a million Some Android phones use just the selfie camera their makers say that's less secure than a pin Which is why your banking app might ask for your fingerprint instead It doesn't see your face. It measures it and that's how it works
Sources we checked
- Apple: Face ID Security guide (Nov 2017, PDF)
- Apple Support: About Face ID advanced technology
- Pagès, Salvi, Matabosch: Coded structured light for 3D measurement (IEEE ICIP 2003, PDF)
- Android Open Source Project: Biometric classes
- Google Pixel Help: Face Unlock
- Samsung US: Use facial recognition security on a Galaxy phone or tablet
Spotted a mistake? Email cogling.studio@gmail.com and we'll check it.
More explainers
Why does AI run on a gaming card?
One chatbot answer is nearly 50 trillion sums. By hand: 1.5 million years. A gaming card: under a second. Here's how a game chip ended up running AI.
Wi-Fi from a black-hole hunt
The hunt found nothing. The maths it left behind fixed Wi-Fi's echo problem.