# Towards an Indoor Gunshot Detection and Notification System Using Deep Learning
## 2 Related Work  
Some cities utilize companies such as SoundThinking (formerly ShotSpotter) (Fremont, CA, USA) [7] to detect and localize gunshots on a large scale. In this system, sensor modules are installed around the city in outdoor places--it is not used for indoor crimes. Moreover, these systems are extremely expensive to run and maintain, and gunshot detection involves both automated and manual human analysis. This system costs up to USD 90,000 annually per square mile of coverage. This system is installed by the city authority and not by individuals or institutions for personal use. To reap the benefits of this system, a user needs  
Figure 1: Crime scene (**a**) where the shooting happened. The gunshot detector device (**b**) is connected to the Wi-Fi of the building. It detects gunshot sounds and sends data to the central server through the Internet (**c**) using a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol. The crime scene location is marked on the map (**d**), event data are saved in the Structured Query Language (SQL) database, and the software sends notifications using Firebase Cloud Messaging (FCM) to the user’s smartphone app (**e**) and the emergency responder’s smartphone app (**f**). The emergency responder’s car (**g**) is dispatched. to move to one of the cities where this system is implemented, which is an overhead. In this paper, the proposed gunshot detection device is mainly targeted for indoor gunshot detection and any user can place it in the rooms of a building. The hardware cost of the proposed device is approximately USD 300. In ref. [8], the method for identifying shotgun blasts relies on the detection of the distinctive muzzle blast signature. The authors developed a specialized filter tailored to recognize shotgun muzzle blasts from the digitized audio signals. The work in ref. [9] proposes a gunshot noise detection method using Zero-Phase Technique. The works in ref. [8; 9] process the signals in the time domain instead of using state-of-the-art machine learning techniques. The accuracy of their approaches was not reported and no hardware implantation results are presented. In ref. [10], the authors extracted 11 features from each signal--from a dataset of both gunshot and non-gunshot instances--and used them as input to a neural network for classification. This study employs a neural network with a default MATLAB implementation, featuring one hidden layer containing 10 neurons. The authors report a precision of 69.3%. However, most deep learning approaches with many hidden layers produce better accuracy and precision. The authors in ref. [11] use a semi-supervised Non-negative Matrix Factorization (NMF) approach, composed of training and separation stages, to detect gunshots. The result shows that the maximum true positive (TP) was 50% when signal-to-noise ratios (SNR) were 5 dB. No hardware implantation results are presented. The authors in ref. [12] implement two parallel Gaussian Mixture Modelling (GMM) classifiers for discriminating screams from noise and gunshots from noise. Different audio features are used to train the classifiers. The authors report a precision of 93% to detect events when the SNR is 10 dB. Embedded system implantation and notification systems are not included in the work. In ref. [13], the authors propose a gunshot event recognition system based on audio and visual features fed into a support vector machine (SVM) classifier. The authors developed a semantic gunshot scene description from video sequences by incorporating gunshot sounds, human emotion, and human activity analysis. The maximum precision reported for gunshots is 73.46%. The work in ref. [14] uses two Artificial Neural Networks (ANN) to detect muzzle blasts and shockwaves from the gunshot sound. A gunshot is recognized if both the muzzle blast and shockwave are identified. A band-pass filter is used to remove undesirable frequencies from the gunshot sound. Then, spatial and frequency domain features are extracted and fed to the ANNs. Each ANN contains only one hidden layer.