Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆบ SafeSight โ€“ AI Powered Industrial Safety Monitoring System

Hackathon Project | WIET Hackverse 2.0 | Team: Stranger Strings


๐Ÿšจ Problem Statement

Industrial worksites frequently suffer accidents due to failure in PPE compliance, unauthorized zone access, and lack of real-time worker monitoring. SafeSight addresses this using computer vision and AI to:

  • Detect PPE compliance (helmet, boots, vest, goggles)
  • Manage worker attendance via QR code scanning
  • Monitor restricted zones and alert supervisors in real time

๐Ÿ‘ฅ Team Members & Roles

Member Role Responsibilities
Tanaya Product & Pitch Lead Prepare presentation, train models, collect PPE datasets
Varun Backend Developer Build API, connect MongoDB, manage authentication
Atharva AI Engineer Integrate PPE detection and run real-time monitoring
Archit Frontend Developer Build dashboard UI and camera grid interface

๐Ÿ› ๏ธ Tech Stack

Frontend

  • โš›๏ธ React โ€“ UI framework
  • ๐ŸŽจ Tailwind CSS โ€“ Utility-first styling
  • ๐ŸŒ React Router โ€“ Client-side routing
  • ๐Ÿ“Š Recharts โ€“ Dashboard charts and visualization
  • ๐Ÿงญ Lucide React โ€“ Icon set
  • ๐Ÿ”” React Hot Toast โ€“ Toast notifications
  • ๐Ÿ” react-qr-reader / html5-qrcode โ€“ QR scanner support
  • ๐ŸŽฎ three.js โ€“ 3D graphics and scene rendering

Backend

  • ๐ŸŸข Node.js โ€“ Runtime
  • ๐Ÿš‚ Express.js โ€“ REST API framework

Database

  • ๐Ÿƒ MongoDB โ€“ NoSQL database (via Mongoose ODM)

AI Engine

  • ๐Ÿ Python โ€“ Core language
  • ๐Ÿ‘๏ธ OpenCV โ€“ Computer vision
  • ๐ŸŽฏ YOLOv8 โ€“ Object detection model

Auth

  • ๐Ÿ” JWT โ€“ JSON Web Tokens for supervisor login

โœจ Features

1. ๐Ÿช– PPE Detection System

Real-time detection of personal protective equipment using YOLOv8:

PPE Item Detection
Helmet โœ…
Safety Boots โœ…
Safety Vest โœ…
Safety Goggles โœ…
  • Input: Webcam / IP camera stream
  • Output: Bounding boxes + violation alerts sent to dashboard

2. ๐Ÿ“ท Multi-Camera Dashboard

For MVP, 4 laptops act as 4 camera feeds.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  CAM 1   โ”‚  CAM 2   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  CAM 3   โ”‚  CAM 4   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Each feed runs PPE detection independently and streams results to the central dashboard.


3. ๐Ÿชช Worker Entry / Exit System

Each worker is assigned:

  • Unique ID
  • Name and Role
  • QR Code for scanning

Entry Flow:

  1. Worker scans QR code
  2. Camera captures photo
  3. System saves entry timestamp

Exit Flow:

  1. Worker scans QR code
  2. System saves exit timestamp

4. ๐Ÿ”’ Restricted Zone Control

Restricted zones require supervisor authorization:

Worker scans QR
       โ†“
Camera checks PPE compliance
       โ†“
If PPE valid โ†’ Alert sent to supervisor
"Akhil has entered Welding Zone. Approve access?"
       โ†“
Supervisor: [Approve] or [Reject]

5. ๐Ÿ“Š Dashboard Tables

Workers on Site

Worker Role Entry Time Photo

Restricted Zone Workers

Worker Zone Entry Time Status

Supervisors can assign worker roles and zone permissions from the dashboard.


๐Ÿš€ Getting Started

Prerequisites

  • Node.js >= 18
  • MongoDB (local or Atlas)
  • Python >= 3.8
  • pip

1. Clone the Repository

git clone <your-repo-url>
cd SafeSight

2. Setup Environment Variables

cp .env.example .env
# Edit .env with your values

3. Start the Backend

cd server
npm install
npm run dev

4. Start the Frontend

cd client
npm install
npm run dev

5. Run the AI Engine

cd ai-engine
pip install -r requirements.txt
python detect_ppe_webcam.py

๐Ÿ”‘ Environment Variables

MONGO_URI=mongodb://localhost:27017/safesight
JWT_SECRET=your_super_secret_jwt_key
PORT=5000

๐Ÿ—‚๏ธ Project Structure

SafeSight/
โ”œโ”€โ”€ client/               # React frontend
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ components/   # Reusable UI components
โ”‚       โ”œโ”€โ”€ pages/        # Route pages
โ”‚       โ””โ”€โ”€ services/     # API service layer
โ”œโ”€โ”€ server/               # Express backend
โ”‚   โ”œโ”€โ”€ config/           # DB connection
โ”‚   โ”œโ”€โ”€ models/           # MongoDB schemas
โ”‚   โ”œโ”€โ”€ routes/           # API routes
โ”‚   โ””โ”€โ”€ controllers/      # Business logic
โ”œโ”€โ”€ ai-engine/            # Python PPE detection
โ””โ”€โ”€ docs/                 # Architecture & planning docs

๐Ÿ“… MVP Plan (3โ€“4 Hours)

Hour Tasks
Hour 1 Create repo, project structure, push to GitHub, setup MongoDB
Hour 2 Run PPE detection on webcam
Hour 3 Create dashboard with 4 camera feeds
Hour 4 Implement worker entry system with QR scanning

๐Ÿ“‹ Team Task Distribution

๐Ÿ–ฅ๏ธ Frontend Developer

  • Build dashboard layout
  • Implement 4-camera grid
  • Build worker attendance tables
  • Implement QR scanner UI
  • Build restricted zone table

โš™๏ธ Backend Developer

  • Create REST APIs (workers, attendance, zones)
  • Connect MongoDB with Mongoose
  • Implement JWT authentication
  • Create supervisor notification endpoint
  • Build WebSocket for real-time alerts

๐Ÿค– AI Engineer

  • Run YOLOv8 PPE detection on webcam
  • Integrate webcam stream processing
  • Build Flask/FastAPI endpoint for violation alerts
  • Test detection accuracy

๐ŸŽค Pitch Lead

  • Prepare demo video
  • Train improved PPE detection model
  • Prepare architecture diagrams
  • Create presentation slides

๐Ÿ”— Deployment Links

Service URL
Frontend (To be added)
Backend (To be added)
Dataset (To be added)

๐Ÿ“„ License

MIT License โ€“ Built for WIET Hackverse 2.0


Built with โค๏ธ by Team Stranger Strings

About

SafeSight is an AI-powered industrial safety monitoring system built with React, Tailwind CSS, Node.js, Express.js, MongoDB, and Python. It uses OpenCV and YOLOv8 for real-time PPE detection, QR code scanning for worker attendance, JWT-based authentication, and a live dashboard with alerts and zone monitoring.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages