KavachG (कवच-G) — Autonomous Edge-AI Industrial Safety, Computer Vision Defense & 3D Digital Twin Platform
KavachG (कवच-G) is an enterprise-grade industrial computer vision safety platform designed for autonomous multi-camera surveillance, real-time PPE compliance auditing, temporal slip/fall kinematic tracking, optical/thermal flame localization, and 3D Metaverse Digital Twin facility monitoring.
- Live Production Portal: https://kavach-g.vercel.app
- Live Safety Command Console: https://kavach-g.vercel.app/console
- GitHub Repository: https://github.com/GuruMachanica/KavachG
+-----------------------------------------------------------------------------------+
| KAVACHG SAFETY ECOSYSTEM |
+-----------------------------------------------------------------------------------+
|
+-----------------------+-----------------------+
| |
v v
+---------------------+ +---------------------+
| Frontend/ | | Backend/ |
| Glassmorphism HUD |<--- WebSocket / REST --->| FastAPI 0.110+ |
| Three.js Plant Twin | | (Async Gateway) |
+---------------------+ +---------------------+
| |
+-- 2x2 CCTV Vision Matrix +-- YOLOv8 PPE Inferrer
+-- WebRTC In-Browser WebGPU +-- 17-Point Pose Tracker
+-- 3D Metaverse Plant Twin +-- Thermal Flame Sensor
+-- Mistral AI Copilot Chat +-- SQLite WAL Engine
+-- Command Palette (Ctrl+K) +-- Incident Dispatcher
| |
+-----------------------+-----------------------+
|
v
+-------------------------------+
| Edge Acceleration Layer |
| (CUDA / TensorRT / ONNX) |
+-------------------------------+
KavachG operates across three compute environments, enabling zero-cost cloud hosting alongside local hardware acceleration:
+----------------------------------------------------------------------------------------------------+
| TIER 1: BACKEND API GATEWAY (Self-Hosted / Private Cluster) |
+----------------------------------------------------------------------------------------------------+
| • FastAPI REST APIs, WebSocket live incident streaming, SQLite WAL database |
| • Simulated optical CCTV surveillance stream with live timecode HUD |
| • URL: http://localhost:8000 |
+----------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------+
| TIER 2: CLIENT-SIDE IN-BROWSER WEBGPU PERCEPTION (Option 2 - 0ms Server Latency) |
+----------------------------------------------------------------------------------------------------+
| • Runs 100% on the accessing client's laptop/phone browser via WebRTC & Canvas WebGPU |
| • Real-time hardhat, safety vest bounding, and 17-point skeletal joints with 0 bytes sent to cloud|
| • Activation: Click "📹 Use Laptop Camera" in the console HUD |
+----------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------+
| TIER 3: LOCAL EDGE NODE AGENT (Option 3 - 60+ FPS Hardware Acceleration) |
+----------------------------------------------------------------------------------------------------+
| • Runs YOLOv8 models directly on user's GPU (NVIDIA CUDA / Apple Silicon MPS / DirectML) |
| • Connects local camera streams and syncs incident telemetry to cloud in real time |
| • Launch: python scripts/run_local_edge_agent.py --cloud-url http://localhost:8000 |
+----------------------------------------------------------------------------------------------------+
To prevent false alarms from disconnected safety gear on the floor, KavachG binds detected PPE items (
Evaluates temporal skeletal displacement across key anatomical joints (Spine
Detects high-temperature open flames and localized smoke plumes in industrial environments:
sequenceDiagram
autonumber
participant CCTV as RTSP Camera Grid
participant Edge as YOLOv8 Edge Inferrer
participant Pose as Kinematic Pose Engine
participant Gate as FastAPI WebSocket Gateway
participant HUD as Three.js / WebGL Console
participant AI as Mistral AI Copilot
CCTV->>Edge: Raw H.264/RTSP Video Stream (30 FPS)
Edge->>Edge: Detect Worker & PPE Gear (IoU Association)
Edge->>Pose: Extract 17-Point Skeletal Joints
Pose->>Pose: Compute Angular Acceleration & Floor Velocity
alt Safety Breach Detected (No Helmet / Fall / Flame)
Pose->>Gate: Dispatched Encrypted Alert Payload + Bounding Vector
Gate->>HUD: WebSocket Broadcast (Timecode, Camera ID, Level)
HUD->>HUD: Trigger Red Visual Alert & 3D Spatial Marker
Gate->>AI: Query Automated Mitigation Strategy
AI-->>HUD: Stream OSHA 1910 Compliance Checklist & Form 301 Draft
else All Standards Compliant
Pose->>Gate: Heartbeat Telemetry (60s Aggregation)
Gate->>HUD: Green Safety Halo Update
end
- Sentinel Vision Agent: Autonomous multi-camera continuous perception scanner.
- Forensic Dispatcher Agent: Automatically isolates incident pre-roll video clips, hashes forensic frames with SHA-256, and drafts OSHA Form 301 records.
- Compliance Auditor Agent: Generates shift safety briefings and maps infractions directly to OSHA 1910 standards.
- Watchdog Guardian Agent: Automated self-healing camera buffer monitor maintaining continuous stream uptime.
- Powered by Mistral AI (
mistral-small-latest) with structured prompt anchoring. - Built-in offline regulatory rule engine covering PPE compliance (1910.132/135), Fall protection (1910.28), and Fire suppression (1910.38).
- 4-Sector Industrial Facility: Robotic Assembly (Sector A) with moving conveyor workpieces, High-Voltage Substation (Sector B), High-Bay Warehouse (Sector C), and Logistics Storage (Sector D).
- Volumetric Vision Cones: Semi-transparent 3D camera frustums visualizing active CCTV sensor coverage.
- Dynamic Worker Avatars: Real-time spatial tracking with compliance halos (Emerald Green for compliant, Crimson Red for breach).
- Multi-camera matrix supporting up to 16 concurrent RTSP streams.
- Instant keyboard launcher searching personnel records, active safety incidents, and one-click dispatch playbooks.
| Metric | Edge GPU (RTX 4090 / CUDA) | Client WebGPU (Laptop M3/Intel) | Cloud Gateway (CPU) |
|---|---|---|---|
| Inference Latency (PPE YOLOv8) | 4.2 ms | 18.5 ms | 64.0 ms |
| Skeletal Pose Tracking (17 Joints) | 3.8 ms | 14.2 ms | 48.0 ms |
| End-to-End WebSocket Dispatch | < 15 ms | < 20 ms | < 45 ms |
| Throughput (Concurrent Streams) | 16 Streams @ 30 FPS | 2 Streams @ 30 FPS | 4 Streams @ 15 FPS |
| mAP@50 (Hardhat / Vest / Boots) | 94.8% | 91.2% | 94.8% |
KavachG/
├── Backend/ # Python FastAPI microservice & CV inference core
│ ├── main.py # FastAPI server, WebSocket hubs, and REST endpoints
│ ├── models_loader.py # Universal multi-path weight loader
│ ├── incident_engine.py # Automated incident dispatcher & OSHA form generator
│ └── requirements.txt # Python dependencies
├── Database/ # SQLite WAL high-concurrency database
│ ├── safety_records.db # Personnel, incident history, and safety audits
│ └── seed_database.py # Database migration & synthetic seeder
├── Frontend/ # Glassmorphism operator HUD & 3D plant twin
│ ├── index.html # Main application portal & command console
│ ├── css/ # Custom glassmorphism design tokens
│ └── js/ # Real-time WebSocket handlers, WebRTC, and Three.js
├── Models/ # Pre-trained neural network weights
│ ├── ppe.pt # YOLOv8 PPE detection weights
│ ├── fire_smoke.pt # Flame and optical smoke classifier
│ └── pose.pt # 17-point skeletal pose estimation
├── scripts/ # Local edge runners & diagnostic utilities
│ ├── run_local_edge_agent.py # GPU edge agent with cloud telemetry sync
│ └── verify_camera_stream.py # RTSP stream latency benchmark
├── Dockerfile # Multi-stage production container
├── docker-compose.yml # Local orchestration manifest
└── DEPLOYMENT.md # Complete cloud and on-premise guide
.\run_kavachg.ps1# 1. Clone the repository
git clone https://github.com/GuruMachanica/KavachG.git
cd KavachG
# 2. Setup Python virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/macOS
# .\.venv\Scripts\Activate.ps1 # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Launch Backend API & Static Server
uvicorn Backend.main:app --host 0.0.0.0 --port 8000 --reload| Engineer | Core Responsibilities & Contributions |
|---|---|
| Mohammad Saad | Frontend UI/UX Architecture & Command Center Interface • Designed the modern glassmorphism operator console & responsive multi-page marketing portal • Built the real-time Live Vision HUD, interactive 2×2 CCTV matrix, and Three.js 3D Metaverse Plant Twin |
| Mohnish Narayan Gupta | Backend Architecture & Streaming Services • Engineered the FastAPI microservice gateway, RESTful API endpoints, and WebSocket push channels • Built token-gated JWT authentication, DirectShow video streaming, and background clip encoder workers |
| Ashutosh Mishra | Machine Learning & Computer Vision Models • Trained custom YOLOv8 PPE detection weights ( ppe.pt) with IoU worker-to-gear bounding association• Developed 17-point skeletal pose kinematic fall velocity tracking and dual optical/thermal flame localization |
| Mohammad Huzaifa (@GuruMachanica) |
Deployment, CI/CD Pipeline, Agentic AI & Database Architecture • Built the production deployment configurations ( render.yaml, vercel.json, Docker containers, and DEPLOYMENT.md)• Developed the Autonomous Multi-Agent Safety Swarm (Sentinel, Dispatcher, Auditor, Watchdog) and model quantization pipeline • Architected the SQLite WAL high-concurrency database connection pooling, Mistral AI Copilot, and automated migration seeders |
Proprietary — All Rights Reserved © 2026 Team CodeGambit.