Comming Soon! |
FP-AI-MONITOR1 runs learning and inference sessions in real-time on SensorTile Wireless Industrial Node development kit (STEVAL-STWINKT1B), taking data from onboard sensors as input. FP-AI-MONITOR1 implements a wired interactive CLI to configure the node.
The article discusses the following topics:
- Pre-requisites and setup,
- Presentation of Human Activity Recognition (HAR) application,
- Integrating a new HAR model,
- Check the new (HAR) model with FP-AI-MONITOR1,
This article explains the very few steps needed to replace the existing HAR AI Model with a completely different one.
For completeness, readers are invited to refer to FP-AI-MONITOR1 User Manual.
1. Prerequisites and setup
1.1. Hardware
To use the FP-AI-MONITOR1 function pack on STEVAL-STWINKT1B, the following hardware items are required:
- STEVAL-STWINKT1B development kit board,
- Windows® powered laptop/PC (Windows® 7, 8, or 10),
- Two Micro-USB cables, one to connect the sensor-board to the PC, and another one for the STLINK-V3MINI, and
- an STLINK-V3MINI.
1.2. Software
1.2.1. FP-AI-MONITOR1
Download the FP-AI-MONITOR1 package from ST website, extract and copy the contents of the .zip file into a folder on your PC. Once the pack is downloaded, unpack/unzip it and copy the content to a folder on the PC.
The steps of the process along with the content of the folder are shown in the following image.
1.2.2. IDE
- Install one of the following IDEs:
- STMicroelectronics STM32CubeIDE version 1.9.0,
- IAR Embedded Workbench for Arm (EWARM) toolchain version 9.20.1 or later, or
- RealView Microcontroller Development Kit (MDK-ARM) toolchain version 5.32.
1.2.3. TeraTerm
- TeraTerm is an open-source and freely available software terminal emulator, which is used to host the CLI of the FP-AI-MONITOR1 through a serial connection.
- Download and install the latest version available from TeraTerm.
2. Human Activity Recognition (HAR) application
The CLI application comes with a prebuilt Human Activity Recognition model. This functionality is started by typing the command:
$ start ai
Note that the provided HAR model is built with a dataset created using the IHM330DHCX_ACC sensor with ODR = 26, and FS = 4.
Running the $ start ai
command starts doing the inference on the accelerometer data and predicts the performed activity along with the confidence. The supported activities are:
- Stationary,
- Walking,
- Jogging, and
- Biking.
The following figure is a screenshot of the normal working session of the AI command in the CLI application.
3. Integrating a new HAR model
FP-AI-MONITOR1 thus provides a pre-integrated HAR model along with its preprocessing chain. This model is exemplary and by definition cannot fit the required performances or use case. It is proposed to show how this model can be easily be replaced by another that could differ in many ways :
- input sensor,
- window size,
- preprocessing,
- feature extraction step,
- topology,
- number of classes
It is assumed that a new model candidate is available and has been pre-integrated as described in user manual.
We will guide the reader through all the little modifications required for adapting the code to accommodate the new model in its specificities