Real-Time Weapon Detection Using YOLOv8n for Public Surveillance
摘要
Public safety has become a critical concern due to increased threats in public areas such as schools, malls, transport hubs and government offices. Traditional CCTV systems rely on human monitoring, which is slow, prone to error, and unable to provide rapid response. This research proposes a lightweight, real time detection system using the YOLOv8n model, which is optimized for high-speed interface on low-end and mid-range hardware. A custom dataset consisting of weapons such as pistols, knives, rifles and sharp objects was prepared and annotated for training. The model achieved high accuracy with mAP50 of 94.3% and an average interface speed of 32 FPS on a standard GPU. The system was deployed using Python, OpenCV, and a Flask-based web interface for real-time surveillance monitoring. Experimental results demonstrate that the proposed YOLOv8n-based model provides reliable detection with minimal computation cost, making it suitable for smart surveillance and security applications.