Skip to content

Commit 9a6ea6f

Browse files
Merge pull request #1591 from madeline-underwood/TinyML
TinyML_Andy to review
2 parents 12a3d00 + 9a58679 commit 9a6ea6f

File tree

7 files changed

+59
-50
lines changed

7 files changed

+59
-50
lines changed
Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,60 @@
11
---
2-
title: Introduction to TinyML
2+
title: Overview
33
weight: 2
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
This Learning Path is about TinyML. It serves as a starting point for learning how cutting-edge AI technologies may be used on even the smallest devices, making Edge AI more accessible and efficient. You will learn how to set up your host machine and target device to facilitate compilation and ensure smooth integration across devices.
9+
## TinyML
1010

11-
In this section, you get an overview of the domain with real-life use-cases and available devices.
1211

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-performance 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.
12+
This Learning Path is about TinyML. It is a starting point for learning how innovative AI technologies can be used on even the smallest of devices, making Edge AI more accessible and efficient. You will learn how to set up your host machine and target device to facilitate compilation and ensure smooth integration across devices.
13+
14+
This section provides an overview of the domain with real-life use cases and available devices.
15+
16+
TinyML represents a significant shift in Machine Learning deployment. Unlike traditional Machine Learning, which typically depends on cloud-based servers or high-performance hardware, TinyML is tailored to function on devices with limited resources, constrained memory, low power, and fewer processing capabilities.
17+
18+
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.
1519

1620
### Benefits and applications
1721

18-
The advantages of TinyML match up well with the Arm architecture, which is widely used in IoT, mobile devices, and edge AI deployments.
22+
The benefits of TinyML align well with the Arm architecture, which is widely used in IoT, mobile devices, and edge AI deployments.
1923

20-
Here are some key benefits of TinyML on Arm:
24+
Here are some of the key benefits of TinyML on Arm:
2125

2226

2327
- **Power Efficiency**: TinyML models are designed to be extremely power-efficient, making them ideal for battery-operated devices like sensors, wearables, and drones.
2428

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.
29+
- **Low Latency**: AI processing happens on-device, so there is no need to send data to the cloud, which reduces latency and enables real-time decision-making.
2630

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.
31+
- **Data Privacy**: With on-device computation, sensitive data remains local, providing enhanced privacy and security. This is a priority in healthcare and personal devices.
2832

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.
33+
- **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.
3034

3135
- **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.
3236

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.
37+
TinyML is being deployed across multiple industries, enhancing everyday experiences and enabling groundbreaking solutions. The table below shows some examples of TinyML applications.
3438

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. |
39+
| Area | Device, Arm IP | Description |
40+
| ------ | ------- | ------------ |
41+
| Healthcare | Fitbit Charge 5, Cortex-M | To monitor vital signs such as heart rate, detect arrhythmias, and provide real-time feedback. |
42+
| Agriculture | OpenAg, Cortex-M | To monitor soil moisture and optimize water usage. |
43+
| Home automation | Arlo, Cortex-A | To detect objects and people, trigger alerts or actions while saving bandwidth and improving privacy. |
44+
| Industrial IoT | Siemens, Cortex-A | To analyze vibration patterns in machinery to predict when maintenance is needed and prevent breakdowns. |
45+
| Wildlife conservation | Conservation X, Cortex-M | To identify animal movements or detect poachers in remote areas without relying on external power sources. |
4246

4347
### Examples of Arm-based devices
4448

45-
There are many Arm-based devices you can use for TinyML projects. Some of them are listed below, but the list is not exhaustive.
49+
There are many Arm-based devices that you can use for TinyML projects. Some of these are detailed below, but the list is not exhaustive.
4650

4751
#### Raspberry Pi 4 and 5
4852

4953
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.
5054

5155
#### NXP i.MX RT microcontrollers
5256

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.
57+
NXP i.MX RT microcontrollers are low-power microcontrollers that can handle complex TinyML tasks while maintaining energy efficiency. This makes them ideal for applications like wearable healthcare devices and environmental sensors.
5458

5559
#### STM32 microcontrollers
5660

@@ -66,4 +70,4 @@ In addition to hardware, there are software platforms that can help you build Ti
6670

6771
Edge Impulse 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.
6872

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.
73+
Now that you have an overview of the subject, you can move on to the next section where you will set up an environment on your host machine.

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/_index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ cascade:
77

88
minutes_to_complete: 40
99

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 and data scientists new to Tiny Machine Learning (TinyML) who want to explore its potential using PyTorch and ExecuTorch.
1111

1212
learning_objectives:
13-
- Identify how TinyML is different from other AI domains.
14-
- Understand the benefits of deploying AI models on Arm-based edge devices.
15-
- Select Arm-based devices for TinyML.
16-
- Install and configure a TinyML development environment using ExecuTorch and the Corstone-320 FVP.
13+
- Describe what differentiates TinyML from other AI domains.
14+
- Describe the benefits of deploying AI models on Arm-based edge devices.
15+
- Identify suitable Arm-based devices for TinyML applications.
16+
- Set up and configure a TinyML development environment using ExecuTorch and Corstone-320 FVP.
1717

1818
prerequisites:
19-
- Basic knowledge of machine learning concepts.
19+
- Basic knowledge of Machine Learning concepts.
2020
- A Linux host machine or VM running Ubuntu 22.04 or higher.
21-
- 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).
21+
- A [Grove Vision AI Module](https://wiki.seeedstudio.com/Grove-Vision-AI-Module/) or an Arm license to run the Corstone-320 Fixed Virtual Platform (FVP).
2222

2323

2424
author: Dominica Abena O. Amanfo

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/build-model-8.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ layout: "learningpathall"
1010

1111
## Define a small neural network using Python
1212

13-
With the development environment ready, you can create a simple PyTorch model to test the setup.
13+
With your development environment set up, you can create a simple PyTorch model to test the setup.
1414

15-
This example defines a small feedforward neural network for a classification task. The model consists of 2 linear layers with ReLU activation in between.
15+
This example defines a small feedforward neural network for a classification task. The model consists of two linear layers with ReLU activation in between.
1616

1717
Use a text editor to create a file named `simple_nn.py` with the following code:
1818

@@ -71,7 +71,7 @@ python -m examples.arm.aot_arm_compiler --model_name=examples/arm/simple_nn.py \
7171
--system_config=Ethos_U85_SYS_DRAM_Mid --memory_mode=Sram_Only
7272
```
7373

74-
From the Arm Examples directory, you build an embedded Arm runner with the `.pte` included. This allows you to get the most performance out of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, generate the executable `arm_executor_runner`.
74+
From the Arm Examples directory, you can build an embedded Arm runner with the `.pte` included. This allows you to optimize the performance of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, generate the executable `arm_executor_runner`.
7575

7676
```bash
7777
cd $HOME/executorch/examples/arm/executor_runner
@@ -93,7 +93,7 @@ cmake --build $ET_HOME/examples/arm/executor_runner/cmake-out --parallel -- arm_
9393

9494
```
9595

96-
Now run the model on the Corstone-320 with the following command.
96+
Now run the model on the Corstone-320 with the following command:
9797

9898
```bash
9999
FVP_Corstone_SSE-320 \
@@ -124,4 +124,4 @@ I [executorch:arm_executor_runner.cpp:412] Model in 0x70000000 $
124124
I [executorch:arm_executor_runner.cpp:414] Model PTE file loaded. Size: 3360 bytes.
125125
```
126126

127-
You've now set up your environment for TinyML development on Arm, and tested a small PyTorch and ExecuTorch Neural Network.
127+
You have now set up your environment for TinyML development on Arm, and tested a small PyTorch and ExecuTorch Neural Network.

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/env-setup-5.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ weight: 3
88
layout: "learningpathall"
99
---
1010

11-
In this section, you will prepare a development environment to compile a machine learning model. These instructions have been tested on Ubuntu 22.04, 24.04 and on Windows Subsystem for Linux (WSL).
11+
In this section, you will prepare a development environment to compile a Machine Learning model. These instructions have been tested on Ubuntu 22.04, 24.04, and on Windows Subsystem for Linux (WSL).
1212

1313
## Install dependencies
1414

15-
Python3 is required and comes installed with Ubuntu, but some additional packages are needed.
15+
Python3 is required and comes installed with Ubuntu, but some additional packages are needed:
1616

1717
```bash
1818
sudo apt update
@@ -21,7 +21,7 @@ sudo apt install python-is-python3 python3-dev python3-venv gcc g++ make -y
2121

2222
## Create a virtual environment
2323

24-
Create a Python virtual environment using `python venv`.
24+
Create a Python virtual environment using `python venv`:
2525

2626
```console
2727
python3 -m venv $HOME/executorch-venv
@@ -40,7 +40,7 @@ git clone https://github.com/pytorch/executorch.git
4040
cd executorch
4141
```
4242

43-
Run the commands below to set up the ExecuTorch internal dependencies.
43+
Run the commands below to set up the ExecuTorch internal dependencies:
4444

4545
```bash
4646
git submodule sync
@@ -50,7 +50,7 @@ git submodule update --init
5050
```
5151

5252
{{% notice Note %}}
53-
If you run into an issue of `buck` running in a stale environment, reset it by running the following instructions.
53+
If you run into an issue of `buck` running in a stale environment, reset it by running the following instructions:
5454

5555
```bash
5656
ps aux | grep buck
@@ -70,8 +70,8 @@ executorch 0.6.0a0+3eea1f1
7070

7171
## Next Steps
7272

73-
Your next steps depends on the hardware you have.
73+
Your next steps depend on your hardware.
7474

75-
If you have the Grove Vision AI Module proceed to [Set up the Grove Vision AI Module V2](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/setup-7-grove/).
75+
If you have the Grove Vision AI Module, proceed to [Set up the Grove Vision AI Module V2 Learning Path](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/setup-7-grove/).
7676

77-
If you don't have the Grove Vision AI Module, you can use the Corstone-300 FVP instead, proceed to [Set up the Corstone-300 FVP](/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/env-setup-6-fvp/).
77+
If you do not have the Grove Vision AI Module, you can use the Corstone-320 FVP instead. See the Learning Path [Set up the Corstone-320 FVP](/learning-paths/microcontrollers/introduction-to-tinyml-on-arm/env-setup-6-fvp/).

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/env-setup-6-FVP.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ layout: "learningpathall"
1010

1111
## Corstone-320 FVP Setup for ExecuTorch
1212

13-
Navigate to the Arm examples directory in the ExecuTorch repository.
13+
Navigate to the Arm examples directory in the ExecuTorch repository:
1414

1515
```bash
1616
cd $HOME/executorch/examples/arm
1717
./setup.sh --i-agree-to-the-contained-eula
1818
```
1919

20-
After the script has finished running, it prints a command to run to finalize the installation. This will add the FVP executable's to your path.
20+
After the script has finished running, it prints a command to run to finalize the installation. This step adds the FVP executables to your system path.
2121

2222
```bash
2323
source $HOME/executorch/examples/arm/ethos-u-scratch/setup_path.sh
2424
```
2525

26-
Test that the setup was successful by running the `run.sh` script for Ethos-U85, which is the target device for Corstone-320.
26+
Test that the setup was successful by running the `run.sh` script for Ethos-U85, which is the target device for Corstone-320:
2727

2828
```bash
2929
./examples/arm/run.sh --target=ethos-u85-256
3030
```
3131

3232
You will see a number of examples run on the FVP.
3333

34-
This confirms the installation, and you can proceed to the next section [Build a Simple PyTorch Model](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/build-model-8/).
34+
This confirms the installation, so you can now proceed to the Learning Path [Build a Simple PyTorch Model](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/build-model-8/).
124 KB
Loading

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/setup-7-Grove.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ layout: "learningpathall"
99
---
1010
## Before you begin
1111

12-
This section requires the Grove Vision AI Module. Due to its constrained environment, we'll focus on lightweight, optimized tools and models.
12+
This section requires the Grove Vision AI Module. Due to its constrained environment, we will focus on lightweight, optimized, tools and models.
1313

1414
### Compilers
1515

1616
The examples can be built with Arm Compiler for Embedded or Arm GNU Toolchain.
1717

1818
Use the install guides to install each compiler on your host machine:
19-
- [Arm Compiler for Embedded](/install-guides/armclang/)
20-
- [Arm GNU Toolchain](/install-guides/gcc/arm-gnu/)
19+
- [Arm Compiler for Embedded](/install-guides/armclang/).
20+
- [Arm GNU Toolchain](/install-guides/gcc/arm-gnu/).
2121

2222
## Board Setup
2323

2424
![Hardware Overview #center](Overview.png)
2525

26-
Hardware overview : [Image credits](https://wiki.seeedstudio.com/grove_vision_ai_v2/).
26+
Hardware overview: [Image credits](https://wiki.seeedstudio.com/grove_vision_ai_v2/).
2727

2828
1. Download and extract the latest Edge Impulse firmware
2929
Grove Vision V2 [Edge impulse Firmware](https://cdn.edgeimpulse.com/firmware/seeed-grove-vision-ai-module-v2.zip).
3030

31-
2. Connect the Grove - Vision AI Module V2 to your computer using the USB-C cable.
31+
2. Connect the Grove Vision AI Module V2 to your computer using the USB-C cable.
3232

3333
![Board connection](Connect.png)
3434

@@ -41,5 +41,10 @@ Ensure the board is properly connected and recognized by your computer.
4141
```console
4242
./flash_linux.sh
4343
```
44+
You have now set up the board successfully. In the next section, you will learn how to use the functionality in the ExecuTorch repository for TinyML, using a hardware emulator.
45+
46+
{{% notice Note %}}
47+
In the next Learning Path in this series, you will incorporate the board into the workflow, running workloads on real hardware.
48+
{{% /notice %}}
4449

4550
Continue to the next page to build a simple PyTorch model.

0 commit comments

Comments
 (0)