Version 2.0.0 - AI-Powered Industrial Safety Revolution
A comprehensive, intelligent workplace safety monitoring platform leveraging multi-layer AI fusion, self-healing pipelines, and natural language understanding to protect workers and save lives.
Code Tribe developed this solution for the DEEP Open Innovation Hackathon #OIH2025 to address the critical need for intelligent, accessible, and autonomous workplace safety monitoring in India's industrial sector.
India's industrial sector faces a workplace safety crisis:
- 48,000+ fatal workplace accidents annually (Ministry of Labour, 2023)
- 38 million occupational injuries reported each year
- Existing solutions cost โน25-50 lakh/year ($30K-$60K) - unaffordable for SMEs
- Traditional ML systems require manual retraining and lack natural language interfaces
- 500,000+ SME factories have zero AI-based safety monitoring
A fully intelligent, self-healing safety platform that democratizes industrial AI for India's manufacturing backbone.
SafetyGuard AI is an intelligent industrial safety monitoring system that automatically detects safety violations and missing equipment in real-time using computer vision and AI.
Core Capabilities:
- ๐น Real-Time Monitoring - Analyzes factory camera feeds to detect safety equipment (helmets, fire extinguishers, oxygen tanks, first aid boxes)
- ๐บ๏ธ 2D Safety Heatmaps - Visualizes equipment distribution across factory floors to identify high-risk zones
- ๐ฌ Natural Language Queries - Ask "Is this zone safe for welding?" and get instant AI-powered safety analysis
- ๐ Smart Alerts - Flags missing equipment or violations with confidence scores
- ๐ Real-Time Dashboard - Live visualization of detections, metrics, and compliance status
How It Helps Workers:
- Safety Officers: Monitor multiple zones simultaneously, generate automated compliance reports, receive instant violation alerts
- Factory Workers: Ask safety questions in plain English, verify equipment requirements, locate emergency gear quickly
- Management: Reduce insurance costs, maintain compliance (ISO 45001, OSHA), prevent accidents proactively
Self-Healing Intelligence: Automatically generates synthetic training data and retrains on difficult casesโimproving accuracy by +14% with zero downtime.
Key Achievements:
- โ 89.2% accuracy with 42ms latency (2-5ร faster than competitors)
- โ 3-layer fusion architecture (YOLO Nano + YOLO Small + RNN Temporal)
- โ Falcon-Link self-healing (+14% accuracy improvement on edge cases, zero downtime)
- โ VLM "The Brain" for natural language safety queries in plain English
- โ Open source & decentralized (93-96% cheaper than Detect Technologies/Intenseye)
- โ SingularityNET integration for AI marketplace monetization
Event: DEEP Open Innovation Hackathon #OIH2025
Organizer: SingularityNET & Deep Funding
Theme: Decentralized AI for Social Impact
Team: Code Tribe
Submission Date: December 2025
Demo Video:
- ๐ฅ YouTube: SafetyGuard AI Demo
Complete system architecture showing all components: YOLO models, Fusion Engine, VLM Brain, Falcon-Link Self-Healing, and SingularityNET Integration
The SafetyGuard AI platform consists of multiple integrated components:
| Component | Purpose | Technology |
|---|---|---|
| Camera Input | Real-time video feed processing | WebSocket, Base64 |
| Image Upload | Static image analysis | REST API, Multipart |
| YOLO Speed (Nano) | Fast detection (~15ms) | YOLOv8n, PyTorch |
| YOLO Accuracy (Small) | Precise detection (~35ms) | YOLOv8s, PyTorch |
| RNN Tracker | Temporal consistency & tracking | LSTM/GRU, PyTorch |
| Fusion Engine | Weighted Box Fusion + RNN Boost | Custom Algorithm |
| The Brain (VLM) | Natural language queries | Groq Llama-3.3-70B |
| Falcon-Link | Self-healing pipeline | PIL, Augmentation |
| SingularityNET | Decentralized AI marketplace | Web3, AGI Tokens |
INPUT Section:
- Video Feed โ Dynamic ISP (Image Signal Processing) for frame preprocessing
- Handles webcam streams, uploaded videos, and RTSP camera feeds
CORE ENGINE (3-Layer Detection):
- Layer 1 (Nano): YOLOv8n for speed-optimized detection (~15ms)
- Layer 2 (Small): YOLOv8s for accuracy-optimized detection (~35ms)
- Layer 3 (RNN): Temporal tracking with EMA confidence smoothing
- WBF Fusion: Weighted Box Fusion combines all layers (60% YOLO, 40% RNN)
USER INTERFACE:
- Dashboard displays detections when Confidence > 0.5 (50%)
- Real-time visualization with bounding boxes and labels
ASTROOPS LOOP (Self-Healing):
- Logs: Records low-confidence detections (<0.4)
- Falcon Sim: Generates synthetic training data via augmentation
- Retrain: Queues augmented data for model improvement
- Update Weights: Hot-swaps improved weights back to Core Engine
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SafetyGuard AI Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Camera โ โ โ YOLO Speed โ โ โ โ โ
โ โ Input โ โ (Nano) โ โ FUSION โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ ENGINE โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ Weighted โ โ
โ โ Image โ โ โ YOLO Acc โ โ โ Boxes โ โ API โ
โ โ Upload โ โ (Small) โ โ Fusion โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ + RNN โ โ
โ โ Temporal โ โ โ RNN โ โ โ Temporal โ โ
โ โ Stream โ โ Tracker โ โ Boost โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ "The Brain" (VLM) โ โ
โ โ Natural language safety queries powered by Llama Vision โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Falcon-Link Self-Healing โ โ
โ โ Low confidence โ Synthetic data โ Retrain โ Hot-swap โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SingularityNET Integration โ โ
โ โ Publish models โ Earn AGI โ Decentralized โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- YOLO Speed (Nano) - Fast inference for real-time monitoring (~15ms)
- YOLO Accuracy (Small) - Higher precision for critical detections (~35ms)
- RNN Temporal - Track objects across frames with confidence boosting
- Total Fusion Latency: ~42ms โ
Ask natural language questions about safety:
- "Is this sector safe for workers?"
- "What safety equipment is missing?"
- "Analyze this zone for fire hazards"
Self-healing pipeline when confidence drops:
- Monitor - Continuous confidence tracking
- Detect - Low confidence threshold triggered (<45%)
- Generate - Falcon Duality AI creates augmented training data (14 types)
- Retrain - Fine-tune model on edge cases
- Deploy - Hot-swap weights at edge (zero downtime)
- Result: +14% average accuracy improvement
- Publish safety detection models to marketplace
- Earn AGI tokens for API calls
- Access decentralized AI services
- Monetize your AI contributions
- Docker & Docker Compose (for local development)
- Python 3.10+ & Node.js 18+ (for local development)
- NVIDIA GPU (optional, for faster inference)
- Groq API key (optional, for VLM features)
# Clone the repository
git clone https://github.com/ROHANBAIJU/CODE-TRIBE.git
cd CODE-TRIBE
# Copy environment file
cp .env.example .env
# Edit .env with your GROQ_API_KEY
# Start all services
docker-compose up -d
# Access the application
# Frontend: http://localhost
# Backend API: http://localhost:8000# Backend
cd backend
pip install -r ../requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000
# Frontend (new terminal)
cd frontend
npm install
npm run devBackend: Deploy to Render.com (Free tier available)
Frontend: Deploy to Vercel (Free tier available)
- Frontend:
https://code-tribe.vercel.app(Always fast) - Backend: Run locally (No cold start delays)
- Setup Time: 2 minutes
- Experience: Best performance
- Frontend:
https://code-tribe.vercel.app - Backend API:
https://safety-guard-code-tribe.onrender.com - API Docs:
https://safety-guard-code-tribe.onrender.com/docs โ ๏ธ Warning: 50+ second cold start on first request (Render free tier limitation)
docker-compose up -d
# Frontend: http://localhost
# Backend: http://localhost:8000- Live URL:
https://code-tribe.vercel.appโ - Status: Fully functional, deployed on Vercel
- Features: All UI features work perfectly
- Render.com Backend: Experiences 50+ second cold start delays due to free tier limitations
- Impact: First API request after inactivity takes 50-60 seconds to respond
- Subsequent requests: Fast after initial warm-up
For best experience during evaluation:
-
Clone repository and run backend locally:
cd backend pip install -r ../requirements.txt uvicorn main:app --reload --host 0.0.0.0 --port 8000 -
Access hosted frontend at
https://code-tribe.vercel.app- Frontend will connect to your localhost backend (update .env if needed)
-
Alternatively: Run both frontend and backend locally using Docker:
docker-compose up
- VLM Chat Feature requires Groq API key (not included for security)
- To enable VLM:
- Get free API key from Groq Console
- Add to
.envfile:GROQ_API_KEY=your_key_here - Restart backend
- Without API key: VLM features will show "API key not configured" error
- All other features work without API key (detection, fusion, Falcon-Link, mapping)
SafetyGuard AI's comprehensive model matrices demonstrate our technical superiority:
8ร8 class performance breakdown with per-class accuracy percentages
True Positives (n=1000), False Positives (n=300), False Negatives (n=200) distribution
mAP@0.5 = 0.872 (87.2%) across all safety equipment classes
Receiver Operating Characteristic curves showing model discrimination ability
4-panel dashboard: Precision/Recall/F1, Class Support, Latency, Radar Chart
Loss convergence, mAP@0.5 progression, and learning rate scheduling
Key Insights from Matrices:
- โ Best Class: SafetyHelmet at 92.3% accuracy
- โ Worst Class: FloorSign at 81.7% accuracy (still excellent)
- โ Overall Accuracy: 89.2% (competitive with enterprise solutions)
- โ mAP@0.5: 87.2% (strong detection performance)
- โ Inference Speed: 42ms average (2-5ร faster than competitors)
| Feature | SafetyGuard AI | Detect Technologies | Intenseye | Spot AI | Traditional CCTV |
|---|---|---|---|---|---|
| Pricing (Annual) | Free / Open Source ๐ | โน25-50 Lakh ($30K-60K) | $40K-80K | $25K-50K | โน5-10 Lakh (Hardware only) |
| Deployment | Self-hosted / Cloud | Enterprise Cloud | Enterprise Cloud | Cloud SaaS | On-premise |
| Detection Accuracy | 89.2% โ | ~85-90% | ~87-92% | ~82-88% | N/A (Human monitoring) |
| Inference Speed | 42ms โก | 80-150ms | 100-200ms | 120-180ms | N/A |
| Self-Healing AI | Yes (Falcon-Link) ๐ฆ | No | No | No | No |
| Natural Language Queries | Yes (VLM) ๐ง | No | Limited | No | No |
| Multi-Layer Fusion | 3 Layers (Nano+Small+RNN) | Single Model | Ensemble | Single Model | N/A |
| Real-time Streaming | Yes (WebSocket) | Yes | Yes | Yes | Yes |
| Custom Training | Yes (Free) | Paid Service ($5K+) | Paid Service | Limited | N/A |
| Offline Operation | Yes | No (Cloud-only) | No | No | Yes |
| API Access | Full REST API | Limited | Enterprise Only | Limited | No |
| Open Source | Yes (MIT) ๐ | No | No | No | N/A |
| Decentralized (SNet) | Yes ๐ | No | No | No | No |
| Setup Time | 5 minutes | 2-4 weeks | 3-6 weeks | 1-2 weeks | 1-2 days |
| SME Friendly | Yes โ | No (Too expensive) | No | No | Partially |
| Deployment | SafetyGuard AI | Detect Technologies | Intenseye | Savings |
|---|---|---|---|---|
| Year 1 | โน0 (Free) | โน35 Lakh | โน40 Lakh | 93-96% |
| Year 3 | โน0 (Free) | โน1.05 Crore | โน1.2 Crore | 100% |
| Year 5 | โน0 (Free) | โน1.75 Crore | โน2 Crore | 100% |
| Metric | SafetyGuard AI | Industry Average | Advantage |
|---|---|---|---|
| Inference Latency | 42ms | 120ms | 2.8ร Faster โก |
| Accuracy (mAP@0.5) | 87.2% | 85% | +2.2% |
| Self-Healing Boost | +14% | 0% | World's First ๐ฆ |
| Cost | $0 | $40K/year | 100% Savings ๐ฐ |
| Setup Time | 5 min | 3 weeks | 600ร Faster ๐ |
| Endpoint | Method | Description |
|---|---|---|
/system/health |
GET | System health check with model status |
| Endpoint | Method | Description |
|---|---|---|
/detect/fusion |
POST | Primary detection - Fused YOLO + RNN inference |
/detect/layer/{layer_num} |
POST | Single-layer detection (1=Nano, 2=Small, 3=RNN) |
| Endpoint | Method | Description |
|---|---|---|
/chat/safety |
POST | Natural language safety analysis with image upload |
/chat/quick |
POST | Quick query using previous detection context |
/chat/status |
GET | Check VLM backend status and providers |
| Endpoint | Method | Description |
|---|---|---|
/falcon/status |
GET | Self-healing pipeline status |
/falcon/run-healing |
POST | Run full self-healing pipeline for a class |
/falcon/duality/augment |
POST | Generate augmented training data |
| Endpoint | Method | Description |
|---|---|---|
/snet/status |
GET | Connection status and wallet balance |
/snet/services |
GET | Browse available AI services |
/snet/publish |
POST | Publish model to marketplace |
| Endpoint | Protocol | Description |
|---|---|---|
/ws/webcam |
WebSocket | Real-time webcam detection streaming |
| Class | Description | Use Case |
|---|---|---|
| ๐ซ OxygenTank | Emergency oxygen supply | Chemical plants, Mines, Space stations |
| ๐ต NitrogenTank | Industrial gas container | Manufacturing, Labs |
| ๐ฉน FirstAidBox | Medical emergency supplies | All workplaces |
| ๐จ FireAlarm | Fire detection/alert system | All buildings |
| โก SafetySwitchPanel | Electrical safety controls | Power plants, Factories |
| โ๏ธ EmergencyPhone | Emergency communication | Factory floors, Corridors |
| ๐งฏ FireExtinguisher | Fire suppression device | All industrial settings |
| Model | Epochs | Batch Size | Image Size | Dataset Size |
|---|---|---|---|---|
| YOLO-Nano (Speed) | 50 | 32 | 640ร640 | 8,000 images |
| YOLO-Small (Accuracy) | 50 | 16 | 640ร640 | 8,000 images |
| RNN Temporal | 30 | 64 | N/A (sequence) | 5,000 sequences |
| Model | mAP@0.5 | Inference Speed | Training Time |
|---|---|---|---|
| YOLO-Nano | 82.1% | ~15ms | ~6 hours |
| YOLO-Small | 89.3% | ~35ms | ~14 hours |
| RNN Temporal | 91.2% tracking | +7.3% boost | ~4 hours |
For comprehensive information, see:
- about_models.md - Complete AI model architecture documentation
- DEPLOYMENT.md - Backend deployment guide for Render
- DEPLOYMENT_FRONTEND.md - Frontend deployment guide for Vercel
- QUICKSTART.md - Get started in under 5 minutes
- PRESENTATION.md - Hackathon presentation script
- QUESTIONS.md - Judge Q&A preparation
CODE-TRIBE/
โโโ backend/
โ โโโ main.py # FastAPI application (1383 lines)
โ โโโ core/
โ โ โโโ fusion_enhanced.py # Spatio-temporal fusion engine
โ โ โโโ rnn_temporal.py # RNN tracking with EMA smoothing
โ โ โโโ vlm_chat.py # VLM "The Brain" interface
โ โ โโโ falcon_duality.py # Self-healing augmentation
โ โ โโโ singularitynet.py # SNet integration
โ โโโ models/
โ โโโ yolo_speed.pt # YOLOv8n (speed optimized)
โ โโโ yolo_accuracy.pt # YOLOv8s (accuracy optimized)
โ โโโ rnn_temporal.pt # RNN temporal model
โโโ frontend/
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ SafetyChat.tsx
โ โ โ โโโ AstroOpsPipeline.tsx
โ โ โ โโโ SingularityNetPanel.tsx
โ โ โโโ pages/
โ โ โโโ Dashboard.tsx
โ โโโ package.json
โโโ DOCUMENTS-IMPORTANT/
โ โโโ architecture_platform.png # Platform architecture diagram
โ โโโ architecture_diagram.png # Detailed architecture diagram
โ โโโ QUESTIONS.md # Judge Q&A
โ โโโ MODEL_MATRICES/ # 13 performance visualizations
โโโ about_models.md # Comprehensive model documentation
โโโ docker-compose.yml
โโโ requirements.txt
Team Name: Code Tribe
Hackathon: DEEP Open Innovation Hackathon #OIH2025
| Name | Role | Contributions |
|---|---|---|
| Rohan Baiju | Team Lead & Full-Stack Developer | Architecture design, FastAPI backend, SingularityNET integration, Falcon-Link self-healing pipeline |
| R Dhiya Krishna | AI/ML Engineer & Frontend Developer | YOLO model training, RNN temporal tracking, React dashboard, VLM "The Brain" integration |
| R Sai Pranav | DevOps & Data Engineer | Docker orchestration, MongoDB setup, model matrices visualization, performance benchmarking |
- GitHub: ROHANBAIJU/CODE-TRIBE
- Email: codetribe.hackathon@gmail.com
Demo Video:
- ๐ฅ YouTube: SafetyGuard AI Demo
MIT License - See LICENSE for details.
Built with โค๏ธ for DEEP Open Innovation Hackathon #OIH2025
Powered by SingularityNET & Deep Funding
๐ก๏ธ SafetyGuard AI - Protecting Workers, Saving Lives
Technical Excellence:
- โ 89.2% Detection Accuracy (mAP@0.5: 87.2%)
- โ 42ms Latency (2-5ร faster than competitors)
- โ Falcon-Link Self-Healing (+14% accuracy on edge cases)
- โ VLM Natural Language Interface (Groq Llama-3.3-70B)
- โ SingularityNET Integration (Decentralized AI marketplace)
Innovation Recognition:
- ๐ฆ Self-Healing Safety AI (Falcon-Link AstroOps)
- Natural Language Safety Queries (VLM "The Brain")
- ๐ 3-Layer Fusion Architecture (YOLO Nano + Small + RNN)
- ๐ Open Source & Decentralized (93-96% cost reduction)
- SingularityNET Foundation for decentralized AI infrastructure
- Deep Funding for hackathon organization and AGI token economy
- Ultralytics for YOLOv8 object detection framework
- Groq for lightning-fast LLM inference (Llama-3.3-70B)
Phase 2 (Post-Hackathon):
- Mobile app (iOS/Android) for on-site inspections
- Multi-language VLM support (Hindi, Tamil, Telugu, Marathi)
- Thermal camera integration for fire detection
- Compliance reporting (OSHA, ISO 45001, Factory Act 1948)
- Edge device deployment (Raspberry Pi, NVIDIA Jetson)
Phase 3 (Scale):
- Expand to 50+ safety classes
- Predictive safety analytics (ML forecasting)
- Multi-site centralized dashboard
- Blockchain audit trail for compliance
- โจ Enhanced confidence threshold system (45-55%) for reduced false positives
- โจ Training images preview in self-healing pipeline
- โจ EMA smoothing for temporal confidence stabilization
- โจ Comprehensive model documentation (about_models.md)
- โจ Architecture diagrams integrated into README
- ๐ Fixed webcam false positive detection issue
- ๐ Updated performance metrics and benchmarks
- โจ Added 3-layer fusion architecture (YOLO Nano + Small + RNN)
- โจ YOLO dual ensemble (Nano + Small)
- โจ Basic RNN temporal tracking
- โจ FastAPI backend with 8 safety classes
- โจ React dashboard with Chart.js
- โจ Implemented Falcon-Link self-healing pipeline (+14% accuracy)
- โจ Integrated VLM "The Brain" for natural language queries
- โจ SingularityNET marketplace integration
- ๐ Achieved 89.2% accuracy with 42ms latency
Made with โค๏ธ by Code Tribe for India's Industrial Safety Revolution
Democratizing AI-powered safety monitoring, one factory at a time. ๐ก๏ธ


