Liveness detection is a security gate in face recognition: it decides whether the subject is a real living person, resisting spoofing with photos, video replay or printed masks.
Why liveness is mandatory
Plain face matching only answers "does it look like the enrolled person", not "is it a real person vs. a picture of one". Without liveness, an attacker can fool access with the authorized person’s photo or screen recording.
Common techniques
One is interactive: ask the user to blink, turn or read digits to confirm life. The other is passive: infer material differences via infrared, 3D structured light or texture — with no user action. Passive is smoother and often combined with interactive.
Attack types and defense
Printed photos, phone replays, HD screen playback and 3D masks are typical attacks. Dual-infrared and 3D structured light sense real skin reflection and depth, strongly defending against flat and mask attacks.
What to check when selecting
Balance false-reject and false-accept: too strict rejects real users (hats / poor light), too loose leaks attacks. Prefer solutions validated at real project scale and confirm audit trails on liveness failure.
Relation to compliance
Liveness is one part of the "real person + authorized" double check, together with data localization and authorized retention forming the compliance base for biometric projects.

