This repository contains a YOLOv5-based algorithm designed for the detection of fire and smoke. The models are trained with a dataset comprising over 4000 images of fire and smoke under various conditions and from different locations.
There are three models included in the \models
folder:
- Fire-only Detection Model: Specifically trained to detect fire.
- Fire and Smoke Detection Model A: Trained to detect both fire and smoke.
- Fire and Smoke Detection Model B: Another variant for detecting both fire and smoke.
- Fire-only Model: Accuracy - 91.1%
- Fire and Smoke Models:
- Model A: Accuracy for Fire - 91.1%, for Smoke - 75.1%
- Model B: Similar performance with slight variations (details in model descriptions).
Each model has been trained for 300 epochs.
The dataset includes a diverse collection of fire and smoke images under different lighting conditions and from various locations. This diversity helps in enhancing the detection accuracy in real-world scenarios.
The train.ipynb
notebook is provided for easy running and testing of the models in Google Colab.
- Open
train.ipynb
in Google Colab. - Ensure that the path to the model directory is correctly set.
- Follow the instructions in the notebook to load and test the models.
To run the models locally, follow these steps:
- Clone this repository.
- Install the necessary dependencies (listed below).
- Run the model using the provided scripts or the Jupyter notebook.
- Python 3.x
- PyTorch
- Other dependencies are listed in the
requirements.txt
file.
Contributions to improve the model or extend its capabilities are welcome. Please follow the standard pull request process.
This project is licensed under the MIT License.
Thanks to the contributors of the YOLOv5 project and the dataset providers.