Gun Violence Could Be Prevented By This Machine Learning Model

This machine learning model could reduce gun violence by detecting guns on video surveillance.

The gun debate is an extremely heated one, but everyone on both sides of the aisle can agree that gun violence is—without a doubt—a serious problem. That’s particularly true in the United States, where we have some of the most lax gun laws in the world, and also one of the highest numbers of guns per capita of any country. Everyone wants to reduce gun violence; the debate is just about what is the best way to accomplish that. One way is to immediately recognize when someone is holding a gun, which is exactly what this system is doing to detect guns on video surveillance.

Before we ruffle any feathers, it’s important to note that this system isn’t anti-gun. In fact, the developers have intentionally limited the machine learning model to only detect a gun that is being held in someone’s hand in order to protect the privacy and second amendment rights of gun owners. It won’t, for example, sound the alarm if you have your gun in a holster—whether that’s open carry or concealed carry. That ensures that the system will only respond to a situation that is unlikely to occur outside of an active shooter scenario. That’s not to say that false positive aren’t possible, but authorities can be notified if the system thinks it detects a gun, so that they can review the video surveillance themselves.

From a technical perspective, this is a fairly straightforward exercise in machine learning. As with any other system, this one is only as good as the data used to train the machine learning model. That training data was compiled from two primary sources. The first is video of guns being held, which was broken up into individual frames. The second was a gun store and gun range, where photos were taken of shooters holding their guns. Those photos were taken with the permission of both the gun store owner and the shooters themselves.

That yielded thousands of individual images that were then used to train the machine learning model. The model is also capable of detecting other objects, like a cell phone, which helps to reduce false positives. After training, the machine learning model can look at a video surveillance feed and detect when a gun is in someone’s hand. When it does, it will draw a box around the gun and assign a certainty level from zero to one—with one being absolutely positive that there is, indeed, a gun in a hand. While a system like this definitely can’t prevent gun violence entirely, it could be a very inexpensive way to reduce gun violence in public places where video surveillance is already common.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles