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
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.
title: Edge AI with PyTorch & ExecuTorch - Tiny Sentiment Analysis on Arm
2
+
title: Edge AI with PyTorch & ExecuTorch - Tiny Rock-Paper-Scissors on Arm
3
3
4
-
draft: true
5
-
cascade:
6
-
draft: true
4
+
minutes_to_complete: 60
7
5
8
-
minutes_to_complete: 90
6
+
who_is_this_for: This learning path is for machine learning developers interested in deploying TinyML models on Arm-based edge devices. You will learn how to train and deploy a machine learning model for the classic game "Rock-Paper-Scissors" on edge devices. You'll use PyTorch and ExecuTorch, frameworks designed for efficient on-device inference, to build and run a small-scale computer vision model.
9
7
10
-
who_is_this_for: This topic is for machine learning engineers, embedded AI developers, and researchers interested in deploying TinyML models for NLP on Arm-based edge devices using PyTorch and ExecuTorch.
11
8
12
9
learning_objectives:
13
-
- Train a custom CNN-based sentiment classification model implemented in PyTorch.
14
-
- Optimize and convert the model using ExecuTorch for Arm-based edge devices.
15
-
- Deploy and run inference on the Corstone-320 FVP.
10
+
- Train a small Convolutional Neural Network (CNN) for image classification using PyTorch.
11
+
- Understand how to use synthetic data generation for training a model when real-world data is limited.
12
+
- Optimize and convert a PyTorch model into an ExecuTorch program (.pte) for Arm-based devices.
13
+
- Run the trained model on a local machine to play an interactive mini-game, demonstrating model inference.
16
14
17
-
prerequisites:
18
-
- Basic knowledge of machine learning concepts.
19
-
- It is advised to complete The Learning Path, [Introduction to TinyML on Arm using PyTorch and ExecuTorch](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm) before starting this learning path.
20
-
- Familiarity with Python and PyTorch.
21
-
- A Linux host machine or VM running Ubuntu 22.04 or higher.
22
-
- An Arm license to run the examples on the Corstone-320 Fixed Virtual Platform (FVP), for hands-on deployment.
23
15
16
+
prerequisites:
17
+
- A basic understanding of machine learning concepts.
18
+
- Familiarity with Python and the PyTorch library.
19
+
- Having completed [Introduction to TinyML on Arm using PyTorch and ExecuTorch](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm).
20
+
- An x86 Linux host machine or VM running Ubuntu 22.04 or higher.
24
21
25
22
author: Dominica Abena O. Amanfo
26
23
27
24
### Tags
28
25
skilllevels: Introductory
29
26
subjects: ML
30
27
armips:
31
-
- Cortex-A
28
+
- Cortex-M
29
+
- Ethos-U
32
30
tools_software_languages:
33
31
- tinyML
32
+
- Computer Vision
33
+
- Edge AI
34
34
- CNN
35
35
- PyTorch
36
36
- ExecuTorch
37
37
38
38
operatingsystems:
39
39
- Linux
40
40
41
-
42
41
further_reading:
43
42
- resource:
44
43
title: Run Llama 3 on a Raspberry Pi 5 using ExecuTorch
@@ -56,4 +55,4 @@ further_reading:
56
55
weight: 1# _index.md always has weight of 1 to order correctly
57
56
layout: "learningpathall"# All files under learning paths have this same wrapper
58
57
learning_path_main_page: "yes"# This should be surfaced when looking for related content. Only set for _index.md of learning path content.
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/training-inference-pytorch/env-setup-1.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,31 @@ weight: 2
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Overview
10
-
In this course, you will learn how to train and run inference using a Tiny Sentiment Classifier. You'll deploy the model on the Arm Corstone-320 FVP for sentiment analysis.
9
+
## Overview
10
+
This learning path (LP) is a direct follow-up to the [Introduction to TinyML on Arm using PyTorch and ExecuTorch](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm) learning path. While the previous one introduced you to the core concepts and the toolchain, this one puts that knowledge into practice with a fun, real-world example. You will move from the simple [Feedforward Neural Network](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/4-build-model) in the previous LP, to a more practical computer vision task: A tiny Rock-Paper-Scissors game, to demonstrate how these tools can be used to solve a tangible problem and run efficiently on Arm-based edge devices.
11
11
12
-
We will train a lightweight convolutional neural network (CNN)-based sentiment classifier using synthetic text data. This model is optimized for small devices, using embedding layers and 1D convolutions for efficient text classification.
12
+
You will train a lightweight CNN to classify images of the letters R, P, and S as "rock," "paper," or "scissors." The script uses a synthetic data renderer to create a large dataset of these images with various transformations and noise, eliminating the need for a massive real-world dataset.
13
13
14
+
### What is a Convolutional Neural Network (CNN)?
15
+
A Convolutional Neural Network (CNN) is a type of deep neural network primarily used for analyzing visual imagery. Unlike traditional neural networks, CNNs are designed to process pixel data by using a mathematical operation called **convolution**. This allows them to automatically and adaptively learn spatial hierarchies of features from input images, from low-level features like edges and textures to high-level features like shapes and objects.
14
16
15
-
## Environment Setup
16
-
Setup your development environment for TinyML by following the first 3 chapters of the [Introduction to TinyML on Arm using PyTorch and ExecuTorch](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm) Learning Path (LP).
17
+

CNNs are the backbone of many modern computer vision applications, including:
21
+
22
+
-**Image Classification:** Identifying the main object in an image, like classifying a photo as a "cat" or "dog".
23
+
-**Object Detection:** Locating specific objects within an image and drawing a box around them.
24
+
-**Facial Recognition:** Identifying and verifying individuals based on their faces.
25
+
26
+
For the Rock-Paper-Scissors game, you'll use a tiny CNN to classify images of the letters R, P, and S as the corresponding hand gestures.
17
27
18
28
19
-
If you just followed the LP above, you should already have your virtual environment activated. If not, activate it using:
29
+
30
+
## Environment Setup
31
+
To get started, follow the first three chapters of the [Introduction to TinyML on Arm using PyTorch and ExecuTorch](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm) Learning Path. This will set up your development environment and install the necessary tools. Return to this LP once you've run the `./examples/arm/run.sh` script in the ExecuTorch repository.
32
+
33
+
If you just followed the LP above, you should already have your virtual environment activated. If not, activate it using:
20
34
21
35
```console
22
36
source $HOME/executorch-venv/bin/activate
@@ -26,8 +40,7 @@ The prompt of your terminal now has `(executorch-venv)` as a prefix to indicate
26
40
Run the commands below to install the dependencies.
0 commit comments