Inspiration

Workplace accidents and safety violations are major concerns for businesses across all industries. Ensuring a safe working environment is crucial not only for the well-being of employees but also for minimizing costs. We wanted to create a system that leverages deep learning models to track incidents efficiently and help businesses prevent accidents in real time.

What it does

SafeSpace helps businesses track and prevent workplace accidents by detecting safety violations using a custom-built video recognition model. The detected incidents are automatically logged into a MongoDB database, where they are categorized and stored. A web application provides a comprehensive analysis of these incidents, including video clips and summary statistics. Users can filter the data by time period and analyze trends over time, helping companies make informed safety decisions to improve in the future.

How we built it

The project combines multiple technologies:

  • Video Recognition Model: A custom-built YOLOv8 based model that processes workplace video footage to detect incidents.
  • Backend: We used Node.js and Express to create APIs that interact with our MongoDB database, storing and fetching incident data to be used in the visualizations.
  • Frontend: Built with React, the frontend provides comprehensive data visualizations that allow users to filter and analyze incident statistics.
  • Database: MongoDB is used to store incident data, including video URLs, timestamps, and camera details.
  • Video Integration: The web app integrates incident video clips for playback, enabling users to review specific incidents, file reports, and mark them as resolved.

Challenges we ran into

  • Video Processing: Training the video recognition model to accurately detect workplace incidents presented some challenges, particularly for real-time video processing. We were able to improve performance with frame-sampling techniques, which also reduces the computational resources needed when deployed across the edge device cameras.
  • Data Integration: Given that it was a new technology for us, integrating mongoDB with node.js was more complex than we were expecting and took a long time to fully implement. We were able to overcome this through reading documentation, tutorials, and trial-and-error.
  • Real-time Feeds: Ideally, this product would be setup on real-time video cameras in the workplace; however, for the scope of the project, we setup a proof of concept with manually inputted video clips.
  • Hosting: We tried hosting this application on our domain safespace.study; however, github pages only deploys static websites. We were able to host the client-side deployment on github pages, but were unable to host our backend node.js server through a different provider. We will continue to work on this and get the website hosted.

Accomplishments that we're proud of

  • Successfully building and integrating a functional video recognition model that detects workplace incidents.
  • Creating a seamless workflow from incident detection to storage in a database and to visualizations on the web app.
  • Developing an intuitive UI that allows businesses to view incident trends, filter data, and analyze key safety metrics.

What we learned

  • AI Model Development: Gained valuable experience in training video recognition models, particularly in refining model accuracy for specific use cases.
  • MongoDB: We learned what MongoDB is, how to build clusters and input data, and how to connect the database to a backend API.
  • Full-Stack Integration: We learned how to efficiently connect a machine learning model with a database and frontend system, ensuring smooth data flow and user experience.

What's next for the project

We aim to scale the project into a real-time system that interfaces directly with a workplace's camera system. This solution would allow businesses to receive immediate notifications of safety violations or accidents as they happen, providing a more proactive approach to workplace safety. Additionally, we will setup an authorization system with Auth0 to separate incidents between different companies.

Share this project:

Updates