https://github.com/bevinaa/forest-fire-detection-system
An IoT-enabled Forest Fire Detection System that uses NodeMCU, environmental sensors, Flutter mobile app, and an XGBoost ML model to monitor and predict fire risks in real-time.
https://github.com/bevinaa/forest-fire-detection-system
dht11-sensor flask-api flutter iot machine-learning mq2-sensor mysql-database nodemcu python
Last synced: 4 months ago
JSON representation
An IoT-enabled Forest Fire Detection System that uses NodeMCU, environmental sensors, Flutter mobile app, and an XGBoost ML model to monitor and predict fire risks in real-time.
- Host: GitHub
- URL: https://github.com/bevinaa/forest-fire-detection-system
- Owner: Bevinaa
- Created: 2025-07-06T13:16:24.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T11:43:48.000Z (11 months ago)
- Last Synced: 2025-10-29T09:54:37.660Z (8 months ago)
- Topics: dht11-sensor, flask-api, flutter, iot, machine-learning, mq2-sensor, mysql-database, nodemcu, python
- Language: Dart
- Homepage:
- Size: 5.33 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Forest Fire Detection System**


## **Overview**
This repository contains an **IoT-enabled Forest Fire Detection System** designed to monitor environmental conditions and predict fire risk in real time. It includes a **Flutter-based mobile application**, sensor data fetching using **NodeMCU**, and a basic **machine learning model - xgboost** for fire prediction.
The system monitors temperature, humidity, and smoke levels, and visualizes the data in a user-friendly mobile interface.
---
## **Key Features**
- **Real-Time Monitoring**: Tracks temperature, humidity, and smoke levels from sensors.
- **Mobile Dashboard**: Flutter app displays live data and predictions in a clean UI.
- **ML-Based Prediction**: XGBoost model trained to classify whether sensor readings indicate fire.
- **IoT Integration**: NodeMCU fetches and transmits data using Wi-Fi.
- **Database Storage**: Sensor values and predictions are stored in a MySQL database.
- **Resident Alert System**: Button in the app to notify nearby residents with safety instructions.
- **Expandable**: Future integration with AR/VR fire spread simulations and remote server dashboards.
---
## **Technologies Used**
- **Flutter**: For the mobile UI.
- **NodeMCU**: For data collection from DHT11, MQ-2 sensors, etc.
- **Python & jupyter**: For training and running the ML model.
- **MySQL**: For storing and syncing sensor data.
- **C and Arduino IDE**: For programming microcontrollers.
---
## Tech Stack
| Technology | Purpose |
|--------------------|----------------------------------------------|
| **Flutter** | Mobile app for real-time monitoring |
| **NodeMCU** | IoT microcontroller for sensor interfacing |
| **MQ-2 Sensor** | Smoke detection |
| **DHT11 Sensor** | Temperature and humidity measurement |
| **Python** | Machine learning model development |
| **XGBoost** | ML model for fire risk classification |
| **MySQL** | Backend database |
| **C (Arduino IDE)**| Microcontroller programming |
---
## **Pre-requisites**
To run this project, ensure you have the following installed:
- **Flutter SDK** (latest version)
- **Python 3.7+**
- **Arduino IDE** (for NodeMCU)
- **Hardware**: DHT11, MQ-2, NodeMCU, Breadboard, Jumper wires
- **Database**: MySQL account for backend data storage
---
## How It Works
1. **Sensor Layer**
The DHT11 and MQ-2 sensors measure environmental conditions and transmit data via NodeMCU.
2. **Data Transmission**
NodeMCU sends sensor readings over Wi-Fi to a backend server (or directly to the mobile app via Firebase/MySQL).
3. **Prediction Engine**
The ML model (XGBoost) predicts fire risk using the incoming data.
4. **User Interface**
A Flutter-based mobile app displays:
- Live data (temperature, humidity, smoke)
- Fire prediction result
- Alert functionality for residents
---
## Machine Learning Details
- **Algorithm**: XGBoost Classifier
- **Input Features**: Temperature, Humidity, Smoke Levels
- **Training Dataset**: Custom collected sensor readings under fire and non-fire conditions
- **Accuracy**: ~96.4%
- **Evaluation Metrics**: Precision, Recall, F1-score, Confusion Matrix
> The model is lightweight and optimized for fast predictions on limited hardware setups.
---
| Installation and Setup |
|-----------------------------------|
|  |
---
| Demo of the Project |
|-----------------------------------|
| https://github.com/Bevinaa/Forest-Fire-Detection-System/demo.mp4 |
---
## Screenshots
| Mobile Application | Fire Prediction |
|------------------|-----------------|
|  |  |
---
| Analytics Dashboard |
|-----------------------------------|
|  |
| |
---
## Contact
Author: **Bevina R**
Email: bevina2110@gmail.com
GitHub: [Bevinaa](https://github.com/Bevinaa)
---