This project aims to detect and monitor fire incidents by training a deep learning model to classify fire and smoke images.
if you are interested in running the project on your device, make sure to install all the dependencies. You can write the command below to install it all:
pip install -r requirements.txt
This project used Fire-Smoke-Dataset which contains 3 classes (i.e., Fire, Smoke, Neutral) with the same proportion of each class (balanced dataset.)
- Data Partitioning: splits the dataset into train/val/test folders in the
Data Preparation.ipynb
notebook. - Data Preprocessing: resize, rescale, and augment the dataset in the
code.ipynb
notebook.
The models used in this experiment were:
- CNN model from scratch.
- EfficientNetv2 model.
Precision | Recall | F1-Score | Overall Accuracy | |
---|---|---|---|---|
Fire | 0.88 | 0.83 | 0.86 | 0.74 |
Neutral | 0.59 | 0.87 | 0.70 | - |
Smoke | 0.88 | 0.52 | 0.65 | - |
Precision | Recall | F1-Score | Overall Accuracy | |
---|---|---|---|---|
Fire | 0.97 | 0.92 | 0.94 | 0.9633 |
Neutral | 0.99 | 0.99 | 0.99 | - |
Smoke | 0.93 | 0.98 | 0.96 | - |
To deploy our model, we used Gradio library to build an interface and host it on HuggingFace.
You can check Fire-Smoke-Detector