/Fire-and-Smoke-detection

Research Internship project under Assistant Prof. Manish Bhatt of IIT, Guwahati

Primary LanguageJupyter Notebook

🔥Fire-and-Smoke🌫️

Fire and Smoke Detection ⛑️ using AI and ML

This project aims to develop a model that can automatically detect fire and smoke in images and videos using artificial intelligence and machine learning techniques. The project is supervised by Assistant Professor Manish Bhatt of IIT Guwahati.

Motivation

Fire and smoke are common hazards that can cause severe damage to life and property. Early detection of fire and smoke can help in preventing or mitigating the consequences of such disasters. However, traditional fire and smoke detection methods, such as sensors and alarms, may not be effective in some scenarios, such as outdoor environments, large areas, or complex scenes. Therefore, there is a need for a system that can use the power of computer vision and deep learning to analyze visual data and identify fire and smoke events in real time.

Objectives

The main objectives of this project are:
  • To collect and annotate a large-scale dataset of fire and smoke images and videos from various sources and scenarios.
  • To design and implement a deep neural network model that can accurately classify fire and smoke in random images and videos.
  • To evaluate the performance of the model on various metrics, such as Precision, Recall, Mean Average Precision, F1 score, Confidence etc. and curves formed using these parameters
  • To provide real-time fire and smoke detection from camera feeds or user uploads.

Methodology

The methodology of this project consists of the following steps:
1️⃣Data collection:
We collected fire and smoke images and videos from IndianAI.gov and Roboflow public datasets.
2️⃣Data annotation:
We manually labelled the collected data (fire, smoke and firefighters) using bounding boxes (for localization) with the help of tools such as Makesense.ai to facilitate the annotation process.
3️⃣Data preprocessing:
We performed data augmentation techniques, such as cropping, resizing, flipping, rotating, etc., to increase the diversity and robustness of the data. We also normalized the data to have zero mean and unit variance.
4️⃣Model development:
We designed and implemented a deep neural network model that can perform fire and smoke detection in images and videos. We used frameworks such as TensorFlow or PyTorch to build the model. We explored different architectures, such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), or attention mechanisms, to achieve the best results.
5️⃣Model training:
We trained the model on the preprocessed data using a suitable loss function, such as binary cross-entropy or mean squared error. We will use optimization algorithms, such as stochastic gradient descent (SGD) or Adam, to update the model parameters. We will also use regularization techniques, such as dropout or batch normalization, to prevent overfitting.
6️⃣Model evaluation:
We evaluated the model's performance on a separate test set using various metrics, such as accuracy, precision, recall, F1-score, etc. We also compared the model with other various models to demonstrate its effectiveness.

Results

link of the videos
YOLO v5 YOLO v8

Challenges

The initial challenge we encountered was selecting the most appropriate model for small base object detection models using around <500 images as a dataset, which we discovered to be YOLO as the best among the open source models.
Subsequently, we experienced many false detections and inaccurate results, which we attempted to minimize by creating more refined labels. After successfully training the model on Fire and Smoke we decided to add new labels such as Fire Alarm, Fire Exit, Fire Extinguishers, FireMen, etc. in the model, but the False detection of the video increased dramatically.
We tried to train the model individually on these new labels and figured that the Fire Extinguisher dataset caused the problem until we removed it from the dataset.

References

The list of all the references used for this project is as follows:
For Raw images
For Final Dataset
Google Collab
MATLAB code