Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Face Liveness Detection for Restricted Area Entry

A real-time biometric intrusion detection system that verifies face liveness to prevent spoof-based unauthorized access in restricted environments. The system focuses on presentation attack detection using classical computer vision techniques with real-time webcam input.


📌 Published Research

This repository accompanies the following peer-reviewed publication:

Intrusion Detection System for Restricted Areas Entry Using Haar Cascade and LBP Classifier
Balina Sri Vaishnavi et al.
📍 Proceedings of the Fourth International Conference on Computing and Communication Networks (ICCCNet-2024)
📘 Springer – Lecture Notes in Networks and Systems
🔗 DOI: https://doi.org/10.1007/978-981-96-6124-4_50


🔐 Security Context

Biometric access-control systems are widely deployed in restricted areas such as laboratories, offices, and secure zones. However, many systems remain vulnerable to presentation attacks, including printed photos and screen replay attacks.

This work enhances physical access security by integrating:

  • Face detection
  • Eye-blink-based liveness verification
  • Texture and reflection analysis
  • Distance-aware validation

🧠 Method Overview

The system operates on a live webcam feed and performs the following steps:

  1. Capture real-time video frames
  2. Convert frames to grayscale
  3. Detect faces using:
    • Haar Cascade Classifier
    • Local Binary Pattern (LBP) Classifier
  4. Extract eye regions and compute Eye Aspect Ratio (EAR)
  5. Detect eye blinking across consecutive frames
  6. Apply anti-spoofing checks:
    • Screen reflection analysis
    • Skin texture analysis
  7. Estimate camera-to-face distance
  8. Classify input as REAL or FAKE

🎯 Threat Model

Attacks Addressed

  • Printed photo attacks
  • Screen replay attacks (mobile/laptop displays)
  • Static image spoofing

Out of Scope

  • 3D mask attacks
  • Adversarial deepfake generation

📊 Experimental Results

Performance without Distance Estimation

Classifier Accuracy Precision Recall F1-score
Haar Cascade 99.60% 99.80% 99.80% 99.80%
LBP 99.09% 99.08% 100% 99.54%

Performance with Distance Estimation

Classifier Maximum Distance Accuracy
Haar Cascade 2.73 m 99.82%
LBP 2.0 m 99.56%

Haar Cascade consistently achieved higher accuracy and better distance tolerance.


🛠️ Tech Stack

  • Language: Python
  • Libraries: OpenCV, NumPy, SciPy, scikit-learn, Matplotlib
  • Input: Live webcam feed
  • Platform: Windows / Linux

📂 Repository Structure

├── src/            # Liveness detection implementation
├── models/         # Haar and LBP cascade classifiers
├── assets/         # Audio alert for intrusion detection
├── requirements.txt
├── LICENSE
└── README.md

▶️ Usage

git clone https://github.com/BSV2003/Real-Time-Face-Liveness-Detection.git
cd Real-Time-Face-Liveness-Detection
pip install -r requirements.txt
python src/Fincode-haar_reflection.py

📚 Citation

If you use this work in your research, please cite:

@InProceedings{10.1007/978-981-96-6124-4_50,
author="Sri Vaishnavi, Balina
and Nayak, Padmalaya
and Trivedi, Veena
and Swaraja, K.
and Sai Hanuman, A.",
editor="Kumar, Akshi
and Swaroop, Abhishek
and Shukla, Pancham",
title="Intrusion Detection System for Restricted Areas Entry Using Haar Cascade and LBP Classifier",
booktitle="Proceedings of Fourth International Conference on Computing and Communication Networks",
year="2025",
publisher="Springer Nature Singapore",
address="Singapore",
pages="621--633",
abstract="Security is one of the essential requirements in restricted areas to protect valuable assets and sensitive information ensuring human safety. The traditional physical security system has some limitations to provide authentication to access official information in restricted areas. With the growing demand of modern society, the requirement of face detection has become an utmost important issue. However, a biometric technique is used for human recognition systems to understand human behavior for security and identification through fingerprints, facial features, gaits palms, and voice. While crafting a facial recognition system, the level of recognition accuracy mainly relies upon several factors such as facial expressions, facial positions, facial attributes, and the distance coverage by the camera. This research proposes a face recognition system using OpenCV, Haar cascade classifier, and local binary pattern (LBP) classifier where the optimized distance covered by the webcam is found to improve recognition efficiency. The performance metrics of both classifiers have been measured to detect the face in two cases. In the first case, the distance is not considered while applying the classifiers, and in the second case, the distance is considered to find the optimal accuracy. Our experimental study shows that the Haar cascade classifier provides better accuracy of 99.60{\%} than the LBP classifier which provides 99.09{\%} accuracy. Furthermore, our experimental results reveal that the Haar cascade classifier provides 99.82{\%} accuracy when the maximum distance is 2.73 m and the average distance from webcam to face is 1.88 m. Similarly, the LBP classifier provides 99.56{\%} accuracy when the maximum distance is 2 m, but the average distance is 1.41. So, this work favors the Haar cascade classifier over the LBP classifier concerning accuracy and average distance.",
isbn="978-981-96-6124-4"
}

About

Real-time face liveness detection for restricted-area intrusion prevention using Haar and LBP classifiers. Published at ICCCNet-2024 (Springer LNNS).

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages