Face spoofing poses a major threat to facial recognition–based authentication systems, especially in web-based environments that require lightweight and real-time verification. This study develops a real-time anti-spoofing system that integrates YOLOv8n for classifying four facial categories (real, printed, digital, and mask), combined with blink-based liveness verification using the Eye Aspect Ratio (EAR). Using 400,800 images and 18 videos, two training strategies—pretrained and from scratch—were evaluated. The pretrained model achieved a precision of 99.5%, recall of 98.6%, mAP50 of 99.4%, and mAP50–95 of 90.4%, slightly outperforming the from-scratch model. EAR threshold evaluation showed that a value of 0.17 yielded the best performance with 99.02% accuracy, 100% recall, a FAR of 16.11%, and an FRR of 0%. The proposed integration of YOLOv8n and EAR represents a practical novelty for lightweight, web-based anti-spoofing, providing fast inference and stable real-time performance suitable for modern facial authentication systems.
Copyrights © 2025