Skip to content

sunnyiisc/Fire-Detection-from-FLAME-Dataset

Repository files navigation

Fire-Detection-from-FLAME-Dataset

Deep Learning model implementation for Fire detection both classification and segmentation from the FLAME dataset.

Introduction

There are two applications that can be defined based on the collected FLAME dataset along with Deep Learning solutions for these problems. The first problem is the fire versus no-fire classification using a deep neural network (DNN) approach. The second problem deals with fire segmentation, which can be used for fire detection by masking the identified fire regions on video frames classified as fire-containing in the first problem.

  • Theoritical Description of the model used click here

Training the Model

Run the following python code for training the models:

  • Classification Training (classification_training.py) click here
  • Segmentation Training (segmentation_training.py) click here

Evalutation, Prediction and Training Plots:

After training, run the following code to plot the dataset, evaluate the model, training metrices, model predictions.

  • Fire-vs-NoFire Classification (fire_classification.py) click here
  • Fire Segmentation (fire_segmentation.py) click here

Supporting Code Description

  • Fetching the dataset from the directory (dataset_fetching.py) click here
  • Plotting the dataset visualization, training metrices, model evalutation, model predication (data_plotting.py) click here

Directory Structure of the Dataset

The downloaded dataset should be put into the folder structure as shown below:

Screenshot 2022-07-11 at 22 56 22

Dataset Visualization

Classification Dataset with Labels:

fire_classification_data_visualization

Segmentation Dataset with Mask (ground truth):

fire_segmentation_data_visualization

Training of the model (Metrices vs Epochs)

  • Classification Training:

fire_classification_training

  • Segmentation Training:

fire_segmentation_training

Model Evaluation and Prediction

  • Classification Tasks Confusion Matrix:

confusion_matrix

  • Segmentation Task Predicted Masks:

fire_segmentation_prediction1 fire_segmentation_prediction