construction_app / README.md
shimaa22's picture
Update README.md
c310477 verified

A newer version of the Gradio SDK is available: 6.14.0

Upgrade
metadata
title: Construction App
emoji: 🚜
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 6.10.0
app_file: app.py
pinned: false
short_description: detect excavators and put it as active or not qctive

Equipment Utilization & Activity Classification Prototype

This application is an AI-powered monitoring tool for construction machinery, specifically designed to track and analyze Excavator activities in real-time. It uses computer vision to distinguish between different operational states like digging, dumping, and idling.

Live Demo on Hugging Face

This space provides an interactive interface to upload construction site videos and get a full breakdown of machine utilization and activity logs.

πŸ“‹ Core Features

  • Intelligent Tracking: Uses DeepSort to maintain unique IDs for each machine across the video.
  • Articulated Motion Analysis: A specialized algorithm that monitors the Arm/Bucket movement separately from the Tracks, allowing the system to detect activity even when the machine is not moving its base.
  • Activity Classification: * DIGGING: Active arm movement with downward trajectory.
    • DUMPING: Active arm movement with upward trajectory.
    • SWINGING/LOADING: Horizontal movement of the body/arm.
    • WAITING: Stationary state (Idle).
  • Detailed Analytics: Outputs a downloadable JSON report containing total active seconds, idle time, and utilization percentage.

Tech Stack

  • Model: YOLOv26 (Custom trained best.pt).
  • Tracking: DeepSort Real-time.
  • Inference: Ultralytics & OpenCV.
  • Interface: Gradio.

πŸš€ How to use it here:

  1. Upload Video: Drag and drop your mp4/avi video into the "Upload Video" box.
  2. Select Classes: Choose the equipment class from the list (e.g., excavator).
  3. Submit: Wait for the AI to process the frames.
  4. Results: * Watch the Processed Video with live bounding boxes and activity labels.
    • View the JSON Output for a summary of the machine's performance.
    • Download the full report for your records.

πŸ“Š JSON Output Example

The app provides structured data for every detected machine:

{
  "equipment_id": "EX-001",
  "utilization": {
    "current_state": "ACTIVE",
    "current_activity": "DIGGING",
    "motion_source": "arm_only"
  },
  "time_analytics": {
    "total_tracked_seconds": 15.0,
    "utilization_percent": 83.3
  }
}