You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/Overview-1.md
+38-16Lines changed: 38 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,42 +6,64 @@ weight: 2
6
6
layout: learningpathall
7
7
---
8
8
9
-
TinyML represents a significant shift in machine learning deployment.
9
+
This Learning Path is about TinyML. It serves as a starting point for learning how cutting-edge AI technologies may be put on even the smallest of devices, making Edge AI more accessible and efficient. You will learn how to setup on your host machine and target device to facilitate compilation and ensure smooth integration across all devices.
10
10
11
-
Unlike traditional machine learning, which typically depends on cloud-based servers or high-powered hardware, TinyML is tailored to function on devices with limited resources, constrained memory, low power, and less processing capabilities.
11
+
In this section, you get an overview of the domain with real-life use-cases and available devices.
12
12
13
-
TinyML has gained popularity because it enables AI applications to operate in real-time, directly on the device, with minimal latency, enhanced privacy, and the ability to work offline.
13
+
## Overview
14
+
TinyML represents a significant shift in machine learning deployment. Unlike traditional machine learning, which typically depends on cloud-based servers or high-powered hardware, TinyML is tailored to function on devices with limited resources, constrained memory, low power, and less processing capabilities. TinyML has gained popularity because it enables AI applications to operate in real-time, directly on the device, with minimal latency, enhanced privacy, and the ability to work offline. This shift opens up new possibilities for creating smarter and more efficient embedded systems.
14
15
15
-
This shift opens up new possibilities for creating smarter and more efficient embedded systems.
16
+
### Benefits and applications
16
17
17
-
## Module Overview
18
+
The advantages of TinyML match up well with the Arm architecture, which is widely used in IoT, mobile devices, and edge AI deployments.
18
19
19
-
This Learning Path is about TinyML, applying machine learning to devices with limited resources like microcontrollers. It serves as a starting point for learning how cutting-edge AI technologies may be put on even the smallest of devices, making Edge AI more accessible and efficient.
20
+
Here are some key benefits of TinyMLon Arm:
20
21
21
-
You will learn how to setup on your host machine and target device to facilitate compilation and ensure smooth integration across all devices.
22
22
23
-
## Examples of Arm-based devices and applications
23
+
-**Power Efficiency**: TinyML models are designed to be extremely power-efficient, making them ideal for battery-operated devices like sensors, wearables, and drones.
24
24
25
-
There are many devices you can use for TinyML projects. Some of them are listed below.
25
+
-**Low Latency**: Because the AI processing happens on-device, there's no need to send data to the cloud, reducing latency and enabling real-time decision-making.
26
26
27
-
### Raspberry Pi 4 and 5
27
+
-**Data Privacy**: With on-device computation, sensitive data remains local, providing enhanced privacy and security. This is particularly crucial in healthcare and personal devices.
28
+
29
+
-**Cost-Effective**: Arm devices, which are cost-effective and scalable, can now handle sophisticated machine learning tasks, reducing the need for expensive hardware or cloud services.
30
+
31
+
-**Scalability**: With billions of Arm devices in the market, TinyML is well-suited for scaling across industries, enabling widespread adoption of AI at the edge.
32
+
33
+
TinyML is being deployed across multiple industries, enhancing everyday experiences and enabling groundbreaking solutions. The table below contains a few examples of TinyML applications.
34
+
35
+
| Area | Device, Arm IP | Description |
36
+
| ------ | ------- | ------------ |
37
+
| Healthcare | Fitbit Charge 5, Cortex-M | Monitor vital signs such as heart rate, detect arrhythmias, and provide real-time feedback. |
38
+
| Agriculture | OpenAg, Cortex-M | Monitor soil moisture and optimize water usage. |
39
+
| Home automation | Arlo, Cortex-A | Detect objects and people, trigger alerts or actions while saving bandwidth and improving privacy. |
40
+
| Industrial IoT | Siemens, Cortex-A | Analyze vibration patterns in machinery to predict when maintenance is needed and prevent breakdowns. |
41
+
| Wildlife conservation | Conservation X, Cortex-M | Identify animal movements or detect poachers in remote areas without relying on external power sources. |
42
+
43
+
### Examples of Arm-based devices
44
+
45
+
There are many Arm-based off-the-shelf devices you can use for TinyML projects. Some of them are listed below, but the list is not exhaustive.
46
+
47
+
#### Raspberry Pi 4 and 5
28
48
29
49
Raspberry Pi single-board computers are excellent for prototyping TinyML projects. They are commonly used for prototyping machine learning projects at the edge, such as in object detection and voice recognition for home automation.
30
50
31
-
### NXP i.MX RT microcontrollers
51
+
####NXP i.MX RT microcontrollers
32
52
33
53
NXP i.MX RT microcontrollers are low-power microcontrollers that can handle complex TinyML tasks while maintaining energy efficiency, making them ideal for applications like wearable healthcare devices and environmental sensors.
34
54
35
-
### STM32 microcontrollers
55
+
####STM32 microcontrollers
36
56
37
57
STM32 microcontrollers are used in industrial IoT applications for predictive maintenance. These microcontrollers are energy-efficient and capable of running TinyML models for real-time anomaly detection in factory machinery.
38
58
39
-
### Arduino Nano 33 BLE Sense
59
+
####Arduino Nano 33 BLE Sense
40
60
41
61
The Arduino Nano, equipped with a suite of sensors, supports TinyML and is ideal for small-scale IoT applications, such as detecting environmental changes and movement patterns.
42
62
43
-
### Edge Impulse
63
+
#### Edge Impulse
64
+
65
+
In addition to hardware, there are software platforms that can help you build TinyML applications.
44
66
45
-
In addition to hardware, there are software platforms that can help you build TinyML applications.
67
+
Edge Impulse platform offers a suite of tools for developers to build and deploy TinyML applications on Arm-based devices. It supports devices like Raspberry Pi, Arduino, and STMicroelectronics boards.
46
68
47
-
Edge Impulse platform offers a suite of tools for developers to build and deploy TinyML applications on Arm-based devices. It supports devices like Raspberry Pi, Arduino, and STMicroelectronics boards.
69
+
Now that you have an overview of the subject, move on to the next section where you will set up an environment on your host machine.
Copy file name to clipboardExpand all lines: content/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/_index.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,22 @@ cascade:
7
7
8
8
minutes_to_complete: 40
9
9
10
-
who_is_this_for: This is an introductory topic for developers, engineers, and data scientists who are new to TinyML and interested in exploring its potential for edge AI. You will learn how to get started using PyTorch and ExecuTorch for TinyML.
10
+
who_is_this_for: This is an introductory topic for developers, engineers, and data scientists who are new to TinyML and interested in exploring its potential for edge AI. You will learn how to get started using PyTorch and ExecuTorch for TinyML.
11
11
12
-
learning_objectives:
13
-
- Identify TinyML and how it's different from the AI you might be used to.
12
+
learning_objectives:
13
+
- Identify how TinyML is different from other AI domains.
14
14
- Understand the benefits of deploying AI models on Arm-based edge devices.
15
15
- Select Arm-based devices for TinyML.
16
-
- Identify real-world use cases demonstrating the impact of TinyML.
17
16
- Install and configure a TinyML development environment.
18
-
- Set up a cross-compilation environment on your host machine.
19
17
- Perform best practices for ensuring optimal performance on constrained edge devices.
20
18
21
19
22
20
prerequisites:
23
21
- Basic knowledge of machine learning concepts.
24
-
- Understanding of IoT and embedded systems.
25
22
- A Linux host machine or VM running Ubuntu 22.04 or higher.
26
-
23
+
- A [Grove Vision AI Module](https://wiki.seeedstudio.com/Grove-Vision-AI-Module/) **or** an Arm license to run the Corstone-300 Fixed Virtual Platform (FVP).
Copy file name to clipboardExpand all lines: content/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/build-model-8.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,10 @@ weight: 7 # 1 is first, 2 is second, etc.
8
8
layout: "learningpathall"
9
9
---
10
10
11
-
With our Environment ready, you can create a simple program to test the setup.
11
+
TODO connect this part with the FVP/board?
12
+
With our environment ready, you can create a simple program to test the setup.
12
13
13
-
This example defines a small feedforward neural network for a classification task. The model consists of 2 linear layers with ReLU activation in between.
14
+
This example defines a small feedforward neural network for a classification task. The model consists of 2 linear layers with ReLU activation in between.
14
15
15
16
Use a text editor to create a file named `simple_nn.py` with the following code:
16
17
@@ -26,7 +27,7 @@ class SimpleNN(torch.nn.Module):
Copy file name to clipboardExpand all lines: content/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/env-setup-5.md
+23-87Lines changed: 23 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,127 +2,63 @@
2
2
# User change
3
3
title: "Environment Setup on Host Machine"
4
4
5
-
weight: 4# 1 is first, 2 is second, etc.
5
+
weight: 3
6
6
7
7
# Do not modify these elements
8
8
layout: "learningpathall"
9
9
---
10
-
## Before you begin
11
10
12
-
You will use a Linux computer to run PyTorch and ExecuTorch to prepare a TinyML model to run on edge devices.
11
+
In this section, you will prepare a development environment to compile the model. These instructions have been tested on Ubuntu 22.04, 24.04 and on Windows Subsystem for Linux (WSL).
13
12
14
-
The instructions are for Ubuntu 22.04 or newer.
13
+
## Install dependencies
15
14
16
-
You also need the [Grove Vision AI Module](https://wiki.seeedstudio.com/Grove-Vision-AI-Module/). If you don't have the board you can use the Corstone-300 Fixed Virtual Platform (FVP) instead.
15
+
Python3 is required and comes installed with Ubuntu, but some additional packages are needed.
17
16
18
-
{{% notice Note %}}
19
-
Note that the Corstone-300 FVP is not available for the Arm architecture so your host machine needs to x86_64.
20
-
{{% /notice %}}
21
-
22
-
The instructions have been tested on:
23
-
- Arm-based cloud instances running Ubuntu 22.04.
24
-
- Desktop computer with Ubuntu 24.04.
25
-
- Windows Subsystem for Linux (WSL).
26
-
27
-
The host machine is where you will perform most of your development work, especially compiling code for the target Arm devices.
28
-
29
-
## Install Python
30
-
31
-
Python 3 is included in Ubuntu, but some additional packages are needed.
32
-
33
-
```console
17
+
```bash
34
18
sudo apt update
35
-
sudo apt install python-is-python3 gcc g++ make -y
19
+
sudo apt install python-is-python3 python3-dev python3-venv gcc g++ make -y
36
20
```
37
21
38
-
## Install PyTorch
39
-
40
-
Create a Python virtual environment using Miniconda.
Run a few commands to set up the ExecuTorch internal dependencies.
44
+
```bash
80
45
git submodule sync
81
46
git submodule update --init
82
47
83
-
# Install ExecuTorch pip package and its dependencies, as well as
84
-
# development tools like CMake.
85
48
./install_requirements.sh
86
49
```
87
50
88
-
## Install Edge Impulse CLI
89
-
90
-
1. Create an [Edge Impulse Account](https://studio.edgeimpulse.com/signup) and sign in.
91
-
92
-
2. Install the Edge Impulse CLI tools in your terminal
93
-
94
-
The Edge Impulse CLI tools require Node.js.
95
-
96
-
```console
97
-
sudo apt install nodejs npm -y
98
-
```
99
-
100
-
Confirm `node` is available by running:
101
-
102
-
```console
103
-
node -v
104
-
```
105
-
106
-
Your version is printed, for example:
107
-
108
-
```output
109
-
v18.19.1
110
-
```
111
-
112
-
Install the Edge Impulse CLI using NPM:
113
-
114
-
```console
115
-
npm install -g edge-impulse-cli
116
-
```
117
-
118
-
3. Install Screen to use with edge devices
51
+
{{% notice Note %}}
52
+
If you run into an issue of `buck` running in a stale environment, reset it by running the following instructions.
119
53
120
-
```console
121
-
sudo apt install screen -y
54
+
```bash
55
+
ps aux | grep buck
56
+
pkill -f buck
122
57
```
58
+
{{% /notice %}}
123
59
124
60
## Next Steps
125
61
126
-
If you don't have the Grove AI vision board and want to use the Corstone-300 FVP proceed to [Environment Setup Corstone-300 FVP](/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/env-setup-6-fvp/)
62
+
If you don't have the Grove AI vision board, use the Corstone-300 FVP proceed to [Environment Setup Corstone-300 FVP](/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/env-setup-6-fvp/)
127
63
128
64
If you have the Grove board proceed o to [Setup on Grove - Vision AI Module V2](/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/setup-7-grove/)
0 commit comments