Skip to content

KhoiBao1/ConstructionSafety

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Documentation & Demo

Project Report (PDF/Word): Report

Demo Videos: Video Demo

Project Overview

This project is an AI-powered Personal Protective Equipment (PPE) violation detection system designed to help enterprises improve workplace safety monitoring through real-time computer vision and automated alerts.

The system uses deep learning (YOLO-based object detection) to identify whether workers comply with mandatory safety requirements such as:

  • Hard hats

  • Safety vests

  • Face masks

When a violation is detected, the system can automatically send alert emails with evidence images/videos to supervisors or safety managers.

This solution is suitable for:

  • Construction sites

  • Manufacturing plants

  • Warehouses

  • Industrial zones

  • Smart factory environments

Project Objectives

The main goals of this project are:

  • Reduce workplace accidents caused by PPE violations

  • Automate safety supervision using AI instead of manual monitoring

  • Provide real-time detection from images, videos, and live webcam streams

  • Store inspection history for auditing and reporting

  • Notify responsible personnel immediately via email

Key Features

AI-Based PPE Detection

  • Detects:

    • Hardhat / No-Hardhat

    • Safety Vest / No-Safety Vest

    • Mask / No-Mask

  • Built on YOLO deep learning architecture

  • Custom-trained model (ppe.pt)

Multi-Input Support

Users can perform detection using:

  • Uploaded images

  • Uploaded videos

  • Real-time webcam stream

User Authentication System

  • Secure login & sign-up system

  • Password hashing

  • Session-based authentication

  • Individual user history tracking

Detection History Management

  • Stores:

    • Uploaded files

    • Processed outputs

    • Detection statistics

    • Violation count

    • Timestamp

  • Powered by MongoDB database

Email Alert System

  • Automatic email notifications when violations occur

  • Includes:

    • Violation summary

    • Detection time

    • Evidence reference

Web-Based Platform

  • Flask backend

  • HTML/CSS frontend

  • Works entirely through browser

  • No software installation required for end users

System Architecture

User

│ Upload Image / Video / Webcam

Web Interface (Flask)

│ Authentication & Validation

AI Detection Engine (YOLOv8)

│ Bounding box + classification

Result Processor

├── Save result to MongoDB
├── Store media in server
└── Trigger email alert

Technology Stack

Backend

  • Scipy
  • Python 3.10+

  • Flask

  • PyTorch

  • Matplotlib

  • OpenCV

  • Ultralytics

  • YOLOv8

  • Google Colab

Frontend

  • HTML5

  • CSS3

  • Bootstrap

  • Javascript

Database

  • MongoDB (Local / MongoDB Atlas)

AI & Computer Vision

  • YOLO object detection

  • Custom PPE dataset

  • Trained .pt model

Example Detection Output

  • Bounding boxes with confidence score

  • Violation highlighted in red

  • PPE-compliant objects highlighted in green

  • Summary statistics:

    • Number of workers

    • PPE compliance count

    • Violation count

 

Potential Business Applications

  • Smart construction monitoring

  • Factory safety automation

  • AI-powered CCTV systems

  • Industrial IoT integration

  • Safety compliance analytics dashboard

Future Enhancements

  • OSHA rule-based violation scoring

  • SMS / Slack / Microsoft Teams alerts

  • Multi-camera CCTV integration

  • Real-time dashboard analytics

  • Cloud deployment (AWS / Azure / GCP)

  • Edge AI deployment (Jetson Nano / Orin)

💻 Developer

Khoi Bao
Computer Science Student

Core Skills

  • Computer Vision

  • Deep Learning

  • Python Backend

  • Flask & REST API

  • MongoDB

  • Web AI Deployment

📬 Contact

For collaboration, research, or enterprise integration:

📧 Email: khoibao655@gmail.com
🌐 GitHub: https://github.com/KhoiBao1

Summary

This project demonstrates the ability to:

  • Build a real-world AI safety system

  • Integrate deep learning with full-stack web development

  • Deploy AI models into production-ready web applications

  • Design solutions aligned with U.S. industrial safety standards

Releases

No releases published

Packages

 
 
 

Contributors

Languages