Code Monkey home page Code Monkey logo

alirezashamsoshoara / fire-detection-uav-aerial-image-classification-segmentation-unmannedaerialvehicle Goto Github PK

View Code? Open in Web Editor NEW
145.0 3.0 45.0 24.38 MB

Aerial Imagery dataset for fire detection: classification and segmentation (Unmanned Aerial Vehicle (UAV))

Home Page: https://ieee-dataport.org/open-access/flame-dataset-aerial-imagery-pile-burn-detection-using-drones-uavs

License: GNU General Public License v2.0

Python 97.71% MATLAB 2.29%
fire uav imagery classification segmentation keras tensorflow dataset dnn

fire-detection-uav-aerial-image-classification-segmentation-unmannedaerialvehicle's Introduction

Aerial Imagery dataset for fire detection: classification and segmentation using Unmanned Aerial Vehicle (UAV)

Title

FLAME (Fire Luminosity Airborne-based Machine learning Evaluation) Dataset
Alt Text

Paper

You can find the article related to this code here at Elsevier or
You can find the preprint from the Arxiv website.

Dataset

  • The dataset is uploaded on IEEE dataport. You can find the dataset here at IEEE Dataport or DOI. IEEE account is free, so you can create an account and access the dataset files without any payment or subscription.

  • This table below shows all available data for the dataset.

  • This project uses items 7, 8, 9, and 10 from the dataset. Items 7 and 8 are being used for the "Fire_vs_NoFire" image classification. Items 9 and 10 are for the fire segmentation.

  • If you clone this repository on your local drive, please download item 7 from the dataset and unzip in directory /frames/Training/... for the Training phase of the "Fire_vs_NoFire" image classification. The direcotry looks like this:

Repository/frames/Training
                    ├── Fire/*.jpg
                    ├── No_Fire/*.jpg
  • For testing your trained model, please use item 8 and unzip it in direcotry /frame/Test/... . The direcotry looks like this:
Repository/frames/Test
                    ├── Fire/*.jpg
                    ├── No_Fire/*.jpg
  • Items 9 and 10 should be unzipped in these directories frames/Segmentation/Data/Image/... and frames/Segmentation/Data/Masks/... accordingly. The direcotry looks like this:
Repository/frames/Segmentation/Data
                                ├── Images/*.jpg
                                ├── Masks/*.png
  • Please remove other README files from those directories and make sure that only images are there.

Model

  • The binary fire classifcation model of this project is based on the Xception Network:

Alt text

  • The fire segmentation model of this project is based on the U-NET:

Alt text

Sample

  • A short sample video of the dataset is available on YouTube: Alt text

Requirements

  • os
  • re
  • cv2
  • copy
  • tqdm
  • scipy
  • pickle
  • numpy
  • random
  • itertools
  • Keras 2.4.0
  • scikit-image
  • Tensorflow 2.3.0
  • matplotlib.pyplot

Code

This code is run and tested on Python 3.6 on linux (Ubuntu 18.04) machine with no issues. There is a config.py file in this directoy which shows all the configuration parameters such as Mode, image target size, Epochs, batch size, train_validation ratio, etc. All dependency files are available in the root directory of this repository.

  • To run the training phase for the "Fire_vs_NoFire" image classification, change the mode value to 'Training' in the config.py file. Like This
Mode = 'Training'

Make sure that you have copied and unzipped the data in correct direcotry.

  • To run the test phase for the "Fire_vs_NoFire" image classification, change the mode value to 'Classification' in the config.py file. Change This
Mode = 'Classification'

Make sure that you have copied and unzipped the data in correct direcotry.

  • To run the test phase for the Fire segmentation, change the mode value to 'Classification' in the config.py file. Change This
Mode = 'Segmentation'

Make sure that you have copied and unzipped the data in correct direcotry.

Then after setting your parameters, just run the main.py file.

python main.py

Results

  • Fire classification accuracy:

Alt text

  • Fire classification Confusion Matrix:

  • Fire segmentation metrics and evaluation:

Alt text

  • Comparison between generated masks and grount truth mask:

Alt text

  • Federated Learning sample
    To consider future challenges, we defined a new sample of federated learning on a local node (NVidia Jetson Nano, 4GB RAM). Jetson Nano is available in two versions: 1) 4GB RAM developer kit, and 2) 2GB RAM developer kit. In this Implementation, the 4GB version is used with the technical specifications of a 128-core Maxwell GPU, a Quad-core ARM A57 @ 1.43 GHz CPU, 4GB LPDDR4 RAM, and a 32GB microSD storage. To test Jetson Nano for the federated learning, items (9) and (10) from Dataset are used for the fire segmentation. Since Jetson Nano has limited RAM, we assumed that each drone has access to a portion of the FLAME dataset. Only 500 fire images and masks are considered for the training and validation phase on the drone. As we aimed at learning a model on a smaller subset of the FLAME dataset and inferring that model, the default Tensorflow version is used here. Also, the image and mask dimension for each input is reduced to 128 x 128 x 3 rather than 512 x 512 x 3. To save more memory on the RAM, all peripherals were turned off and only WiFi was working at that time for the Secure Shell (SSH) connection. The setup of this node is:

Citation

If you find it useful, please cite our paper as follows:

@article{shamsoshoara2021aerial,
  title={Aerial Imagery Pile burn detection using Deep Learning: the FLAME dataset},
  author={Shamsoshoara, Alireza and Afghah, Fatemeh and Razi, Abolfazl and Zheng, Liming and Ful{\'e}, Peter Z and Blasch, Erik},
  journal={Computer Networks},
  pages={108001},
  year={2021},
  publisher={Elsevier}
}

Other related repositories and articles

License

For academtic and non-commercial usage

fire-detection-uav-aerial-image-classification-segmentation-unmannedaerialvehicle's People

Contributors

alirezashamsoshoara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fire-detection-uav-aerial-image-classification-segmentation-unmannedaerialvehicle's Issues

Test accuracy is not similar with the paper

Following are the results of my execution using your code (no modification in the hyperparameter and model):

model at 40 epoch,
(train) bin_accuracy: 0.9577
val_bin_accuracy: 0.9514
test_accuracy : 0.5724729895591736

model at 37 epoch (best model based on val set),
(train) bin_accuracy: 0.9568
val_bin_accuracy: 0.9820
test_accuracy : 0.6100730895996094
confusion matrix:
[[ 814. 2666.]
[ 694. 4443.]]

train and validation accuracy is actually similar enough, but the test accuracy is quite far from the paper.

Segmentation on Jeston Nano

Hi,
since I'm working on NVIDIA Jetson Nano developer kit, and it cannot perform the training of the model due to RAM limitations, is there any chance you can provide the trained model so I can run just the segmentation script? I tried so, but it isn't possible without the training process.
Thanks in advance.

labels and annotations

please where can i find the labels and annotations of images (training and test) for classification
thank you !

Mask file all is blank

Hello, Thank you for sharing your great dataset. When I downloaded dataset all Mask images were black here no masked imaged. Where I can find the masked images?

  • [
    image_1884
    ] all images is this kind

Erroneous IoU values

When I implemented your code and re-run it, I got different IoU values from the ones that you reported in the paper.
There is huge difference between these values i.e., you reported 78.17 IoU while I achieved 49.72 value of IoU.

Can you please confirm this?

Black Mask Files

The mask files given in the dataset are black images as corresponding to the input image data. Can you please upload the actual binary masks related to the input aerial images?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.