Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

71 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ SafetyGuard AI

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.

DEEP Hackathon SingularityNET Python React FastAPI YOLO


๐ŸŽฏ Project Overview

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.

The Challenge

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

Our Solution

A fully intelligent, self-healing safety platform that democratizes industrial AI for India's manufacturing backbone.

๐Ÿ’ก What Does SafetyGuard AI Do?

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

๐Ÿ† Hackathon Context

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:


๐Ÿ—๏ธ System Architecture

High-Level Platform Overview

SafetyGuard AI Platform Architecture

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

Detailed Architecture Diagram

SafetyGuard AI Core Engine Architecture

Detailed 3-layer detection pipeline with AstroOps self-healing loop

Architecture Components Explained:

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

ASCII Architecture Reference

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      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         โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽจ Features

1. ๐Ÿ” Multi-Layer Detection

  • 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 โœ…

2. ๐Ÿง  The Brain (VLM Chat)

Ask natural language questions about safety:

  • "Is this sector safe for workers?"
  • "What safety equipment is missing?"
  • "Analyze this zone for fire hazards"

3. ๐Ÿฆ… Falcon-Link AstroOps (Self-Healing)

Self-healing pipeline when confidence drops:

  1. Monitor - Continuous confidence tracking
  2. Detect - Low confidence threshold triggered (<45%)
  3. Generate - Falcon Duality AI creates augmented training data (14 types)
  4. Retrain - Fine-tune model on edge cases
  5. Deploy - Hot-swap weights at edge (zero downtime)
  6. Result: +14% average accuracy improvement

4. ๐ŸŒ SingularityNET Integration

  • Publish safety detection models to marketplace
  • Earn AGI tokens for API calls
  • Access decentralized AI services
  • Monetize your AI contributions

๐Ÿš€ Quick Start

Prerequisites

  • 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)

Option 1: Docker (Recommended for Local Development)

# 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

Option 2: Local Development

# 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 dev

Option 3: Production Deployment

Backend: Deploy to Render.com (Free tier available)
Frontend: Deploy to Vercel (Free tier available)


๐ŸŒ Live Demo & Access

Option 1: Hosted Frontend + Local Backend (RECOMMENDED โญ)

  • Frontend: https://code-tribe.vercel.app (Always fast)
  • Backend: Run locally (No cold start delays)
  • Setup Time: 2 minutes
  • Experience: Best performance

Option 2: Fully Hosted (Expect Delays)

  • 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)

Option 3: Full Localhost (Docker)

docker-compose up -d
# Frontend: http://localhost
# Backend: http://localhost:8000

โš ๏ธ IMPORTANT DEPLOYMENT NOTICES

๐ŸŒ Hosted Frontend Status

  • Live URL: https://code-tribe.vercel.app โœ…
  • Status: Fully functional, deployed on Vercel
  • Features: All UI features work perfectly

๐ŸŒ Backend Deployment Issue

  • 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

โœ… RECOMMENDED APPROACH (Localhost)

For best experience during evaluation:

  1. Clone repository and run backend locally:

    cd backend
    pip install -r ../requirements.txt
    uvicorn main:app --reload --host 0.0.0.0 --port 8000
  2. Access hosted frontend at https://code-tribe.vercel.app

    • Frontend will connect to your localhost backend (update .env if needed)
  3. Alternatively: Run both frontend and backend locally using Docker:

    docker-compose up

๐Ÿ”‘ VLM "The Brain" API Key Notice

  • VLM Chat Feature requires Groq API key (not included for security)
  • To enable VLM:
    1. Get free API key from Groq Console
    2. Add to .env file: GROQ_API_KEY=your_key_here
    3. 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)

๐Ÿ“Š Model Performance Visualizations

SafetyGuard AI's comprehensive model matrices demonstrate our technical superiority:

Architecture Matrices

EMA Temporal Smoothing

EMA Smoothing

Exponential Moving Average (ฮฑ=0.3) for confidence stabilization across frames

Performance Metrics

Confusion Matrix (89.2% Overall Accuracy)

Confusion Matrix

8ร—8 class performance breakdown with per-class accuracy percentages

Confidence Distribution Analysis

Confidence Distribution

True Positives (n=1000), False Positives (n=300), False Negatives (n=200) distribution

Precision-Recall Curves

Precision-Recall

mAP@0.5 = 0.872 (87.2%) across all safety equipment classes

ROC Curves with AUC Scores

ROC Curves

Receiver Operating Characteristic curves showing model discrimination ability

Performance Metrics Dashboard

Performance Metrics

4-panel dashboard: Precision/Recall/F1, Class Support, Latency, Radar Chart

Training Progress Over 50 Epochs

Training Curves

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)

๐Ÿ“Š Competitive Comparison Matrix

SafetyGuard AI vs. Enterprise Solutions

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

Cost Savings Analysis

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%

Technical Superiority

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 ๐Ÿš€

๐Ÿ“ก API Endpoints

System & Health

Endpoint Method Description
/system/health GET System health check with model status

Detection Endpoints

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)

VLM Chat ("The Brain")

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

Falcon-Link Self-Healing

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

SingularityNET Integration

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

Real-Time WebSocket

Endpoint Protocol Description
/ws/webcam WebSocket Real-time webcam detection streaming

๐ŸŽฏ Safety Classes Detected

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 Training Details

Training Configuration

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

Training Results

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

๐Ÿ“š Documentation

For comprehensive information, see:


๐Ÿ“ Project Structure

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 Code Tribe

Team Name: Code Tribe
Hackathon: DEEP Open Innovation Hackathon #OIH2025

Core Team Members

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

Contact


๐Ÿ“Š Presentation Materials

Demo Video:


๐Ÿ“„ License

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


๐Ÿ† Achievements

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)

๐Ÿ™ Acknowledgments

  • 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)

๐Ÿ”ฎ Future Roadmap

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

๐Ÿ“œ Changelog

Version 3.0.0 (December 2025) - DEEP Hackathon Final Submission

  • โœจ 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

Version 2.0.0 (December 2025) - DEEP Hackathon Submission

  • โœจ 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. ๐Ÿ›ก๏ธ

About

Making a wonderfullll solution ^_^ for DEEP Open Innovation Hackathon 2025

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages