Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GOEL β€” The Rescuer

Post-Earthquake Survivor Localization System

A hybrid soft computing platform that combines CNN Β· ANN Β· Fuzzy Logic Β· PSO to detect and locate survivors within the critical 72-hour golden window.

Status AI Models USGS React Flask License

Live Demo Β· Report Bug Β· Request Feature


The Problem

After a major earthquake, survival probability drops to near zero after 72 hours. Most disaster response systems rely on manual coordination, delayed communication, and fragmented data. Rescue teams waste precious time deciding where to go instead of saving lives.

GOEL (Hebrew for "The Rescuer") changes that. It is a fully automated AI pipeline that activates the moment an earthquake is detected β€” processing thermal imagery, computing survival probabilities, classifying risk zones, and routing rescue teams β€” all without waiting for human instructions.


System Overview

GOEL

Operation TOKYO-EQ-2026 β€” Active. Every subsystem is running. CNN is processing thermal feeds. ANN is computing survival probabilities. Fuzzy Logic is scoring zones. PSO is routing teams. USGS is streaming live seismic data.


Live Operations Dashboard

Live Operations Dashboard

The dashboard is the central command interface β€” hydrated via REST on load and continuously updated through WebSocket events.

Metric Value Status
Survivors Detected 14 +2 in last hour
Rescue Teams Active 6 3 currently en route
Critical Zones 3 Immediate action required
Hours Since Quake 18 54 hours remaining

Fuzzy Zone Classification

Zone Score Range Directive
πŸ”΄ CRITICAL 78 – 100 Deploy rescue team immediately
🟑 MODERATE 40 – 77 Deploy within 2 hours
🟒 LOW 0 – 39 Assign remote monitoring

The rescue map renders live via Leaflet + OpenStreetMap. Survivors, teams, and zone boundaries are plotted with color-coded markers. Critical zones pulse. Rescued survivors fade to gray.


Mission Status β€” 72-Hour Countdown

Mission Status

Operation Progress Completion
Survivors Detected 14 / 14 100%
Rescue Dispatched 9 / 14 64%
Active Operations 6 / 9 67%
Successfully Rescued 7 / 14 50%

A real-time countdown timer tracks the remaining hours in the golden 72-hour window. The overall mission progress bar aggregates all rescue operations with animated fill transitions.


Field Intelligence

Field Intelligence

Survivor Detection Panel

Each survivor card displays real-time data: location, CNN confidence score, fuzzy zone classification, heat signature, and current status (detected β†’ dispatched β†’ rescued). Cards update automatically via WebSocket as the backend simulation advances.

PSO Route Optimizer

The optimizer assigns rescue teams to survivors using Particle Swarm Optimization. One click triggers the Flask backend to compute the globally optimal assignment.

Team Members Assignment Distance ETA
Alpha 4 Survivor #1 & #2 β€” Block A 0.4 km 8 min
Bravo 3 Survivor #3 β€” Block B, Floor 3 0.9 km 15 min
Charlie 5 Survivor #4 & #5 1.2 km 22 min

Graceful degradation: When the backend is unreachable, the frontend falls back to static data and local computation β€” the dashboard never goes blank.


AI Analysis & Seismic Intelligence

AI Analysis and Seismic Data

CNN Thermal Imaging

Upload any thermal image via drag-and-drop. The backend runs it through the convolutional network and returns: survivor count, confidence score, heat signature, zone classification, and processing time.

USGS Live Earthquake Feed

The system connects to the USGS Real-Time API via the Flask backend. If the backend is down, the frontend fetches directly from USGS as a fallback. Each event shows magnitude, location, depth, and timestamp.


Live Diagnostics

Live Diagnostics

Seismic Waveform Analysis

P-waves and S-waves are plotted in real time using Recharts. The time gap between P-wave and S-wave arrival estimates distance to epicenter. Toggle LIVE mode for continuously streaming waveform data via WebSocket.

Fuzzy Logic Interactive Tester

Three adjustable sliders control the fuzzy inference inputs:

Input Weight Range
🌑 Heat Signature Score Γ—0.45 0 – 100%
🏚 Void Probability Γ—0.35 0 – 100%
πŸ“‘ Signal Strength Γ—0.20 0 – 100%

Drag the sliders to see the zone classification update in real time. Click "Run via Flask Backend" to call the real scikit-fuzzy Mamdani inference engine on the server.


AI Model Visualizers

AI Model Visualizers

CNN Confidence Chart

Bar chart showing detection confidence per survivor. Scores above 70% trigger immediate dispatch. Color-coded by zone (Critical / Moderate / Low). Powered by real-time survivor data from the WebSocket feed.

ANN Survival Predictor

Interactive predictor with three inputs:

  • Building Type β€” Reinforced Concrete, Steel Frame, Masonry, Wood, Unreinforced
  • Floor Number β€” 1 to 20
  • Earthquake Magnitude β€” 5.0M to 9.0M

Computes survival probability and void space probability in real time using a weighted neural network model.


Swarm Optimization β€” PSO Live Visualization

Swarm Optimization Live

A canvas-rendered particle swarm simulation that visualizes 28 particles converging on 5 survivor targets. Each particle draws a fading trail as it navigates toward its assigned survivor.

Parameter Value
Algorithm Particle Swarm Optimization
Inertia (w) 0.72
Cognitive coefficient (c₁) 1.5
Social coefficient (cβ‚‚) 2.0
Active particles 28
Max velocity 3.5

The visualization auto-starts when scrolled into view and updates at 60fps via requestAnimationFrame.


AI Pipeline Architecture

AI Pipeline Architecture

Drone Input β†’ CNN β†’ ANN β†’ Fuzzy Logic β†’ PSO β†’ Rescue Dispatch
Stage Model Function Performance
1 CNN Thermal image analysis β†’ survivor detection 94.2% accuracy Β· 5 Conv + 3 FC layers
2 ANN Structural data β†’ survival probability 91.7% precision Β· 3 Hidden (128β†’64β†’32)
3 Fuzzy Logic Multi-signal fusion β†’ zone classification 48 IF-THEN rules Β· Mamdani FIS
4 PSO Zone priorities + team positions β†’ optimal routes 30 particles Γ— 100 iterations

Each stage card in the UI is expandable β€” click to reveal detailed inputs, outputs, and architecture specifications.


Mission Report & Timeline

Mission Report and Timeline

Survivor Timeline

A vertical timeline that logs every operation event with timestamps, status icons, and expandable descriptions. Events are sourced from the real-time engine and update automatically.

PDF Export

One-click professional PDF report generated client-side using jsPDF. Includes:

  • Seismic event summary
  • Operation statistics (survivors, rescued, teams, zones)
  • AI models deployed
  • Full survivor detection log with zones and confidence scores

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        FRONTEND                             β”‚
β”‚  React 19 Β· Tailwind CSS v4 Β· Vite 8 Β· Port 5174           β”‚
β”‚  Recharts Β· Leaflet Β· Socket.io-client Β· jsPDF              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              ↕ REST (initial hydration)                      β”‚
β”‚              ↕ WebSocket (continuous updates)                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                        BACKEND                              β”‚
β”‚  Flask Β· Flask-SocketIO Β· eventlet Β· Port 5000              β”‚
β”‚  scikit-fuzzy Β· NumPy Β· SciPy Β· NetworkX                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     EXTERNAL DATA                           β”‚
β”‚  USGS Earthquake API Β· OpenStreetMap                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Real-Time Engine

The backend runs background workers via eventlet that simulate live operations:

  • Earthquake monitor β€” Polls USGS API every 60s
  • Survivor simulator β€” Updates survivor states, zones, and confidence scores
  • Seismic stream β€” Generates synthetic waveform data at 5Hz
  • PSO recalculation β€” Re-optimizes routes every 30s

State is managed in a thread-safe singleton (realtime/state.py) using threading.Lock. The frontend's RealtimeProvider context hydrates initially via GET /api/state and then subscribes to Socket.io events for continuous updates.

REST API

Endpoint Method Description
/api/state GET Full state snapshot for initial hydration
/api/health GET System heartbeat + model status
/api/fuzzy-score POST Run Mamdani fuzzy inference (heat, void, hours)
/api/optimize-routes POST Execute PSO for survivor/team coordinates
/api/earthquake-live GET Fetch current USGS significant earthquakes
/api/analyze-thermal POST Simulate CNN thermal analysis

WebSocket Events

Event Direction Payload
state_update Server β†’ Client Full state snapshot
survivor_update Server β†’ Client Updated survivor list
seismic_data Server β†’ Client Waveform data point
route_update Server β†’ Client PSO route results
request_pso Client β†’ Server Trigger PSO recalculation

Project Structure

Goel-AI/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py                  # Flask + SocketIO entry point
β”‚   β”œβ”€β”€ Procfile                # Gunicorn + eventlet deployment
β”‚   β”œβ”€β”€ requirements.txt        # Python dependencies
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── routes.py           # REST API endpoints
β”‚   β”œβ”€β”€ realtime/
β”‚   β”‚   β”œβ”€β”€ engine.py           # Background workers & simulation loops
β”‚   β”‚   └── state.py            # Thread-safe state singleton
β”‚   └── utils/
β”‚       β”œβ”€β”€ fuzzy_engine.py     # scikit-fuzzy Mamdani inference
β”‚       └── pso_optimizer.py    # Particle Swarm Optimization
β”‚
β”œβ”€β”€ goel-website/
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.js          # Vite 8 + Tailwind CSS v4
β”‚   └── src/
β”‚       β”œβ”€β”€ App.jsx             # Router (Home, About, 404)
β”‚       β”œβ”€β”€ main.jsx            # Entry point
β”‚       β”œβ”€β”€ api/client.js       # Axios API client
β”‚       β”œβ”€β”€ realtime/
β”‚       β”‚   └── RealtimeProvider.jsx  # Socket.io context provider
β”‚       β”œβ”€β”€ hooks/
β”‚       β”‚   └── useInView.js    # Intersection Observer + parallax
β”‚       β”œβ”€β”€ styles/
β”‚       β”‚   └── theme.js        # Design system (colors, cards, badges)
β”‚       β”œβ”€β”€ pages/
β”‚       β”‚   β”œβ”€β”€ Home.jsx        # Main dashboard (18 widgets)
β”‚       β”‚   β”œβ”€β”€ About.jsx       # Project overview & AI architecture
β”‚       β”‚   └── NotFound.jsx    # 404 with auto-redirect
β”‚       └── components/
β”‚           β”œβ”€β”€ StatsDashboard.jsx     # Live stat cards
β”‚           β”œβ”€β”€ RescueMap.jsx          # Leaflet map with zones
β”‚           β”œβ”€β”€ CountdownTimer.jsx     # 72-hour countdown
β”‚           β”œβ”€β”€ RescueProgress.jsx     # Operation progress bars
β”‚           β”œβ”€β”€ SurvivorPanel.jsx      # Survivor detail cards
β”‚           β”œβ”€β”€ RouteOptimizer.jsx     # PSO team assignment
β”‚           β”œβ”€β”€ ThermalUploader.jsx    # CNN image upload
β”‚           β”œβ”€β”€ EarthquakeFeed.jsx     # USGS live feed
β”‚           β”œβ”€β”€ SeismicChart.jsx       # P/S-wave waveform
β”‚           β”œβ”€β”€ FuzzyTester.jsx        # Interactive fuzzy demo
β”‚           β”œβ”€β”€ FuzzyZoneCard.jsx      # Zone classification cards
β”‚           β”œβ”€β”€ CNNConfidenceChart.jsx  # Bar chart per survivor
β”‚           β”œβ”€β”€ ANNPredictor.jsx       # Survival probability calc
β”‚           β”œβ”€β”€ PSOVisualizer.jsx      # Canvas swarm animation
β”‚           β”œβ”€β”€ AlgorithmFlowchart.jsx # Expandable pipeline cards
β”‚           β”œβ”€β”€ SurvivorTimeline.jsx   # Operation event log
β”‚           β”œβ”€β”€ ExportReport.jsx       # PDF report generator
β”‚           β”œβ”€β”€ DemoMode.jsx           # Auto-scroll guided tour
β”‚           └── ConnectionStatus.jsx   # WebSocket status indicator
β”‚
β”œβ”€β”€ assets/                     # Screenshots for README
β”œβ”€β”€ .github/workflows/
β”‚   └── deploy.yml              # GitHub Pages CI/CD
└── README.md

Getting Started

Prerequisites

  • Node.js β‰₯ 18
  • Python β‰₯ 3.9
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/jeswinbenedict/Goel-AI.git
cd Goel-AI

Backend

cd backend
pip install -r requirements.txt
python app.py
# Server starts on http://localhost:5000

Frontend

cd goel-website
npm install
npm run dev
# App opens at http://localhost:5174

Note: The frontend works independently even if the backend is down. All components gracefully fall back to local simulation data and static defaults.

Production Build

cd goel-website
npm run build        # Output in dist/
npm run preview      # Preview production build

Deploy to GitHub Pages

cd goel-website
npm run deploy       # Builds and pushes to gh-pages branch

Tech Stack

Category Technologies
Frontend React 19, Vite 8, Tailwind CSS v4, Recharts, Leaflet, Framer Motion, Lucide Icons
Real-Time Socket.io (client + server), Flask-SocketIO, eventlet
AI / ML scikit-fuzzy (Mamdani FIS), PSO (custom), CNN/ANN (simulated)
Backend Python Flask, NumPy, SciPy, NetworkX, Requests
Data Sources USGS Earthquake API, OpenStreetMap
Export jsPDF (client-side PDF generation)
Deployment GitHub Pages (frontend), Render/Gunicorn (backend)
CI/CD GitHub Actions

Demo Mode

The app includes a built-in Demo Tour β€” a floating control bar at the bottom of the screen that automatically scrolls through all 10 dashboard sections with a progress indicator, section labels, and manual navigation controls. Click β–Ά to start.


License

MIT β€” Use it. Improve it. Deploy it. Save lives.


The first 18 minutes determine whether people are found. The next 54 hours determine whether they survive. GOEL exists to win both.

Built by Jeswin Benedict

About

Modern Map UI built with Tailwind CSS, custom animations, scan line effects, and Leaflet map styling. Includes gradient text, smooth transitions, and responsive design.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages