Inspiration

Safety is an important part of construction, so I wanted to develop an app that could increase safety awareness and compliance. This is only an MVP, but I thought using computer vision for hard hat detection would be an interesting project, so the initial MVP detects whether or not you're wearing your hard hat when you sign in to work.

What it does

Records whether or not you're wearing your hard hat. Workers take a quick selfie to record that they're wearing their hard hat. A webhook integration kicks in, and in the backend Monday calls my Flask API (running in Heroku). My Flask API then determines whether the worker is wearing a hard hat, and using the Monday graphql API updates the sheet to record compliance.

How I built it

For the backend, I wrote a Flask API (using Python). I built my machine learning model using the fasti.ai library.

Challenges I ran into

I had issues deploying my Flask app onto Heroku because my model was too large (over 250mb). The Heroku slug compiler doesn't allow for over 500 mb for the entire application, and I was over with my large model.bin file. So I had to retrain my model using another architecture (resnet18 versus resnet34) with a smaller data set, and thankfully my new model was just over 150 mb. This put me under the 500 mb limit for the Heroku slug compiler.

Accomplishments that I'm proud of

What I learned

What's next for Safety First

Retrain my model on a larger dataset, and eventually deploy to a more production environment (not Heroku, where there are sizing limits). From there, hopefully have a production ready API that I can share on the Monday store for others to use :)

Built With

Share this project:

Updates