Firearm detection in digital images is an important effort to support surveillance and security systems in reducing potential threats in public spaces. Deep learning–based object detection methods allow fast and accurate identification of dangerous objects, including the You Only Look Once (YOLO) algorithm. This study analyzes the performance of YOLOv11 in detecting long guns and short guns. The YOLOv11 model was trained using 11,969 images divided into training, validation, and testing datasets, supported by data augmentation techniques such as rotation, grayscale, blur, brightness and exposure adjustment, and noise addition. Training was conducted for 100 epochs with an image size of 640 × 640 pixels and a batch size of 8. Experimental results show that YOLOv11 achieved a precision of 91.3%, a recall of 85.9%, an mAP@50 of 92.2%, and an mAP@50–95 of 78.6%. Based on the confusion matrix, an accuracy of 97.79% was obtained, with F1-scores of 98% for long guns and 97.5% for short guns. Additional testing shows performance.
Copyrights © 2026