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

workspace_premium
Differences in predicted rates of vaginal births after cesarean across racial groups in a ‘race-neutral’ model

A large body of work in machine learning has highlighted that supposedly de-biased systems often re-code sensitive variables like race in terms of proxy variables. In order to determine if this was the case in this calculator, we replicated their formula, then found base-rate statistics of all the input variables for three different racial groups: Black, White, and Asian.
Anjali S.
Mentored by Katie O'Nell
Leveraging AI to Analyze Factors Relating to Social Anxiety

Our research aims to leverage ML to understand what factors play the most critical role in the presence of social anxiety disorder in a person.
Neha K.
Mentored by Udgam Goyal
What Factors Correlate with the Relationship Between Gender and Race and Pursuing STEM?

In this paper, I sought to answer the question, “How do races and genders differ in the way they pursue STEM, and what factors correlate with these differences?” Identifying which factors cause this lack of representation is the most important step in fixing the diversity problem.
Saket R.
Mentored by Bradley Yam