Real-Time Weapon Detection and Suspect Face Capturing System Using YOLOv8 - Chairina Ulfa; Muhammad Fikry; Hafizh Al Kautsar AIdilof (Journal of Applied Informatics and Computing, 2026)
The rise of violent crimes involving sharp weapons and firearms in public spaces, including educational campuses, demands an automated real-time surveillance system to assist security personnel. This study proposes a web-based weapon detection system using YOLOv8, specifically designed to detect seven object classes: sickle, machete, axe, sword, knife, pistol, and rifle. When a weapon is detected, the system automatically captures the suspect's facial image using Haar Cascade and triggers alarm notifications, detection logs, and statistical reports. This integrated data package serves as critical digital evidence to support post-incident identification and investigation. To train the model, we constructed a dataset of 11,445 images sourced from public datasets, video frame extraction, and smartphone camera captures, which was subsequently augmented to 27,687 images to enhance model generalization. The evaluation results demonstrate strong performance with a Precision of 94.3%, Recall of 87.8%, mAP@0.5 of 93.2%, and mAP@0.5:0.95 of 60.1%. Real-time testing at distances ranging from 50 cm to 500 cm confirmed that the system reliably detects most weapon classes, particularly achieving consistent detection for sickles, machetes, and rifles across all tested ranges, while performance for smaller objects like knives and pistols showed decreased accuracy at extreme distances, indicating directions for future work. The findings confirm that the proposed system effectively detects and classifies sharp weapons and firearms in real-time while simultaneously providing visual documentation of the perpetrator, offering a practical and comprehensive security solution for campus environments.