A big problem in countries such as India is the danger on the road due to people not wearing helmets and not wearing the appropriate safety gear. With over 37 million motorized two wheelers representing 75% of the operational vehicles in India, as well as roughly 34 million motorized two wheelers in China, the number of people not wearing helmets and not taking the proper safety precautions has been higher than ever. According to reports from the Indian government, at least 98 two-wheeler riders without helmets have died on a daily occurrence in 2017. That's over 35,000 lives in a full year that could have been saved through just the use of a helmet. Furthermore, according to China's ministry of public safety, from 80% of fatal traffic accidents involving motorized two wheelers, brain injury was the leading cause of death, and wearing helmets can reduce the risk of this fatality by about 60 to 70 percent.

What it does

Our Flask application take an input of images of motorcycle riders on the street. With these images, we use YOLO to find the number of motorcycles and the number of helmets in the picture and subtract that amount. If we find that there are more motorcycles than helmets (signifying that there are some riders not wearing the proper gear), we scan the license plates and map the plates to the motorcyclist that wasn't wearing a helmet, then use OCR to find and save the license plate which violated the rules.

How I built it

To analyse the images, we used:

  1. YOLO, for finding the objects in the picture.
  2. OpenCV, for reading and parsing the images.
  3. OCR in UiPath Studios, for reading the license plates.

In addition, we created an accompanying web application using:

  1. Flask
  2. HTML, CSS, and JS
  3. TensorFlow, Keras, Scikit Learn
  4. Pandas, Numpy, Matplotlib
  5. Google Cloud Platform, App Engine

Challenges I ran into

We were working through different time zones, which made it difficult to coordinate, especially when combining our code at the end. In addition, it was difficult to find working models of license plate identification, especially since the motorcycle license plates were incredibly small. Also, we went through several libraries and models before we settled on reading the license plates using OCR. We also spent a decent amount of time perfecting our data set of detecting motorcyclists without helmets due to a lack of resources and images online. Another big challenge towards the end was figuring out how to deploy our web application. Since our machine learning model files were so heavy, we knew we had to use some heavy web service to deploy our app. This is when we started learning and following documentation on Google Cloud Platforms App Engine, there wasn't the clearest docs on this so it took a lot of trial and error to perfect our config files to support our specific app with the heavy machine learning files on top of it.

Accomplishments that I'm proud of

We're proud that we were able to create an application which was able to use computer vision to identify motorcycles, helmets, and read license plates. We're also proud to have put our app together within the time frame and create an impactful product for our communities. Another big accomplishment would be our live deployment as we were able to figure out how to utilize Google cloud platform and use it to host our web app.

What I learned

All of our team members had limited knowledge of OpenCV and YOLO before the hackathon; we used this to expand on our computer vision skills. In addition, three of our teammates learned about how to collaborate on GitHub using version control software Git as well as learning techniques on how to avoid merge conflicts when collaborating on a coding project. Another service we learned was following Google Cloud Platforms docs more efficiently and getting the right information in a shorter period of time.

What's next for HelmProtech

Our current end product is a proof of concept which is functional, however doesn't have connections to outside security cameras. Our next steps are to make the software work with real-time video cameras and video footage to help law enforcement keep track of riders without proper safety gear.

Share this project: