# Effective Strategies for Enhancing Real-Time Weapons Detection in Industry
## 1 Introduction  
Gun violence is a pervasive phenomenon in the daily lives of numerous people worldwide. This issue transcends borders and affects communities, families, and individuals, generating a significant impact on the security, well-being, and tranquillity of societies. The proliferation and easy access to firearms, coupled with social, economic, and cultural factors, contribute to the persistence of this global problem. Thanks to numerous technological advancements and the widespread adoption of deep learning, an increasing number of aspects of our daily lives are now being encompassed by artificial intelligence. In the context of weapons detection, the majority of the collected data show weapons close to the camera (foreground). In the field of security, the widespread use of closed-circuit television (CCTV) systems makes the utilisation of such datasets inappropriate, as they fail to capture real-case scenarios. This is due to the fact that cameras within these systems are typically installed at high altitudes, resulting in smaller-scale objects in the video stream. [PERSON] et al. [1] mentioned that a handgun can occupy around 3% of the total image size. Additionally, environmental factors such as ambient lighting or the time of day can reduce image quality, causing images to become noisy and objects to blend with their surroundings. Another issue is that CCTV surveillance requires at least one person to constantly monitor one or more environments simultaneously, leading to the possibility of missed threats and delayed responses to hazards. For example, [PERSON] et al. [2] noted that, typically, even trained professional operators often fail to detect objects on surveillancevideos after 20 min of continuous monitoring. Therefore, combining human attention with a real-time detection system to identify threat objects can be highly effective and valuable. While there is considerable research on weapons detection, only a few of these solutions are applied in practice. When deployed in real-world environments, multiple problems emerged, including challenges in achieving real-time inferences, insufficient accuracy, and, most importantly, high false positive rates. Despite these challenges, several companies already offer commercially available deep learning-based weapons detection services ([[https://zeroeyes.com/](https://zeroeyes.com/)]([https://zeroeyes.com/](https://zeroeyes.com/)), [[https://www.scylla.ai/](https://www.scylla.ai/)]([https://www.scylla.ai/](https://www.scylla.ai/)), [[https://www.omnilert.com/](https://www.omnilert.com/)]([https://www.omnilert.com/](https://www.omnilert.com/)), [[https://actuate.ai/](https://actuate.ai/)]([https://actuate.ai/](https://actuate.ai/))). This paper conducts a comparative analysis of various versions of real-time firearms detection, drawing on our experience with a real customer who utilised our solution. The analysis employs a method called Scale Match to address the scale mismatch between the datasets used. Additionally, a straightforward detection scheme is designed to decrease the number of false positives by introducing a larger secondary classifier and a temporal window. Importantly, these modifications have a minimal impact on the inference time of the system. The goal of this work is to offer guidance on enhancing the performance of models trained for weapons detection when deployed in production environments. The main contributions presented in this paper are as follows:  
1. A dataset has been released to test the effectiveness of models in real-world situations against CCTV systems ([[https://deepknowledge-us.github.io/DISARM-dataset/](https://deepknowledge-us.github.io/DISARM-dataset/)]([https://deepknowledge-us.github.io/DISARM-dataset/](https://deepknowledge-us.github.io/DISARM-dataset/)), accessed on 5 February 2024).