Skip to content

tejb96/safety-helmet-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardhat App

A real-time hardhat detection application that uses a YOLOv8 object detection model to identify whether construction workers are wearing safety helmets.

Model used: YOLOv8m Hard Hat Detection via Ultralytics.

Table of Contents


Features

  • Detects hard hats in uploaded images or via camera feed.
  • Returns bounding boxes and classification results.
  • FastAPI backend serving the detection model.
  • Next.js frontend for intuitive user interface.
  • Support for multiple image formats (JPEG, PNG, WebP).

Tech Stack

  • Frontend: Next.js, React, Tailwind CSS
  • Backend: FastAPI, Python 3.10+
  • ML Model: YOLOv8 (Ultralytics)
  • Deployment: Hugging Face Hub (for model), Docker-ready

Results

Sample outputs from the hardhat detection application are available in the Results/ directory:


Installation

Backend (FastAPI)

Install uv by Astral: https://docs.astral.sh/uv/getting-started/installation/

install dependencies and run the backend with:

uv run fastapi dev

The backend will be available at http://localhost:8000.


Frontend (Next.js)

Navigate to the frontend directory:

cd ../frontend

Install dependencies:

npm install

Start the development server:

npm run dev

The frontend will be available at http://localhost:3000.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors