Data collection and annotation is often a tedious and time consuming task to get satisfying image classification results. The transfer learning technique enables to overcome this challenge by reducing the number of images and the training time needed to add a new class. It is applied here to fire detection in the wild, detecting if there is a fire or no fire but can apply to many other situations. 

Approach

  • The tutorial presents how to use a technique called "Transfer learning" to quickly train a deep learning model to classify images.
  • The tutorial is based on the computer vision function pack FP-AI-VISION1

Sensor

Vision: Camera module bundle (reference: STM32H747I-D + B-CAMS-OMV)

Data

Dataset Dataset for forest fire detection (License CC BY 4.0) 
Data format
2 classes: fire and no fire
RGB image 250x250x3 

Results

Model MobileNetV2 alpha 0.35 
Input size: 128x128x3
Memory footprint:
403 KB Flash for weights
225 KBRAM for activations
Accuracy:
Float model: 98% 
Quantized model: 98% 
Performance on STM32H747 (High-perf) @ 400 MHz 
Inference time: 112 ms
Frame rate:  8.9 fps

RESULTS-MNv2_Fire_Training RESULTS-MNv2_Fire_Training RESULTS-MNv2_Fire_Training
use-case-stm32-cube-ai-confusion-matrix-fire-detection use-case-stm32-cube-ai-confusion-matrix-fire-detection use-case-stm32-cube-ai-confusion-matrix-fire-detection
Optimized with
STM32Cube.AI
STM32Cube.AI
Compatible with
STM32H7 series
STM32H7 series

Resources

Optimized with STM32Cube.AI

A free STM32Cube expansion package, X-CUBE-AI allows developers to convert pretrained AI algorithms automatically, such as neural network and machine learning models, into optimized C code for STM32.

STM32Cube.AI STM32Cube.AI STM32Cube.AI

Compatible with STM32H7 series

The STM32 family of 32-bit microcontrollers based on the Arm Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers products combining very high performance, real-time capabilities, digital signal processing, low-power / low-voltage operation, and connectivity, while maintaining full integration and ease of development.

STM32H7 series STM32H7 series STM32H7 series
You might also be interested by

Vision | STM32 AI MCU | Video | Industrial | Microphone | Customer | Agriculture

How to make every seed count when planting crops

ROJ's Vision4Seeding brings edge AI to precision planting: an STM32N6 detects seed skips and doubles on every row in real time, with no cloud.

Vision | STM32 AI MCU | Partner | Video | Industrial | STM32Cube AI Studio | Microphone | Appliances

How edge AI is redefining clear speech in a noisy world

Real-time audio denoising on STM32N6 with no DSP, delivering low-latency clean speech in noisy environments using edge AI.

Vision | STM32 AI MCU | Partner | Video | Smart city | Industrial | Smart home | STM32Cube AI Studio

People counting and tracking in retail environments

embedUR delivers real-time person segmentation on STM32N6 using YOLACT, achieving on-device people counting at 14 FPS with no cloud dependency.