It took 4 minutes for 911 to be called, let’s fix that with AI

In dedication to Al Rehmtulla


On the night of May 15th, during a cigarette break outside, he was caught in the crossfire of a shooting between 5 others, with one other victim being fatal.

It took a total of 4 minutes for 911 to be called, with one of the survivors calling while hiding behind the office. My dad made it to the hospital, where every second counts, but despite first responders attempts, he passed away within hours.

With my custom dataset using artificial intelligence, the police would have been notified within milliseconds! Making it only a 2-minute buffer, allowing the offenders to be arrested and EMT more time to treat my dad.

My Custom Dataset
My Response

The AI 🤖

The creation process



Yolo divides the full image into a square grid, it then applies a single CNN (convolutional neural network). Using this neural network as opposed to alternatives like an RNN allows YOLO to be blazing fast, reaching 120 frames per second on high-end machines! After it has divided the image into a grid, the algorithm applies bounding boxes and a confidence score of the predicted object.

The entire process of applying grids to bounding boxes:

The IoT 🌐

Starting the code



Flask is the communicator of the project. Once the .jpg has been saved from a security cam, we instantly pass it over here. Using flask we run the image through the instance of yolo and return the output with a list of detections and the confidence score. If a gun is detected we send a notification over the LAN for the Arduino to receive.

The actual functionality of the Flask application is very straightforward. It saves the image into YOLOs path, runs the detection and sends a response!


How you can do the same 🤯

Using this link, I have curated a line by line notebook to get everything working within minutes! I have set it to the standard datasets, but as I rebuild my custom, it will be swapped :)

To get my custom dataset run the following, but as mentioned throughout the article, it needs to be retrained for stability


My next steps ➡️

Shortly after I get the memory needed, a Graphical User Interface (GUI) will also be made, so this can actually be used. Artificial Intelligence has the ability to save countless lives. Let's legitimately implement it!

Why isn’t it open source? This is the ultimate goal but right now, I’m sorting out some major kinks so stay tuned when I publish the final repo.

Connect With Me!

Blockchain and AI developer