Low Cost Gunshot Detection using Deep Learning on the Raspberry Pi

Many cities using gunshot detection technology depend on expensive systems that ultimately rely on humans differentiating between gunshots and non-gunshots, such as ShotSpotter. Thus, a scalable gunshot detection system that is low in cost and high in accuracy would be advantageous for a variety of cities across the globe, in that it would favorably promote the delegation of tasks typically worked by humans to machines. A repository of audio data was created from sound clips collected from online audio databases as well as from clips recorded using a USB microphone in residential areas and at a gun range. One-dimensional as well as two-dimensional convolutional neural networks were then trained on this sound data, and spectrograms created from this sound data, to recognize gunshots. These models were deployed to a Raspberry Pi 3 Model B+ with a short message service modem and a USB microphone attached, using a software pipeline to continuously analyze discrete two-second chunks of audio and alert a set of phone numbers if a gunshot is detected in that chunk. Testing found that a majority-rules ensemble of our one-dimensional and two-dimensional models fared best, with an accuracy above 99% on validation data as well as when distinguishing gunshots from fireworks. Besides increasing the safety standards for a city’s residents, the findings generated by this research project expand the current state of knowledge regarding sound-based applications of convolutional neural networks.

[1]  Björn Schuller,et al.  Deep Convolutional Recurrent Neural Network for Rare Acoustic Event Detection , 2018 .

[2]  M. Rizkalla,et al.  A novel approach for the detection of gunshot events using sound source localization techniques , 2012, 2012 IEEE 55th International Midwest Symposium on Circuits and Systems (MWSCAS).

[3]  Justin Salamon,et al.  Deep Convolutional Neural Networks and Data Augmentation for Environmental Sound Classification , 2016, IEEE Signal Processing Letters.

[4]  A. L. Harmer,et al.  Environmental Monitoring , 2018, Nano-Tera.ch.

[5]  Alex Rogers,et al.  Deploying Acoustic Detection Algorithms on Low-Cost, Open-Source Acoustic Sensors for Environmental Monitoring , 2019, Sensors.

[6]  Kyogu Lee,et al.  Rare Sound Event Detection Using 1D Convolutional Recurrent Neural Networks , 2017, DCASE.

[7]  Chao Wang,et al.  Compression of Acoustic Event Detection Models with Low-rank Matrix Factorization and Quantization Training , 2018, ArXiv.

[8]  Kaustumbh Jaiswal,et al.  Sound Classification Using Convolutional Neural Networks , 2018 .

[9]  Mohammad Inayatullah Khan Babar,et al.  Gunshot detection and localization using sensor networks , 2013, 2013 IEEE International Conference on Smart Instrumentation, Measurement and Applications (ICSIMA).

[10]  Luc Van Gool,et al.  Deep Convolutional Neural Networks and Data Augmentation for Acoustic Event Detection , 2016 .

[11]  Karol J. Piczak Environmental sound classification with convolutional neural networks , 2015, 2015 IEEE 25th International Workshop on Machine Learning for Signal Processing (MLSP).