Building Siren Detection machine learning model

This tutorial covers end-to-end information on how to build, train, and evaluate a siren detection machine learning model using Imagimob Studio and Infineon board.

Objective

We will build a siren detection machine learning model that recognize the siren sounds from the emergency vehicles. This can be used to alert pedestrians to emergency vehicles in their vicinity, or to trigger other safety features in wearables.

Prerequisites

Before starting this tutorial, ensure you meet the following requirements:

  • Select the Infineon Board

    Choose the board on which you want to run the siren detection machine learning model. You can select from the following options:

    • TRAVEO™ T2G
      • TRAVEO™ T2G Body Entry Lite Kit (KIT_T2G-B-E_LITE)
      • TRAVEO™ T2G Body High Lite Kit (KIT_T2G-B-H-LITE)
    • AURIX™ TC375 Lite Kit
    • PSoC™ 6 and PSOC™ Edge boards

  • Flash Imagimob Streaming Firmware

    If you want to collect the data using the PSoC™ 6 board, you must flash the the board with Imagimob Streaming Firmware. Refer to Getting started with Infineon PSoC™6 Wi-Fi BT Pioneer Kit and IoT sense expansion kit for detailed instructions.

    If you want to collect data using other development boards, refer to Imagimob Streaming Protocol Specification (opens in a new tab) for detailed instructions.

    However, if you do not want to collect data using the board and prefer to use your own data, refer to Bring your own data for detailed instructions.

ℹ️

We offer Imagimob Streaming Firmware for PSoC™ 6 boards, simplifying data collection. For other boards, we provide Imagimob Streaming Protocol (opens in a new tab), allowing you to integrate the necessary sensors and develop custom firmware for data collection.

  • Register an account and Install Imagimob Studio

    Imagimob Studio is a development platform that streamlines the different stages of a machine learning project, such as, collecting, labeling and importing data, preprocessing data, designing and training models, and model evaluation. Create an Imagimob account to download and install Studio. For detailed instructions, refer to Download and Install Imagimob Studio.

  • Siren Detection Stater Project

    We will use the siren detection starter project as a starting point to understand the machine learning flow in detail. Begin with creating a project in Studio and select Classification> Infineon> Siren Detection as the project type. To know how to create a project, refer to Creating a project.

💡

It is recommended that an empty project is started after going through the starter projects and the ML flow is understood.

After setting up everything, you can start building the siren detection machine learning model following the step-by-step instructions from the tutorial. The tutorial covers end-to-end machine learning stages from the data collection to deploying the generated model.

Let's start building the model

We will cover the following machine learning development flow:

  • Data Preparation: The first step is to collect and label data from sensors using Serial Capture in Graph UX and Infineon board. After collecting and labeling data, we will import data into the Siren Starter project followed by distributing the data into the different datasets.

  • Preprocessing: The second main step is preprocessing where the data signal processing techniques are applied to the sensor data, such as windowing and filtering techniques to reduce the noise and extract the features of the sensors data.

  • Model Training: After preprocessing, the data is passed to the model for training. In this step, we will generate, train and evaluate the model to find the best fitting siren detection model.

  • Code Generation and Model Deployment: The last step is to generate the code and deploy the model on the board. After evaluating the model, we will generate the C code for the selected model in Imagimob Studio and then deploy the model on the Infineon board using ModusToolbox™ or Aurix™ Development Studio.