Link Search Menu Expand Document

Fire Classification

  1. Overview
  2. Fire Classification
    1. Inference Engine and Algorithm
    2. Running Fire Classification
      1. Using Images for Inference
        1. Default Image
        2. Custom Image
      2. Using Video Source for Inference
        1. Video File
        2. Video Camera or Webcam
    3. Extra Parameters
  3. References

Overview

Fire classification and detection has recently played a crucial role in reducing fire losses by alarming users early through early fire detection. Image fire detection is based on an algorithmic analysis of images. However, there is a lower accuracy, delayed detection, and a large amount of computation in common detection algorithms, including manually and machine automatically extracting image features 1 .

Fire Classification

Inference Engine and Algorithm

tfliteframework armnnframework

This demo uses:

  • TensorFlow Lite as an inference engine 2 ;
  • ArmNN as an inference engine 3 ;
  • CNN as default algorithm 4 .

More details on eIQ™ page.

Running Fire Classification

Using Images for Inference

Default Image
  • TensorFlow Lite
  1. Run the Fire Classification demo using the following line:
    # pyeiq --run fire_classification_tflite
    
  • Arm NN
  1. Run the Fire Classification demo using the following line:
    # pyeiq --run fire_classification_armnn
    
  • This runs inference on a default image: image_fire_classification
Custom Image
  • TensorFlow Lite
  1. Pass any image as an argument:
    # pyeiq --run fire_classification_tflite --image=/path_to_the_image
    
  • Arm NN
  1. Pass any image as an argument:
    # pyeiq --run fire_classification_armnn --image=/path_to_the_image
    

Using Video Source for Inference

Video File
  • TensorFlow Lite
  1. Run the Fire Classification using the following line:
    # pyeiq --run fire_classification_tflite --video_src=/path_to_the_video
    
  • Arm NN
  1. Run the Fire Classification using the following line:
    # pyeiq --run fire_classification_armnn --video_src=/path_to_the_video
    
Video Camera or Webcam
  • TensorFlow Lite
  1. Specify the camera device:
    # pyeiq --run fire_classification_tflite --video_src=/dev/video<index>
    
  • Arm NN
  1. Specify the camera device:
    # pyeiq --run fire_classification_armnn --video_src=/dev/video<index>
    
  • This runs inference on a video camera: video_fire_classification

Extra Parameters

  • TensorFlow Lite
  1. Use –help argument to check all the available configurations:
    # pyeiq --run fire_classification_tflite --help
    
  • Arm NN
  1. Use –help argument to check all the available configurations:
    # pyeiq --run fire_classification_armnn --help
    

References

  1. https://doi.org/10.1016/j.csite.2020.100625 

  2. https://www.tensorflow.org/lite 

  3. https://github.com/ARM-software/armnn 

  4. https://en.wikipedia.org/wiki/Convolutional_neural_network