Source-linked AI summary
Automatic Handgun Detection Alarm in Videos Using Deep Learning
Roberto Olmos, Siham Tabik, Francisco Herrera
TL;DR
The paper addresses the need for automatic handgun alarms in videos that operate in real time with low false positives and accurate localization. It builds a CNN-guided training database, compares sliding-window and region-proposal detectors, and finds Faster R-CNN most promising, activating alarms within 0.2 seconds in 27 of 30 scenes.
Problem
Existing systems require human supervision, while video handgun detection must handle occlusion, accurate localization, real-time activation, and approach-specific labeled datasets.
Method
The paper reformulates automatic pistol alarms as false-positive minimization, builds a CNN-guided database, compares VGG-16 sliding-window and region-proposal detectors, and fine-tunes VGG-16 from ImageNet.
Results
27 of 30 scenes activated the alarm within less than 0.2 seconds after five successive true positives using the Faster R-CNN model trained on the new database.
Takeaways & Limitations
The best detector showed high potential on low-quality YouTube videos and provided satisfactory results as an automatic alarm system.
Takeaways & Limitations
False negatives occurred in very low-contrast or low-luminosity frames, during rapid pistol movement, and when the pistol was in the background.
Abstract
from arXiv · showhide
Current surveillance and control systems still require human supervision and intervention. This work presents a novel automatic handgun detection system in videos appropriate for both, surveillance and control purposes. We reformulate this detection problem into the problem of minimizing false positives and solve it by building the key training data-set guided by the results of a deep Convolutional Neural Networks (CNN) classifier, then assessing the best classification model under two approaches, the sliding window approach and region proposal approach. The most promising results are obtained by Faster R-CNN based model trained on our new database. The best detector show a high potential even in low quality youtube videos and provides satisfactory results as automatic alarm system. Among 30 scenes, it successfully activates the alarm after five successive true positives in less than 0.2 seconds, in 27 scenes. We also define a new metric, Alarm Activation per Interval (AApI), to assess the performance of a detection model as an automatic detection system in videos.
1 Introduction
The paper targets real-time automatic handgun alarms in videos, addressing false positives, localization, occlusion, and dataset-design challenges through CNN-based detection models and comparative detector evaluation.
- Motivation: Gun-related violence motivates surveillance systems that can detect handguns early and alert security personnel without relying entirely on operator supervision.The paper positions automatic handgun alerts as a prevention-oriented surveillance or control application.
- Challenges: Occlusion, time-consuming manual dataset construction, and incompatibility between detection approaches make handgun-detection data and modeling difficult to design.Pistols may be handled with one or two hands, leaving substantial portions occluded; labeled datasets may require approach-specific preprocessing and labeling.
- Problem formulation: Pistol detection in videos must activate alarms in real time only when the system is confident and must accurately localize the pistol.These requirements frame the task as both classification and spatial detection under operational constraints.
- Contribution: The work presents an automatic gun alarm system using deep CNN-based detection models and focuses on pistol classes including revolvers, automatic and semi-automatic pistols, and related handgun types.The authors describe the system as, to their knowledge, the first automatic gun detection alarm system using deep CNN-based detection models.
- Method and evaluation: The study reformulates alarm detection as false-positive minimization, compares VGG-16 classification with sliding-window and region-proposal approaches, and applies approach-specific dataset or class optimizations.The detector is selected for accuracy and speed, then evaluated on seven videos and with a metric for alarm suitability.
2 Related works
Related work covers classical gun detection in specialized imagery and RGB images, alongside CNN object-detection strategies; the paper addresses gaps in speed, supervision, and open-area monitoring.
- Gun detection: Prior gun-detection research largely targets concealed handguns in X-ray or millimetric-wave imagery, especially for airport luggage control.These systems use feature extractors and detectors such as density descriptors, border detection, pattern matching, and boosted cascade classifiers.
- Gun detection: Classical RGB handgun detectors use SIFT or RIFT with interest-point methods, but reported approaches cannot detect multiple pistols in the same scene.The cited RGB methods process pistol-related image segments using hand-crafted visual features.
- Gun detection: Earlier cited gun-detection systems are slow, require operator supervision, and are unsuitable for constant monitoring or open areas.These limitations motivate an automatic real-time video detector.
- Detection models: Object detection commonly runs a trained classifier over image regions generated either exhaustively by sliding windows or selectively by region proposals.Sliding windows scan locations and scales, whereas region proposals select candidate regions before classification.
- Detection models: Sliding-window detection can consider about 10^4 candidate windows per image, making accurate detection potentially too slow for real-time use.The approach evaluates windows across all locations and multiple scales.
- This work: This work develops and compares a CNN classifier across new datasets within sliding-window and region-proposal methods for real-time pistol alarm detection.Its stated contribution is a new deep-learning solution aimed at real-time operation.
3 Deep learning model
The paper uses VGG-16 as its deep CNN model, trains it by minimizing regularized prediction loss with SGD, and initializes the network through ImageNet fine-tuning.
- VGG-16 architecture: VGG-16 contains 16 convolutional layers, five max-pooling layers, three fully connected layers, and 144 million parameters.Its architecture uses 3 × 3 convolutional receptive fields, 2 × 2 max-pooling, ReLU activations, Softmax output, and dropout regularization.
- Training objective: CNN training minimizes average prediction loss over mini-batches while adding weight decay regularization.The objective is expressed using the loss function, network predictions, current weights, and regularization coefficient.
- Optimization: Stochastic Gradient Descent updates the network weights during training, with momentum and learning rate controlling the update.The paper identifies SGD as the optimization method used for deep CNN training.
- Initialization: The model is fine-tuned from VGG-16 weights pre-trained on ImageNet rather than trained entirely from scratch.The paper describes transfer learning as a way to reuse knowledge when very large task-specific datasets and computing resources are unavailable.
4 Database construction: Towards an equilibrium between false positives and false negatives
The paper develops database and detector variants to balance false positives, false negatives, and near-real-time operation. Increasing classes reduces false positives in sliding-window detection, while Faster R-CNN trained on Database-5 achieves the strongest overall detection and near-real-time speed.
- Automatic pistol detection in videos requires minimizing false positives while maintaining near-real-time detection.
- Sliding window approach: The sliding-window approach reduces false positives by increasing the number of classes across Databases 1–4.The study compares this strategy with region proposals trained on a richer Database-5.
- Sliding window approach: Database-1’s broad gun class produced 191 false positives and 272 false negatives, motivating the narrower pistol-detection task.The authors attribute the difficulty to the large variety of guns in the class.
- Multiple classes: Database-3’s 28-class model reduced false positives to 5 and raised precision to 94, 44%, but false negatives remained high.
- Multiple classes: Database-4’s 102-class classifier achieved recall of 31, 91% and F1 measure of 47, 67%, with 207 false negatives.
- Sliding window approach: The sliding-window detector had recall of 35% and high precision with few false positives, but its execution time was unsuitable for online detection.Processing a 640 × 360-pixels image took 1, 5 seconds.
- Region proposals approach: Faster R-CNN trained on Database-5 obtained recall of 100% and F1 score 91.43%, with precision of 84, 21% and 57 false positives.Database-5 contains 3000 images with pistol bounding-box annotations and varied contexts.
- Region proposals approach: Faster R-CNN processed 1000 × 1000–pixels images in approximately 0, 19 seconds at 5.3 frames/s, enabling near-real-time pistol detection.
5 Analysis of the detection in videos
The best detection model was evaluated on seven low-quality YouTube videos for detection, localization, and alarm suitability. It achieved generally high precision with few false positives, while misses occurred mainly under poor visibility, rapid motion, or background placement.
- Evaluation setup: The evaluation used seven low-quality public YouTube videos, including film excerpts and a long pistol-threatening video.The videos varied in characteristics and were analyzed to assess the best detection model.
- Evaluation setup: A detection counted as a true positive when the predicted bounding box overlapped the handled pistol by more than 50%.Pistols recognizable to a human viewer were treated as ground truth.
- Detection performance: The detector achieved a good precision–recall balance, especially in videos 2 and 6, with very high precision in videos 1–4, 6, and 7.The number of false positives was very low across all videos.
- Detection performance: False negatives occurred in frames with low contrast or luminosity, during rapid pistol movement, or when pistols appeared in the background.Figures 4 and 5 illustrate background and low-visibility failure cases.
- Alarm evaluation: The proposed alarm metric, AATpI, measures the time required to activate an alarm after at least k successive true-positive frames.The analysis used k = 5 and evaluated 30 scenes containing clearly visible pistols.
- Alarm evaluation: The model detected pistols in 27 of 30 scenes with an average AATpI of 0.2 seconds, supporting its suitability for automatic alarm operation.The three failures had the same visibility, motion, or background-related causes described above.
6 Conclusions and future work
The paper presents an automatic pistol-detection system for surveillance and control, reformulating detection around minimizing false positives. A Faster R-CNN model trained on the new database performed strongly, including in low-quality videos and alarm scenes.
- The work presents an automatic pistol-detection system for surveillance and control purposes.
- The authors reformulate video detection as minimizing false positives and construct training data guided by a VGG-16 classifier.They compare sliding-window and region-proposal approaches.
- The Faster R-CNN model trained on the new database obtained zero false positives, 100% recall, and 84,21% precision.The conclusion also reports a high number of true negatives.
- In 27 of 30 scenes, the detector activated the alarm after five successive true positives within less than 0.2 seconds.