SIH_ASTRA

ASTRA • AI-Powered Mobile Urban Intelligence Platform

Smart India Hackathon 2026 — Problem Statement SIH26124

Theme: Smart Automation / Urban Intelligence
Concept: Transforming public transport buses into mobile edge-sensing units equipped with onboard AI perception cameras, GPS telemetry, spatial defect clustering, automated incident triage, and a centralized GIS Command & Control Dashboard.


🏛️ System Architecture (YOLOv11 Powered)

 ┌─────────────────────────────────────────────────────────────────────────────┐
 │                       BUS ONBOARD AI UNIT (EDGE)                            │
 │  • Dashcam Video / Webcam Feed / Video Upload                               │
 │  • Ultralytics YOLOv11n Inference (Vehicles, Pedestrians, Two-Wheelers)    │
 │  • Multi-Camera Sensors: Front Bumper Optical, Windshield ANPR, Rear Scanner│
 │  • DefectNet (Potholes, Waterlogging, Missing Signage)                      │
 │  • ANPR Scanner (Indian Registration Plates)                                │
 └──────────────────────────────────────┬──────────────────────────────────────┘
                                        │ HTTP Frame POST / Simulated Telemetry
                                        ▼
 ┌─────────────────────────────────────────────────────────────────────────────┐
 │                         FASTAPI BACKEND & SIMULATOR                         │
 │  • /api/buses         - Fleet GPS, Speed, Occupancy, Telemetry              │
 │  • /api/events        - Road Defects & Recurrence Escalation Engine         │
 │  • /api/alerts        - Incident Management & PDF Report Generation         │
 │  • /api/analytics     - Spatial Aggregations, Recurrence Logic, RQI         │
 │  • /api/detection     - YOLOv11n Real-time Inference on Video/Frames        │
 │  • /ws                - Live WebSocket Broadcast (Bus Telemetry & Alerts)   │
 │  • SQLite Database    - Auto-seeded with realistic Vijayawada urban data    │
 └──────────────────────────────────────┬──────────────────────────────────────┘
                                        │ WebSocket (Push) + REST (Pull)
                                        ▼
 ┌─────────────────────────────────────────────────────────────────────────────┐
 │            ASTRA COMMAND & CONTROL GIS DASHBOARD (CIVIC TECH THEME)         │
 │  • Modern White Civic Theme (High-contrast, native OpenStreetMap cartography│
 │  • 5 Moving Virtual Buses with Dynamic Bearing Rotation & Map FlyTo Focus   │
 │  • Web Audio API Incident Chime Synthesizer on WebSocket Dispatch           │
 │  • PWD Work-Order Dispatch Workflow (SLA Assignment & Crew Allocation)      │
 │  • Defect Markers with Multi-Bus Recurrence Escalation (x1, x2, x3+ High)   │
 │  • Traffic Congestion Heatmap & Corridor Density                            │
 │  • Onboard AI Edge Simulator with Multi-Camera Feeds & Snapshot Export      │
 │  • Official Incident PDF Dossier Export (ReportLab) & CSV Database Exports  │
 └─────────────────────────────────────────────────────────────────────────────┘

🚀 Key Features

  1. State-of-the-Art YOLOv11 Vision:
    • Built with Ultralytics YOLOv11n (yolo11n.pt).
    • Faster inference (~15ms) and superior detection accuracy across 80 COCO categories (car, bus, truck, motorcycle, person, bicycle).
    • Includes fallback OpenCV heuristic detector for zero-crash stability.
  2. Professional White Civic Tech Design:
    • Clean, bright, high-contrast command center interface designed for municipal authorities.
    • Native OpenStreetMap cartography without dark inversion, showing clear street grids, bridges, and waterways.
    • High-contrast typography and clean cards (bg-white border-slate-200 shadow-sm).
    • Retains Dark Mode toggle in the navigation bar.
  3. Web Audio Dispatch Chimes:
    • Native dual-tone audio alert chime synthesized via the Web Audio API on new incident alerts.
    • Audio mute/unmute control in the top navigation bar.
  4. Interactive Bus Tracking Focus:
    • Clicking any bus automatically pans and zooms the GIS map directly onto that bus.
  5. PWD Work-Order Dispatch:
    • Formal municipal work-order creation modal on road defects with crew assignment, SLA windows, and status progression (OPEN → IN_PROGRESS → REPAIRED).
  6. Multi-Camera Edge Channels & Snapshot Capture:
    • Switch between CAM 01 (Front Bumper), CAM 02 (Windshield ANPR), and CAM 03 (Rear Defect).
    • Save annotated evidence snapshot images directly from the camera viewport.
  7. Official Incident PDF Dossier Export:
    • Generates municipal incident reports with digital verification watermarks using Python ReportLab.

💻 Local Setup & Run Guide

1. Prerequisites


2. Backend Setup & Run

cd backend
python -m pip install -r requirements.txt
python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload

3. Frontend Setup & Run

cd frontend
npm install
npm run dev

Open your browser at: http://localhost:5173/ # SIH_Project