Back To Projects

Telling Gunshots and Gunshot-like Sounds Appart

Barbara T.

Sounds differ from each other. Having a strong ML model that can distinguish between the sounds and correctly classify them, may help with a variety of social problems, such as human and animal well being, (e.g. some sounds cause harm to autistic people and/or animals), safety drills (people with hearing disabilities may not be aware of the alarms), mass shootings, etc. Although reducing a false positive rate (e.g. a rate of other sounds falsely classified as gunshots) would help decrease the number of false alarms, it is more important (for the safety and security reason) to actually reduce the false negative rate (e.g. a rate of actual gunshots not being recognized as such).


Sounds differ from each other. Having a strong ML model that can distinguish between the sounds and correctly classify them, may help with a variety of social problems, such as human and animal well being, (e.g. some sounds cause harm to autistic people and/or animals), safety drills (people with hearing disabilities may not be aware of the alarms), mass shootings, etc. Although reducing a false positive rate (e.g. a rate of other sounds falsely classified as gunshots) would help decrease the number of false alarms, it is more important (for the safety and security reason) to actually reduce the false negative rate (e.g. a rate of actual gunshots not being recognized as such). The research started with searching for and collecting data. The first database found in one of the public github repositories is a collection of plastic bag pop sounds. The second database is a collection of various gunshot recordings. An identical number of data points from each database was used as an input to the machine learning models. Two types of ML models have been developed: classification linear regression model and convolutional neural network (CNN). Furthermore, in order to prevent these models from overfitting by learning from only these two different types of sound, the original dataset has been augmented and a random noise was added to the half of this enlarged database. The first classification model (logistic regression) used with the original database resulted in 0.561 accuracy. When used with the augmented dataset with half of it being slightly distorted, its accuracy level was ranging from 0.557 to 0.610. The CNN model, on the other hand, produced much better results with both the original and augmented data. The accuracy level of the convolutional neural network used with the original data reached 0.972 for 14 epochs and 0.996 for 30 epochs, whereas the accuracy level of the CNN model used with the augmented data was 0.983 for 14 epochs and 0.972 for 30 of them. While CNN model reported back very high accuracy, it is still not good enough for recognizing actual gunshots among a variety of sounds, which were not used in the project, and for this reason it is not meant to be the sole tool for recognizing an active shooter.

Explore More!

Barbara T.
Ivan Villa-Renteria
MS Computer Science at Stanford

Related Projects

DeepSolar Bangladesh: A Novel Convolutional Neural Network (CNN) Architecture for the Detection of Solar Panels from Low Resolution Satellite Imagery in Developing Countries

Due to its environmental benefits and decreasing costs, the supply of solar energy is growing at an accelerating pace globally. However, the decentralised nature of solar makes it difficult to keep track of the different photovoltaic (PV) systems deployed across a country. There is a critical need for highly accurate, comprehensive national databases of solar systems, which would allow policymakers, researchers, and the government to study socioeconomic trends in solar deployment. Manual surveys have shown to be inaccurate. The 2018 DeepSolar study by Yang et. al developed a deep-learning framework and national solar deployment database for the US using high-quality satellite imagery, which proved to be a much more efficient and accurate approach. However, satellite imagery in developing countries such as Bangladesh is of much lower resolution and quality, and performed poorly with the original DeepSolar model by Yang et. al. Our study highlights the implementation of a novel convolutional neural network (CNN) in detecting solar panels through low resolution Google Static Maps API satellite imagery data.
Khondoker F.
Mentored by Barbie Duckworth
Predicting Mental Health Conditions Using Student Demographic Information

With this, we will train the data to extrapolate what symptoms the user has based on their demographics and academic/social life. This can help understand what symptoms a person has of certain characteristics.
Ashwith Y.
Mentored by
How Does One’s Background Determine Their Mental State?

Mental health issues have become very prevalent in recent times, and although significant progress has been made in terms of treatment in the form of counseling, medication, and other methods, in order to truly find out the root cause of many mental health issues, a correlation has to be drawn between one’s mental state and another factor, such as family history, age, work environment, etc. It is also beneficial to correlate one’s mental state with a multitude of factors to see the compilation.
Sohum T.
Mentored by Akshay Jagadeesh