Abstract: The increasing frequency of firearm-related incidents in public spaces demands intelligent, automated surveillance systems capable of real-time threat detection. Conventional closed-circuit television (CCTV) systems depend entirely on human operators, making them susceptible to fatigue-induced delays and missed detections. This paper proposes an AI- powered real-time firearm detection and alert system leveraging the YOLOv12m (You Only Look Once, version 12, medium variant) deep learning model. YOLOv12m is selected over its nano counterpart due to its significantly larger parameter count, deeper feature extraction capability, and superior mean Average Precision (mAP), making it more suitable for detecting small and partially occluded firearms in complex surveillance environments. The system captures live video from CCTV cameras or webcams using OpenCV, preprocesses each frame to a YOLO-compatible resolution, and performs single-pass inference to detect pistols and rifles with bounding boxes and confidence scores. Upon detection, the system triggers both visual overlays and audio alerts to immediately notify security personnel. The model is trained on a curated firearm dataset sourced from Roboflow and Kaggle using transfer learning on pre-trained COCO weights. Experimental evaluation yields a Precision of 83.5%, Recall of 80%, mAP@0.5 of 87.1%, and a False Positive Rate of 0.25%, demonstrating the system’s reliability for deployment in smart cities, airports, educational campuses, and government facilities.
Keywords: YOLOv12m, firearm detection, deep learning, real-time surveillance, object detection, OpenCV, transfer learning, convolutional neural network, alert system
Downloads:
|
DOI:
10.17148/IJIREEICE.2026.14426
[1] Savita Waghmode, Prof. Vidhate S.N., "AI-Powered Real-Time Firearm Detection and Alert System Using YOLOv12m Deep Learning Model," International Journal of Innovative Research in Electrical, Electronics, Instrumentation and Control Engineering (IJIREEICE), DOI 10.17148/IJIREEICE.2026.14426