Skip to content

Trinetra is an AI-powered surveillance and assistance system designed for large-scale religious gatherings like Mahakumbh.

Notifications You must be signed in to change notification settings

gururaj1512/Trinetra

Repository files navigation

Trinetra: The Divine Eye of Mahakumbh

Trinetra Logo

Team ID: TH1296

๐ŸŒŸ Overview

Trinetra is an AI-powered surveillance and assistance system designed for large-scale religious gatherings like Mahakumbh. The platform ensures real-time crowd monitoring, rapid emergency response, and seamless navigation for millions of pilgrims through integrated mobile and web interfaces. It features advanced AI analytics including facial recognition for lost & found, GPS-based family tracking with automated alerts, disaster prediction, and dynamic emergency routing.

๐ŸŽฏ Problem & Solution

Problem Statement

Mass gatherings at events like Mahakumbh face critical challenges including:

  • Family separation in dense crowds
  • Uncontrolled crowd movement leading to stampede risks
  • Delayed emergency detection and response
  • Overstretched infrastructure with limited real-time visibility
  • Difficulty in guiding people safely during crises

Solution

Trinetra provides a comprehensive AI-powered solution integrating:

  • Facial Recognition Technology for rapid lost person recovery
  • Real-time GPS Family Tracking with automated distance alerts
  • Predictive Analytics for disaster forecasting
  • Live Crowd Density Heatmaps for optimal resource allocation
  • Instant SOS Emergency Response system with ambulance booking and tracking
  • Offline AI Navigation for uninterrupted access
  • Centralized Dashboards for unified monitoring and response coordination

๐Ÿ—๏ธ System Architecture

System Architecture Overview showing integrated components and data flow

๐Ÿ”„ Logic & Workflow

Data Collection

  • User registration with family member details and missing person images
  • Real-time GPS location data from registered family members
  • Live CCTV streams and sensor data from multiple surveillance points
  • Weather data, satellite imagery, and crowd movement patterns

Processing

  • AI Facial Recognition using FaceNet technology for matching uploaded images with live CCTV feeds
  • Machine Learning Algorithms analyzing crowd density and movement patterns using YOLO and OpenCV [[memory:8341815]]
  • Real-time Processing generating automated alerts for family separation (500m+ distance), emergency situations, and anomaly detection

Output

  • Instant notifications for lost family members with precise location coordinates
  • Real-time crowd density heatmaps and risk zone alerts
  • Dynamic route suggestions and traffic analysis
  • Emergency response coordination with ambulance dispatch and tracking
  • Multilingual chatbot assistance for pilgrim guidance

๐Ÿ‘ฅ User Roles

Pilgrim Interface

Pilgrim mobile app interface showing family tracking and emergency features

- Register and manage family member profiles - Report missing persons with image upload - Receive automated alerts for family separation - Access real-time locations of nearby hospitals - Book ambulance services with live tracking - Use offline AI navigation for Kumbh area mapping

Admin Dashboard

Administrative control panel with real-time monitoring and crowd analytics

- Monitor live CCTV feeds with automated facial recognition - Analyze real-time crowd density heatmaps - Receive instant alerts for detected anomalies - Coordinate emergency response and resource allocation - Access advanced disaster prediction tools

Medical Admin Interface

Medical emergency management system with ambulance coordination and patient tracking

- Process ambulance booking requests - Track and coordinate ambulance dispatch - Manage medical camp information - Monitor emergency response metrics

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React.js - Main web application framework
  • Next.js - Server-side rendering and optimization
  • React Native - Mobile application development
  • Tailwind CSS - Utility-first CSS framework

Backend

  • Node.js + Express - Web server and API development
  • FastAPI - High-performance Python API framework
  • Flask - Lightweight Python web framework

Database

  • PostgreSQL - Primary relational database
  • Firestore - NoSQL database for real-time data
  • Redis - In-memory data structure store

AI/ML

  • Python - Core programming language
  • OpenCV - Computer vision library
  • YOLO - Real-time object detection
  • FaceNet - Face recognition technology
  • Gemini AI - Advanced AI capabilities

Real-time Communication

  • Socket.io - Real-time bidirectional event-based communication
  • WebRTC - Peer-to-peer communication
  • Kafka - Distributed streaming platform

Security & Deployment

  • JWT Authentication - Secure token-based authentication
  • Docker - Containerization platform
  • AWS EC2 - Cloud computing service
  • Prometheus & Grafana - Monitoring and visualization

๐Ÿ“ Project Structure

Trinetra/
โ”œโ”€โ”€ ai-guided-map/          # AI-powered navigation system
โ”œโ”€โ”€ crowd-detection/        # Real-time crowd monitoring
โ”œโ”€โ”€ gun-detection/          # Weapon detection system
โ”œโ”€โ”€ image-recognition/      # Image processing and analysis
โ”œโ”€โ”€ lost-and-found/         # Facial recognition for missing persons
โ”œโ”€โ”€ mahakumbh-disaster-prediction/  # Disaster prediction system
โ”œโ”€โ”€ peoples/               # People counting and analysis
โ”œโ”€โ”€ Trinetra/              # Main React application
โ””โ”€โ”€ images/                # Project documentation images

๐Ÿ“ฑ Mobile App (APK)

Download and Install

The Trinetra mobile application is available as an APK file for Android devices.

APK File: base.apk

Installation Instructions

Method 1: Direct Installation (Android)

  1. Enable Unknown Sources:

    • Go to Settings โ†’ Security โ†’ Unknown Sources
    • Enable "Install from Unknown Sources" or "Allow from this source"
  2. Download APK:

    • Download the base.apk file from the repository
    • Transfer to your Android device via USB, email, or cloud storage
  3. Install:

    • Open the APK file on your Android device
    • Tap "Install" when prompted
    • Grant necessary permissions (Location, Camera, Storage)

Method 2: Using ADB (Advanced)

# Install via ADB (Android Debug Bridge)
adb install base.apk

# Or install and grant permissions
adb install -g base.apk

Mobile App Features

  • Real-time Family Tracking with GPS coordinates
  • Emergency SOS with one-tap ambulance booking
  • Lost Person Reporting with photo upload
  • Offline Navigation for Kumbh area mapping
  • Multilingual Support for diverse pilgrim community
  • Push Notifications for alerts and updates

System Requirements

  • Android Version: 6.0 (API level 23) or higher
  • RAM: 2GB minimum, 4GB recommended
  • Storage: 100MB available space
  • Network: WiFi or 4G/5G for real-time features
  • Permissions: Location, Camera, Storage, Network Access

๐Ÿš€ Quick Start

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.8+ (for local development)

Using Docker (Recommended)

  1. Clone the repository
git clone <repository-url>
cd Trinetra
  1. Start all services
docker-compose up -d
  1. Access the applications

Manual Setup

1. Main React Application (Trinetra)

cd Trinetra
npm install
npm run dev

2. AI Guided Map

cd ai-guided-map
npm install
npm run dev

3. Crowd Detection

cd crowd-detection
pip install -r requirements.txt
python app.py

4. Gun Detection

cd gun-detection
pip install -r requirements.txt
python main.py

5. Image Recognition

cd image-recognition
pip install -r requirements.txt
python app.py

6. Lost & Found

cd lost-and-found
pip install -r requirements.txt
python app.py

7. Disaster Prediction Backend

cd mahakumbh-disaster-prediction/backend
pip install -r requirements.txt
python app.py

8. Disaster Prediction Frontend

cd mahakumbh-disaster-prediction/frontend
npm install
npm run dev

๐Ÿ”ง Configuration

Environment Variables

Each service requires specific environment variables. Copy the example files and configure:

# For Python services
cp gun-detection/env.example gun-detection/.env
cp image-recognition/env.example image-recognition/.env

# Configure your API keys and database connections

API Keys Required

  • Google Maps API (for navigation)
  • Gemini AI API (for AI features)
  • Weather API (for disaster prediction)
  • Satellite imagery API

๐Ÿ“Š Features Showcase

Real-time Crowd Monitoring

Live crowd density visualization with heat maps and movement patterns

Facial Recognition System

AI-powered facial recognition system for lost person identification and matching

Emergency Response Dashboard

Emergency response coordination center with real-time alerts and resource management

Disaster Prediction Analytics

Predictive analytics dashboard showing weather patterns, satellite imagery, and risk assessment

GPS Tracking Interface

Real-time GPS tracking system for family member location monitoring and alerts

Medical Emergency System

Medical emergency response system with ambulance booking and hospital location services

Navigation Interface

AI-powered navigation system with offline mapping and route optimization

Admin Control Panel

Centralized administrative control panel for system monitoring and management

Real-time Analytics

Real-time data analytics dashboard with crowd statistics and trend analysis

Security Monitoring

Advanced security monitoring system with threat detection and surveillance capabilities

๐Ÿ”ฎ Future Scope

Advanced Features

  • Drone Integration for aerial surveillance covering blind spots
  • Advanced CCTV Integration for automated video flow processing
  • Voice Monitoring capabilities for distress call detection
  • Machine Learning Models with reinforcement algorithms for incident prediction
  • City Infrastructure Integration with traffic systems and public transportation

Scalability

  • Adaptation for other large-scale events
  • Smart city implementations
  • International religious gatherings with multi-language support
  • Cultural customization for different regions

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ฅ Team

Team ID: TH1296

๐Ÿ“ฑ Mobile App Troubleshooting

Common APK Installation Issues

  1. Installation Blocked by Security

    # Solution: Enable Unknown Sources
    Settings โ†’ Security โ†’ Unknown Sources โ†’ Enable
  2. Permission Denied Error

    # Grant all required permissions during installation
    - Location Access
    - Camera Access
    - Storage Access
    - Network Access
  3. App Crashes on Startup

    # Check system requirements
    - Android 6.0+ required
    - 2GB RAM minimum
    - 100MB free storage
  4. GPS/Location Not Working

    # Enable location services
    Settings โ†’ Location โ†’ Enable
    Settings โ†’ Apps โ†’ Trinetra โ†’ Permissions โ†’ Location โ†’ Allow
  5. Network Connection Issues

    # Check network settings
    - WiFi or 4G/5G connection required
    - Firewall settings
    - VPN conflicts

๐Ÿ“ž Support

For support and questions, please contact the development team or create an issue in the repository.


Trinetra - Ensuring safety and peace of mind for millions of pilgrims through the power of AI and technology.

About

Trinetra is an AI-powered surveillance and assistance system designed for large-scale religious gatherings like Mahakumbh.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published