Tech

How Face Unlock Tells a Photo Apart from a Real Face

Key takeaways

  • Face unlock checks three things at once: identity, depth, and liveness, so a flat photo cannot fool it.
  • Apple's TrueDepth system projects more than 30,000 invisible infrared dots to build a 3D map of your face.
  • Active liveness asks you to blink or turn your head; passive systems analyze texture and light in the background.
A diagram showing a smartphone using facial recognition to unlock
A facial recognition system analyzes facial features to authenticate a userPhotograph: mikemacmarketing

Image Credits: Wikimedia Commons / mikemacmarketing

What face unlock checks before letting you in

Face unlock is not just asking "does this face match?" It asks three questions at the same time: does this face match the enrolled owner, does this face have real depth, and is this face alive right now. A printed photo can pass the first test and fails the other two.

This article explains how phones tell a photo from a real face, including the depth-sensing hardware behind Face ID, the liveness-detection software used across the industry, the weaknesses that remain, and the limits of what face unlock can prove.

How your phone reads your face

Every face unlock system starts the same way: enrollment. You scan your face from several angles, and the phone converts that scan into a mathematical model stored securely on the device. Each later unlock compares a fresh scan against that stored model.

On the iPhone X, released in November 2017, Apple replaced the fingerprint-based Touch ID with Face ID and a TrueDepth camera system. TrueDepth combines a dot projector, an infrared camera, and a flood illuminator, all driven by the A11 Bionic chip's neural engine, according to Apple's Face ID security white paper reported by AppleInsider.

Apple said the odds of a random stranger unlocking your iPhone with their face are about one in 1,000,000. That compares with about one in 50,000 for a fingerprint match with Touch ID, as Apple executives told reporters at the 2017 launch, per Inverse's report on the Face ID launch.

Depth mapping: the photo killer

The most important trick is depth. A photograph is flat, and real faces are not. Systems that can measure depth in three dimensions can therefore tell them apart instantly.

TrueDepth projects more than 30,000 invisible infrared dots onto the user's face. The infrared camera reads how that dot pattern distorts over the contours of the nose, eye sockets, and cheeks, and the system builds a depth map from the distortion. Apple's white paper says the depth map and a 2D infrared image are combined into a sequence that is digitally signed, stored in the Secure Enclave, and never leaves the device.

The dot pattern itself is randomized per device, which means the projection cannot be easily predicted or replayed. Attention detection adds another layer: the phone checks where your eyes are looking and will not unlock if you are looking away or your eyes are closed.

Many Android phones take a different route. Cheaper face unlock often uses only the standard front camera with no depth hardware at all. Those systems must rely on software alone, which is why some single-camera face unlock features were historically fooled by photos while depth-based systems were not.

CyberLink, which develops the FaceMe facial recognition engine, calls the printed-photo attack the most basic and common spoofing attack against facial recognition.

Liveness detection: motion, texture, and light

Liveness detection is the security industry's name for the "is it alive?" check. It comes in two flavors, active and passive, as explained by Ping Identity's liveness detection guide.

Active liveness prompts you to do something: blink, smile, turn your head, or read a random phrase. A static photo cannot perform a random challenge. Some systems randomize the challenge so a pre-recorded video cannot pass either.

Passive liveness works silently in the background. It analyzes the biometric sample the camera already captured, looking at skin texture, fine lines, pore patterns, perspiration, and the way light reflects off real skin versus paper or a screen. Printed photos and display replays lack the subtle organic characteristics of living skin, according to CyberLink's analysis of the technique.

The strongest systems combine several signals at once. Ping Identity notes that no single technique is sufficient against all attack types, so modern pipelines layer motion analysis, 3D depth sensing, texture analysis, and machine learning models trained specifically to detect spoofing attempts.

A laptop camera being used for facial login authentication
Facial login on a laptop camera demonstrates how software-based systems authenticate usersPhotograph: Intel Free Press

Image Credits: Wikimedia Commons / Intel Free Press

Where face unlock can still fail

Depth sensing raises the bar, but it does not end the arms race. The proof came in November 2017, just days after the iPhone X launched. Vietnamese security firm Bkav announced it had fooled Face ID with a 3D-printed mask that cost about $150.

The mask was not a simple printout. It combined 3D printing with makeup and 2D images, plus special processing on the cheeks and areas with large skin surfaces to trick the system's AI, according to Ngo Tuan Anh, Bkav's vice president of cyber security, quoted in The Statesman. "We just need half a face to create the mask," the firm said.

Bkav's attack showed that liveness detection trained against photos can be beaten by a physical object with real depth. Since then, the industry has moved toward stricter presentation-attack detection, codified in the ISO/IEC 30107-3 standard for biometric anti-spoofing.

Deepfakes present the newest challenge. Software-based passive liveness must now distinguish real skin texture from AI-generated faces, and Ping Identity lists deepfake content alongside photos, replayed videos, and masks as the spoof types its systems must catch.

What face unlock cannot prove

Face unlock proves that a live person with the enrolled face is in front of the camera. It cannot prove consent, and it cannot identify intent. Apple's own materials note that the system is designed to require the user's attention, but legal experts have pointed out that a face, unlike a passcode, can be scanned from an unwilling person.

Face unlock also performs differently across people. Identical twins and close family members have always been the hard case, and Apple said at launch that twins could defeat Face ID. Masks remain the extreme edge case.

If you use face unlock for banking or password managers, pair it with the strongest settings your phone offers. Enable attention detection where available, and require re-authentication for sensitive actions.

Engineers piloting a facial recognition application with depth sensors
Engineers testing facial recognition technology demonstrate the sensor hardware behind secure authenticationPhotograph: Intel Free Press

Image Credits: Wikimedia Commons / Intel Free Press

Can face unlock be fooled by a photo?

On depth-based systems like Face ID, no: a flat photo has no depth, no skin texture, and no motion, so it fails the liveness check. On older single-camera systems with no liveness detection, printed photos were a real attack, which is why liveness checks now matter.

What is the difference between active and passive liveness detection?

Active liveness asks the user to perform a challenge such as blinking or turning the head. Passive liveness analyzes the camera frame in the background using AI, looking at texture, depth cues, and light reflection, without requiring any action.

How does TrueDepth mapping work?

The TrueDepth camera projects more than 30,000 invisible infrared dots onto the face. An infrared camera reads the distorted pattern and builds a depth map, which is combined with a 2D infrared image and matched inside the phone's Secure Enclave.

Is face unlock as secure as a fingerprint?

Apple rated Face ID's random-match odds at about one in 1,000,000, versus about one in 50,000 for Touch ID at launch. But both have edge cases: twins can defeat Face ID, and researchers defeated it with a $150 3D-printed mask in November 2017.

The bottom line

A photo cannot unlock a modern face-unlock phone because the system checks for depth and life, not just resemblance. Infrared dot projection builds a 3D map, motion and texture analysis look for a living person, and anti-spoofing neural networks watch for presentation attacks. The bar keeps rising, from photos to masks to deepfakes, but the principle stays the same: prove the face is real, live, and present.

Latest in Technology

Get one practical tech explainer in your inbox each week. Subscribe to the Rive News newsletter.

Taggedface unlockbiometric securityliveness detection