Construction-Hazard-Detection  by yihong1120

AI for construction site safety monitoring

Created 1 year ago
327 stars

Top 83.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides an AI-powered system for enhancing construction site safety. It leverages YOLO object detection to identify hazards like missing PPE or unsafe proximity to machinery, and HDBSCAN to define monitored zones based on safety cone placement. The system offers real-time analysis and alerts, benefiting safety officers and site managers by proactively mitigating risks.

How It Works

The system employs YOLOv11 for real-time object detection, identifying specific safety violations such as workers without helmets or vests, and personnel near heavy machinery or in restricted zones. Safety cones are clustered using HDBSCAN to dynamically define these restricted areas. Post-processing algorithms refine detection accuracy. Notifications with on-site images are pushed via popular messaging apps, supporting multiple languages for global accessibility. An integrated MCP server exposes agent-ready tools for comprehensive system interaction.

Quick Start & Requirements

  • Prerequisites: Docker, MySQL, Redis, Python.
  • Setup: Requires installing Docker, running Redis and MySQL containers, importing the database schema (scripts/init.sql), installing Python dependencies (pip install -r requirements.txt), and downloading YOLOv11 weights.
  • Execution: Involves starting multiple backend microservices (YOLO Detection API, Streaming, Violation Records, etc.) via uvicorn, followed by running the main application (python main.py) in either default Database Mode or optional JSON Mode (--config).
  • Configuration: Managed via a .env file for database credentials, API endpoints, and other service parameters.
  • Links: Cloud demo: https://visionnaire-cda17.web.app. iOS App: https://apps.apple.com/tw/app/visionnaire/id6743549024.

Highlighted Details

  • Detects specific hazards: missing hardhats/safety vests, proximity to machinery/vehicles, and presence in restricted areas.
  • Dynamically creates monitored zones by clustering safety cone coordinates using HDBSCAN.
  • Supports multi-language notifications and interface (Traditional Chinese, Simplified Chinese, French, English, Thai, Vietnamese, Indonesian).
  • Features a Model Context Protocol (MCP) server providing agent-ready tools for detection, analysis, notifications, and model management.
  • Integrates with LINE, Messenger, WeChat, and Telegram for real-time alerts.
  • Utilizes an enriched Construction Site Safety Image Dataset from Roboflow.

Maintenance & Community

The README outlines a "Development Roadmap" section but provides no specific details on contributors, community channels (e.g., Discord, Slack), or active maintenance signals.

Licensing & Compatibility

Licensed under AGPL-3.0. This strong copyleft license requires that any distributed derivative works or modifications must also be made available under the AGPL-3.0 license, potentially impacting integration into closed-source commercial products.

Limitations & Caveats

The setup process is complex, requiring the orchestration of multiple Docker containers and backend services. The README notes that for complete notification functionality, users may need to contact the developers, suggesting potential integration complexities or required manual steps beyond the basic setup.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
0
Star History
7 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.