How stpanirudh/ai-based-detection-and-classification-of-industrial-fires-and-persistent-thermal-sources works
This prototype turns FIRMS-format thermal observations and facility records into contextualized, classified, persistence-scored, and risk-ranked events, then serves them through a GIS dashboard. The main runtime path is CSV ingestion and cleaning, proximity enrichment, spatial persistence analysis, ML inference, risk scoring, and API delivery. The dashboard also supports filtering, event inspection, and ad hoc prediction; OSM lookup is an optional integration. Pipeline ordering and module calls are supported by sampled source; some dashboard and API details rely on README documentation and partial excerpts.
Main entry points: pipeline.py Pipeline Runner · api.py REST API · app.js Dashboard Logic · ingestion.py Data Ingestion
Components 21
Event Processing
- Data Ingestion
src/ingestion.py - Data Cleaning
src/cleaning.py - Pipeline Runner
src/pipeline.py
Analysis Engines
- Proximity Context
src/geospatial.py - Persistence Analysis
src/persistence.py - ML Classifier
src/ml_classifier.py - Model Cache
data/baseline_random_forest.joblib - Risk Scoring
src/risk_engine.py
API Service
- REST API
src/api.py - In-memory Results
src/api.py
GIS Dashboard
- Dashboard Logic
static/app.js - Dashboard Page
static/index.html - Dashboard Styles
static/style.css
Other components
- User
- Demo Runner
run_demo.py - Hotspot CSV
data/demo_firms_hotspots.csv - Facility CSV
data/demo_industrial_facilities.csv - Training CSV
data/demo_ml_training_data.csv - OSM Overpass
- Web Browser
- Map Tile Providers
Connections 26
- User → Demo Runner: starts
- Demo Runner → Pipeline Runner: runs
- Demo Runner → REST API: starts server
- Pipeline Runner → Data Ingestion: loads data
- Hotspot CSV → Data Ingestion: hotspot records
- Facility CSV → Data Ingestion: facility records
- Data Ingestion → Data Cleaning: cleans hotspots
- Pipeline Runner → Proximity Context: enriches proximity
- Data Ingestion → Pipeline Runner: returns datasets
- Pipeline Runner → Persistence Analysis: groups events
- Pipeline Runner → ML Classifier: classifies events
- Training CSV → ML Classifier: training records
- ML Classifier → Model Cache: loads or saves
- Pipeline Runner → Risk Scoring: scores events
- Proximity Context → OSM Overpass: optional lookup
- REST API → Pipeline Runner: runs at startup
- REST API → In-memory Results: stores results
- REST API → In-memory Results: reads results
- Web Browser → Dashboard Page: requests page
- Dashboard Page → Dashboard Logic: loads script
- Dashboard Page → Dashboard Styles: loads styles
- Dashboard Logic → REST API: fetches events
- Dashboard Logic → REST API: fetches facilities
- Dashboard Logic → REST API: requests prediction
- Dashboard Logic → Map Tile Providers: requests tiles
- REST API → Web Browser: returns data