AI fire-risk prediction
Classifies incoming readings as safe or fire risk using a trained Random Forest model.
University of Bahrain Senior Project
An AI-based smart fire detection and management system that predicts fire risk from sensor data, reduces false alarms, and guides emergency response across multiple building zones.
Project introduction
Traditional fire alarms depend on fixed thresholds, so harmless changes like steam, dust, or humidity can trigger unnecessary evacuations. PyroSense uses machine learning to analyze multiple environmental readings together and return a probability-based fire risk result. The system turns that result into clear operational actions for building managers.
Features
Classifies incoming readings as safe or fire risk using a trained Random Forest model.
Shows class probabilities and confidence instead of only producing a binary alarm.
Lets building managers monitor floors, rooms, sensor IDs, exits, and affected zones from one interface.
Captures incident details, sensor readings, timestamps, predictions, and triggered actions for audit use.
How it works
PyroSense receives temperature, humidity, pressure, eCO2, raw ethanol, and raw H2 readings.
The FastAPI backend sends the six features to the trained machine learning model.
The model returns safe/fire probabilities, confidence, and a classification label.
The dashboard maps the result to Monitor, Warn, Act, or Contain decisions for each zone.
Decision hierarchy
Track early abnormal readings while the model still classifies the zone as safe.
Notify supervisors, inspect the zone, and prepare evacuation if warning probability rises.
Evacuate affected zones, activate suppression support, and notify emergency teams.
Escalate to a multi-zone incident when fire risk spreads across adjacent zones.
Dashboard
The interface highlights active floors, risk level, sensor readings, affected rooms, confidence scores, evacuation routes, and incident actions in a format that non-technical building managers can understand quickly during an emergency.
Evacuate Zone A and isolate HVAC on the affected floor.
Technology
TypeScript and Vite render the interactive monitoring dashboard, floor map, analytics, and reports.
Python FastAPI exposes simulation and prediction endpoints for the web dashboard.
Scikit-learn trains Random Forest, Decision Tree, and KNN models, then saves the best model with joblib.
The model is trained on a Kaggle fire detection sensor dataset with labeled safe and fire readings.
Evaluation
PyroSense achieved 99.27% accuracy on the held-out test set, with near-perfect precision and recall for safe and fire classes. The project also benchmarks PyroSense against traditional threshold-based systems, SVM approaches, CNN fire detection, and commercial alarm platforms.
Future work