As the Consumer Electronics Show (CES) 2019 is about to open its doors in a few days, we are launching STM32Cube.AI, the industry’s most advanced toolkit capable of interoperating with popular deep learning libraries to convert any artificial neural network for STM32 microcontrollers (MCU) to run optimized inferences. The software suite comprises the X-Cube expansion software X-CUBE-AI, the Function Pack FP-AI-SENSING1 that provides application examples for our SensorTile development kit (STEVAL-STLKT01V1), and updates to our ST BLE Sensor application for iOS and Android that offer a GUI and controls for the Function Pack’s demos. Releasing just these solutions would already be a groundbreaking announcement as there are no tools currently rivaling this feature set. However, STM32Cube.AI is much more than a simple toolkit, but the reflection of our desire to change the IoT landscape by bringing neural networks to all STM32 developers.
As a result, we are also announcing the release of video tutorials, a unique STM32 Community specializing in machine learning, as well as ST Partners that can offer expertise, tools, and services to help companies take part in this AI revolution. Indeed, people who tend to specialize in the types of embedded systems that use our STM32 MCUs may not be familiar with the latest advances in neural networks. Similarly, data scientists working on machine learning with nearly unlimited cloud resources may be strangers to the memory and computational constraints of embedded platforms. STM32Cube.AI thus bridges the gap by demystifying artificial intelligence and embedded systems. We show that experts and tools are readily available and that it is easy to leverage the increasing popularity of edge computing to run inferences on our platforms. In other words, STM32Cube.AI proves that neural networks on embedded systems are already here.
STM32Cube.AI Brings Data Science to Embedded System Experts
The foundational piece of the STM32Cube.AI kit is X-CUBE-AI, which serves as an expansion pack to the STM32CubeMX code generator. People unfamiliar with our ecosystem will enjoy our step-by-step guide explaining how to use it to configure the pin-outs and clock trees of their microcontroller, among others, and generate the header files that will jump-start their application. X-CUBE-AI significantly extends the feature-set of STM32CubeMX by enabling it to import an artificial neural network trained by some of the most popular libraries today, such as Keras, TensorFlow, Caffe, Lasagne, or ConvnetJS. Through X-CUBE-AI, STM32CubeMX will map a neural network on an STM32 MCU and optimize the resulting library by, for example, folding some of its layers and reducing its memory footprint. The code generator will then produce a library that developers can use in the application.
If professionals or even enthusiasts want to start rapidly experimenting with our STM32Cube.AI initiative, they can use the Function Pack FP-AI-SENSING1, which includes two application examples that make great use of our SensorTile development kit. One of them uses the onboard microphones to capture audio, pre-processes the signal, and then uses inference to determine if a sound comes from indoor, outdoor, or from the inside of a vehicle.
Similarly, the other example program tracks motion to determine if the user is stationary, walking, running, biking or driving. We already compiled the binaries so users can start using these applications by just dragging and dropping a file onto their system to load the demos. We also offer Hardware Abstraction Layers, drivers, and source codes, among others, so developers can learn from our implementations and start writing their test software.
Differentiating Neural Networks and Decision Trees
Both X-CUBE-AI and FP-AI-SENSING1 can offer neural networks thanks to years of research into the implementation of deep learning systems on IoT platforms. However, today’s announcement is highly symbolic because STM32Cube.AI combines all these papers and findings in a solution that widens the scope of what was previously possible by allowing the conversion of a large number of topologies onto our platforms for many different applications.
While the new tools implement an artificial neural network, we want to distinguish the fact that we also bring machine learning capabilities to a motion sensor that has scarcer resources by using a decision tree. Machine learning, in its broadest sense, uses mathematical models to process data and estimate the best result or decision. A decision tree is a classifier model in machine learning that repeatedly parses the feature-space into a series of pathways (branches) and runs through them until the system reaches an endpoint (a leaf), which represents a class or decision. In 2019, our inertial sensor LSM6DSOX will use a decision tree to offer machine learning capabilities because it’s a great way to provide new low-power features that process data from one or two sensing elements without the help of a microcontroller.
Contrary to a decision tree, a neural network isn’t an algorithm parsing the feature-space with if-then-else statements, but a framework connecting units (neurons) that get different weights as the system learns by example. Applications can then use the resulting model to infer and estimate the most appropriate response. The decision-making process within the neural network is not as evident and it could require, in some use cases, more resources than a decision tree, but it can process a much larger stream of data to offer more accurate results in a wider variety of applications.
STM32Cube.AI Brings Embedded Systems to Data Scientists
The performance and accuracy of an application that relies on a neural network comes from the right analysis of the type and quality of the data that must be collected and is tightly coupled with the selection of the appropriate network topology. This is even truer when we talk about deeply embedded solutions. As a result, we ensured that our Partner Program would include companies that can bring the necessary expertise to guide our customers in this process.
Some members of our program master a specific field of study, like Lenord+Bauer that focuses on motion sensors and showed how our platform and artificial intelligence can lead to predictive maintenance on train tracks. Others, like SIANA Systems, offer a more extensive experience for medical, industrial, home automation, and wearable applications. Regardless, these partners will enable STM32 developers to move out of the limitations of our application examples and train neural network models to a level compatible with new commercial products.
STM32Cube.AI Brings Embedded Systems to Topology Experts
Our partners will also assist companies in choosing the right topology. A topology is a representation of the interconnections between the neurons of a network that shows how they interact with the input, influence one another, and get to one or more outputs. The simplest topology (the Multi-Layer Perceptron) adds multiple inputs and offers an output with a full range of connections, while a more common topology today, such as a Convolutional Neural Networks, uses a series of inputs interconnected to a set of heterogeneous filtering neurons that offer an increasingly probable output. Today, data scientists continue to improve and optimize these topologies, but the basic principles remain the same.
For instance, audio applications traditionally used a Gated Recurrent Unit (GRU) that relies on neurons that have a memory capable of recalling previous information. However, today, experts tend to prefer a Long/Short Term Memory Topology (LSTM) that is more powerful in exploiting long-term temporal information at the price of more memory and computation.
STM32Cube.AI: What to Expect in 2019?
The beauty of the STM32Cube.AI toolbox is that it enables developers to start using a neural network right away, even if they aren’t experts in data mining and topologies. Furthermore, these solutions help them improve their productivity since they no longer need to code time-consuming libraries as STM32CubeMX just generates them. Indeed, the Function Pack uses application examples to help engineers and enthusiasts experiment with our solutions in minutes, and we will be putting these application examples in the hands of more customers in the first quarter of 2019 as we bring the demos of the FP-AI-SENSING1 to the B-L475E-IOT01A Discovery IoT Node. Our initiative will thus continue to receive updates to make it easier to use and available to more developers.
We will also ensure that STM32CubeMX can convert pre-trained artificial neural networks on even more MCUs. The code generator includes a selection tool that analyzes the complexity of the network to recommend an STM32 with the right amount of computational throughput and memory. Today, X-CUBE-AI can only convert networks to microcontrollers that have a floating point unit, which means that it demands a model with at least a Cortex M4. However, we are working on updating our tools to support fixed-point implementation, which will end up bringing neural networks to even lower-power systems or accelerate inference on our more powerful microcontrollers. Similarly, we will progressively add support for other AI frameworks to make the STM32Cube.AI toolkit even more comprehensive.
How to Get Started?
- Learn more about the STM32Cube.AI Initiative
- Check out X-CUBE-AI
- Download FP-AI-SENSING1
- Test our ST BLE Sensor mobile app
- Watch the video tutorials
- Visit the STM32 Community specializing in machine learning
- Contact the ST Partners focusing on AI