LivenessPublished 22 October 2026 · 7 min read · IDNexus Engineering

What Is Liveness Detection? A Developer's Guide

On this page
  1. Why face recognition alone is not enough
  2. Active and passive liveness
  3. How liveness is measured
  4. Where the decision must be made
  5. Questions to ask any vendor
  6. How IDNexus approaches it

Short answer. Liveness detection checks that a live human is present during a biometric capture, and not a printed photo, a replayed video or a mask. It runs before face matching, because matching a spoofed face against an ID proves nothing.

Why face recognition alone is not enough

A face-matching model answers one question: do these two images show the same face? It has no opinion on whether the face in front of the camera is alive. If an attacker holds up a photo of your customer taken from social media, a matcher will return a high score. Liveness detection exists to close that gap.

The attacks it defends against are called presentation attacks: anything shown to the sensor to impersonate someone or to hide your own identity.

AttackWhat the attacker doesWhat gives it away
Printed photoHolds a paper or photo print to the cameraFlat surface, paper texture, no depth, no micro-movement
Screen replayPlays a photo or video on a phone or tabletMoiré patterns, screen glare, bezel edges, refresh artefacts
MaskWears a 2D cut-out or a 3D maskMaterial texture, unnatural eyes and mouth, uniform skin reflectance
Synthetic videoFeeds generated video into the capture pipelineNeeds injection detection as well; see our deepfake guide

Active and passive liveness

Active liveness asks the user to do something: blink, turn their head, follow a dot, read digits aloud. The system checks that the response matches the prompt. It is intuitive, but it adds friction, and a determined attacker with video-editing tools can script the expected movements.

Passive liveness analyses the capture itself, with no instructions. Models look at skin texture, reflections, depth cues, colour distribution and, where video is available, subtle motion. The user simply takes a selfie, so completion rates are higher.

Most serious systems combine the two: passive analysis on every capture, with an active challenge added when risk is higher or the passive score is borderline.

How liveness is measured

The international standard for presentation attack detection is ISO/IEC 30107-3. It defines two error rates you should always ask for together:

  • APCER (attack presentation classification error rate): the share of attacks wrongly accepted as genuine. This is your security number.
  • BPCER (bona fide presentation classification error rate): the share of genuine users wrongly rejected. This is your conversion number.

They trade against each other. A vendor quoting one without the other is telling half the story. Independent labs such as iBeta test products against this standard; our article on open-source models explains what those tests do and do not prove.

Where the decision must be made

If the browser or app decides that a face is live and sends your server a "passed" flag, an attacker only has to forge that flag. The verdict has to be computed on a server you control or trust, from the raw capture. We cover this in Server-side vs. client-side liveness.

Questions to ask any vendor

  • Which attack types were tested, and by whom? Ask to see the report, not a badge.
  • What are the APCER and BPCER at the threshold I will actually use?
  • Does the decision happen server-side, and what does the response contain?
  • What happens with a poor-quality image: a retry prompt or a silent failure?
  • How are models updated when new attack types appear?

How IDNexus approaches it

Every request passes a quality gate first, so blurred, glared or dark frames are reported as bad captures and not as failed identities. Liveness then runs server-side and returns a score, the tier used and the model version, so you can set your own threshold and explain any decision later.

Add liveness to your signup in one call

IDNexus Basic runs liveness on a selfie for 10 credits ($0.10). Standard adds the document and face match for 50 credits.

Create account