Face ID — What It Is, TrueDepth Technology and Face Recognition Principle

Author: IT Sectr Published: 2026-03-23 Reading time: 8 min

Face ID is Apple’s biometric authentication system based on 3D face scanning using the TrueDepth camera. The technology first appeared in the iPhone X in 2017 and replaced Touch ID in flagship models. According to the Apple Security Guide, the probability of a random Face ID unlock by a random face is 1 in 1,000,000 — 20 times lower than Touch ID with a single registered fingerprint.

Key Takeaways

  • Face ID — Apple’s 3D face recognition system based on the TrueDepth camera with 30,000 infrared dots.
  • TrueDepth consists of a dot projector, an infrared camera and a flood illuminator — all components operate in the spectrum invisible to the eye.
  • Neural Engine (16 cores) processes biometric data on the device and does not transmit it to the cloud.
  • Secure Enclave stores the mathematical face template in an isolated coprocessor inaccessible to iOS and apps.
  • Attention Aware checks that the user is looking at the screen — a gaze with closed eyes or looking away blocks authentication.

What is Face ID?

Face ID is a biometric authentication system developed by Apple for iPhone and iPad. It uses the TrueDepth camera to build an accurate 3D model of the user’s face and compare it with a stored mathematical template. The system works in complete darkness thanks to infrared illumination.

The first iPhone X (2017) introduced Face ID as the primary biometric, replacing Touch ID. According to Apple, the system uses a neural network on the 16-core Neural Engine, which processes up to 600 billion operations per second exclusively for face recognition. Over the years, the technology has gone through several generations — from iPhone X to iPhone 16 Pro, where Face ID works 30% faster and supports more viewing angles.

The key difference between Face ID and its competitors is the use of 3D scanning rather than a regular 2D photo. This makes the system resistant to attacks using images, masks, and videos. In 2023, Apple confirmed that Face ID is used more than 10 billion times per month for authentication, payments, and password autofill.

TrueDepth Camera Architecture

TrueDepth is a camera module consisting of three key components: a Dot Projector, an Infrared Camera, and a Flood Illuminator. All three components operate in the 940 nm spectrum, invisible to the human eye and safe for vision.

Dot Projector

The projector uses a laser diode and a VCSEL (Vertical-Cavity Surface-Emitting Laser) diffraction grating to project over 30,000 invisible infrared dots onto the user’s face. The VCSEL laser operates at eye-safe power levels (Class 1 per IEC 60825) and can build a depth map of the face with an accuracy of up to 0.1 mm.

Infrared Camera and Flood Illuminator

The infrared camera reads the reflection of the dots, while the Flood Illuminator bathes the face in uniform IR light in low-light conditions. Data from the camera is sent to the Neural Engine, which builds a 3D face model and compares it with the stored template in the Secure Enclave. The process takes less than 400 milliseconds and is performed entirely on the device.

ComponentFunctionTechnology
Dot ProjectorProjects 30,000 IR dotsVCSEL laser, diffraction grating
Infrared CameraReads dot reflection1280×960 pixels, 940 nm spectrum
Flood IlluminatorIlluminates face with IR light6 LEDs, 940 nm, Class 1
Neural EngineProcesses 3D model16 cores, up to 1 trillion ops/s

How Face Recognition Works

The Face ID process consists of three stages: image capture, 3D model construction, and template comparison. In the first stage, the Flood Illuminator lights up the face, and the Infrared Camera captures an image in the IR spectrum. Then the Dot Projector projects an array of 30,000 dots onto the face, and the camera captures their distortion relative to the reference grid.

The Neural Engine analyzes the distortion of each dot and builds a depth map of the face — a set of 30,000 X, Y, Z coordinates that describe the face’s topography. Simultaneously, the infrared image is analyzed by a second neural network to verify Attention Aware — the system ensures the user is looking directly at the screen with open eyes.

The depth map and IR image are converted into a mathematical template of approximately 3 KB, which is compared with stored templates in the Secure Enclave. If the match score exceeds the threshold (configurable in iOS), authentication is considered successful. According to Apple, Face ID adapts to appearance changes: beards, mustaches, glasses, hats — the neural network updates the template after each successful unlock.

With the release of iOS 15.4 in 2022, Apple added Face ID support with a mask. The system analyzes only the area around the eyes — their shape, pupil distance, and orbital depth. This uses a specialized algorithm trained on millions of images of faces wearing masks. Unlocking with a mask is slightly slower (0.6 s vs 0.4 s) but provides sufficient security for everyday use.

Face ID Security: Secure Enclave and Attention Aware

Secure Enclave (SEP) is a dedicated coprocessor in Apple A7 chips and later, which operates independently of the main operating system. In the context of Face ID, the Secure Enclave performs two functions: it stores biometric templates in encrypted form and performs mathematical comparison of the new sample with the template. iOS does not have access to the raw camera data — only to the comparison result: match or no match.

The face template is encrypted with a key generated from the chip’s unique identifier (UID) when the device is first turned on. The UID is fused into the Secure Enclave during manufacturing and is inaccessible from outside. According to Apple Platform Security, not even Apple can extract a face template from the device.

Attention Aware is an additional security layer that verifies the user is consciously looking at the screen. Face ID will not unlock the phone if the eyes are closed or gaze is directed away. This protection prevents unlocking while asleep or without the owner’s knowledge. For users with visual impairments, Attention Aware can be disabled in settings, but this reduces the security level.

Protection Against Masks and Silicone Casts

Apple tested Face ID with more than a thousand masks created by professional special effects manufacturers for the film industry. None of the masks could fool the system thanks to a combination of technologies: the infrared camera analyzes the skin’s thermal radiation, the Dot Projector checks the 3D topography, and the Neural Engine detects micro-movements of facial muscles. No confirmed case of bypassing Face ID with a mask has been reported on the market.

Face ID vs Touch ID: Comparison

The choice between Face ID and Touch ID depends on the usage scenario and personal preferences. Face ID works contactlessly — the user just needs to look at the screen. Touch ID requires physical contact with a button or sensor but does not require eye contact with the device.

ParameterFace IDTouch ID
FAR (False Acceptance Rate)1:1,000,0001:50,000
Speed0.4 s0.2 s
Works in the DarkYes (IR illuminator)Yes
Works with a MaskYes (since iOS 15.4)Yes
ContactlessYesNo
Multiple UsersOnly 1 faceUp to 5 fingerprints

After the COVID-19 pandemic, Apple added the ability to unlock Face ID with a mask (iOS 15.4+) — the system analyzes only the area around the eyes. However, for maximum security, Apple recommends using full face recognition. Touch ID is still available on iPhone SE and iPad (Home button) and remains the preferred method for users who wear masks, glasses with thick lenses, or have medical contraindications.

Code Example: LocalAuthentication on iOS

The LocalAuthentication framework provides a unified API for working with Face ID and Touch ID on iOS. The developer does not need to know which specific sensor is installed on the device — the system automatically selects the available biometric method. Below is an example of authentication with attention checking.

swift
import LocalAuthentication

class AuthManager {
    let context = LAContext()

    func authenticate() {
        var error: NSError?

        guard context.canEvaluatePolicy(
            .deviceOwnerAuthenticationWithBiometrics,
            error: &error
        ) else {
            print("Biometrics unavailable: \(error)")
            return
        }

        context.localizedReason = "Authentication required for sign in"
        context.interactionNotAllowed = false

        context.evaluatePolicy(
            .deviceOwnerAuthenticationWithBiometrics
        ) { success, authError in
            if success {
                print("Authentication successful")
            } else {
                print("Error: \(authError)")
            }
        }
    }
}

The canEvaluatePolicy method checks biometric availability on the device — returns false if Face ID is not set up or is locked after too many failed attempts. The interactionNotAllowed parameter determines whether the system can show a dialog to the user. For Face ID, iOS automatically adds the face recognition icon and animation.

Frequently Asked Questions

Can an iPhone be unlocked with a photo?

No. Face ID uses 3D scanning with 30,000 infrared dots, not a regular photo. A flat image does not create a depth map, and the Neural Engine instantly recognizes the forgery. Even a high-quality 3D mask will not fool the system — the algorithms check skin texture and micro-movements of facial muscles.

How many faces can be registered in Face ID?

Face ID supports only one face per device. Unlike Touch ID (up to 5 fingerprints), Apple deliberately limited Face ID to one user for enhanced security. If multiple people use the phone, each unlocks it with their password, not biometrics.

Does Face ID work in complete darkness?

Yes, Face ID works perfectly in complete darkness thanks to the Flood Illuminator — an infrared illuminator that lights up the face with invisible light at a wavelength of 940 nm. The infrared camera captures the image regardless of external lighting.

What happens after 5 failed Face ID attempts?

After 5 failed attempts, Face ID is locked, and the iPhone requires a password. This is protection against brute force. After successful password entry, Face ID becomes active again. When the device is restarted, a password is also required — biometrics are unavailable until the first code entry.

Does Face ID support Apple Pay payments?

Yes, Face ID is used to authorize payments through Apple Pay. To pay, simply double-click the side button and look at the screen. The transaction is confirmed by biometrics, not by entering a PIN. Without Face ID, the payment can only be confirmed with an Apple ID password.

Summary

  • Face ID — Apple’s 3D face recognition system based on the TrueDepth camera with 30,000 infrared dots.
  • TrueDepth includes three components: Dot Projector, Infrared Camera, and Flood Illuminator — all operate in the invisible IR spectrum.
  • Neural Engine processes the depth map on the device without transmitting data to the cloud.
  • Secure Enclave stores biometric templates in encrypted form and is inaccessible to the operating system.
  • Attention Aware prevents unlocking without the owner’s knowledge — the user must look at the screen with open eyes.
  • FAR probability of 1:1,000,000 makes Face ID 20 times more secure than Touch ID (1:50,000).
  • LocalAuthentication provides a unified API for developers, hiding the implementation details of the biometric sensor.

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also