Construction-Hazard-Detection
Enhances construction site safety using YOLO for object detection, identifying hazards like workers without helmets or safety vests, and proximity to machinery
What is Construction-Hazard-Detection?
Enhances construction site safety using YOLO for object detection, identifying hazards like workers without helmets or safety vests, and proximity to machinery or vehicles. HDBSCAN clusters safety cone coordinates to create monitored zones. Post-processing algorithms improve detection accuracy.
Overview of Construction-Hazard-Detection
What it is
This is an AI-assisted construction-site safety monitoring system. It uses YOLO for object detection to identify hazards such as workers without hard hats or safety vests, and proximity to machinery or vehicles. HDBSCAN clusters safety cone coordinates to create monitored zones. Post-processing algorithms improve detection accuracy. The runtime includes a main supervisor, stream processor, local YOLO worker processes, MediaMTX live publishing, PostgreSQL records, Redis coordination, and FastAPI services for management, notifications, streaming metadata, and violation records. Supported label and notification languages include Traditional Chinese, Simplified Chinese, English, French, Thai, Vietnamese, Indonesian, and Japanese.
Key features
- Detects workers without hard hats, without safety vests, too close to machinery or vehicles, and inside cone-derived controlled areas.
- Detects machinery or vehicles too close to utility poles.
- Uses HDBSCAN clustering of safety cone coordinates to define monitored zones.
- Supports multiple notification channels: FCM, LINE Messaging API, Messenger, Telegram, WeChat, and HTTP broadcast.
- Provides FastAPI services for database management, local notifications, violation records, and streaming web metadata.
- Includes optional standalone YOLO server API, MCP server, and model development tools (training, evaluation, data augmentation).
- A Flutter frontend is maintained separately.
Use cases
- Real-time monitoring of construction sites for safety violations.
- Alerting site managers when workers enter restricted areas or are too close to machinery.
- Recording and storing violation images and records for compliance and review.
- Multi-language notification support for diverse workforces.
Getting started
See the repository README for detailed setup instructions. The project targets Python >=3.10 and uses PostgreSQL, Redis, and MediaMTX. Quick start commands include:bashpip install -r requirements.txt# Set up PostgreSQL, Redis, and MediaMTX (see docker-compose.yml)# Start APIs:uvicorn examples.db_management.app:app --host 127.0.0.1 --port 8005 --workers 2 --timeout-graceful-shutdown 10uvicorn examples.local_notification_server.app:app --host 127.0.0.1 --port 8003 --workers 2uvicorn examples.violation_records.app:app --host 127.0.0.1 --port 8002 --workers 2uvicorn examples.streaming_web.app:app --host 127.0.0.1 --port 8800 --workers 2 --timeout-graceful-shutdown 10# Start stream processing:python main.py
License and pricing
This project is licensed under the AGPL-3.0 License. It is open source.
Based on the project's public README and repository metadata.