Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated TinyML #1706

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 18 additions & 32 deletions docs/Topics/TinyML/TinyML_Workshop/TinyML_workshop_course.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ keywords:
image: https://files.seeedstudio.com/wiki/seeed_logo/logo_2023.png
slug: /tinyml_workshop_course_new
last_update:
date: 08/27/2024
author: Citric, Matthew
date: 09/24/2024
author: Citric, Matthew,Frank
---


Expand All @@ -31,18 +31,11 @@ We will emphasize its graphical interface, which simplifies tasks such as data c
<a href="/sensecraft_ai" class="button_edgelab"></a>
</div>

Next, we will shift our focus to the Edge Impulse platform. Designed specifically for embedded devices, Edge Impulse offers an end-to-end solution for developing and deploying TinyML models. We will learn how to export models trained in SenseCraft AI Platform to Edge Impulse and deploy them on the XIAO ESP32S3. Additionally, we will explore Edge Impulse's features, including real-time data collection, model quantization and optimization, and the ability to perform real-time inference on the device.

<div class="button_tech_support_container">
<a href="https://edgeimpulse.com/" class="button_edgeimpulse"></a>
</div>

By participating in this course, you will gain the following skills and knowledge:

- Familiarity with the fundamental features and workflow of SenseCraft AI Platform.
- Proficiency in essential steps such as data preprocessing, model training, and evaluation.
- Understanding of TinyML concepts and their application scenarios.
- Ability to deploy models to the XIAO ESP32S3 using the Edge Impulse platform.

Whether you are a beginner or an experienced developer with some machine learning background, this course will provide you with invaluable practical experience and skills to apply TinyML in IoT projects. Let's embark on this exciting learning journey together!

Expand Down Expand Up @@ -84,31 +77,19 @@ To complete the workshop, we need go through the instructions below, and each pa
<div class="all_container">
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/sscma" class="getting_started_label2">1.1 SenseCraft AI Platform</a>
<a href= "/sscma" class="getting_started_label2">1 SenseCraft AI Platform</a>
<br/>Use pre-made tinyML models and experiment quickly.
</div>
</div>
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/edgeimpulse" class="getting_started_label2">1.2 Edge Impulse</a>
<br/>Create ML model and generate arduino libraries.
</div>
</div>
</div>

### Step 2: Experiment tinyML models with pre-built arduino library

<div class="all_container">
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/edgeimpulse#speech-keyword-recognition-yes--no-arduino-library" class="getting_started_label2">2.1 Control Lights with Voice </a>
<br/>Learn how to intergrate arduino tinyML libraries.
</div>
</div>
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/edgeimpulse#fruit-identification-apples-bananas-grapes-arduino-library" class="getting_started_label2">2.2 Fruit identification </a>
<br/>Classify Apples, Banana and Grapes images using computervision.
<a href= "/sscma" class="getting_started_label2">2 The AI "Blink" </a>
<br/>Learn how to easily deploy public AI model libraries on edge devices.
</div>
</div>
</div>
Expand All @@ -118,21 +99,26 @@ To complete the workshop, we need go through the instructions below, and each pa
<div class="all_container">
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/tinyml_course_Key_Word_Spotting" class="getting_started_label2">3.1 Build Your own key word based project </a>
<br/>Learn how to build voice recognition tinyML project scratch.
</div>
</div>
<div class="getting_started">
<div class="start_card_wrapper">
<a href= "/tinyml_course_Image_classification_project" class="getting_started_label2">3.2 Build Your own Image classification project </a>
<br/>Learn how to build Image classification project from scratch.
<a href= "/train_and_deploy_model" class="getting_started_label2">3 Build Your own project </a>
<br/>Learn how to easily train and deploy your own models.
</div>
</div>
</div>

Please go one by one to the above topic and complete the ToDo to go to the next level. All the best and happy making 🙌.


## Edge Impulse

<div class="button_tech_support_container">
<a href="https://edgeimpulse.com/" class="button_edgeimpulse"></a>
</div>

Edge Impulse is a platform designed for developing and deploying TinyML models specifically for embedded devices. It provides tools for real-time data collection, model quantization, and optimization, enabling efficient deployment on devices like the XIAO ESP32S3.

For more details, you can refer to our [documentation here](https://wiki.seeedstudio.com/edgeimpulse/). When performing [Key Word Spotting](https://wiki.seeedstudio.com/tinyml_course_Key_Word_Spotting/) and [Image Classification](https://wiki.seeedstudio.com/tinyml_course_Image_classification_project/), make sure to replace the default ESP NN folder with [the version we provide during deployment](https://github.com/Mjrovai/XIAO-ESP32S3-Sense/blob/main/ESP-NN.zip).


## Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.
Expand Down
111 changes: 111 additions & 0 deletions docs/Topics/TinyML/TinyML_Workshop/TrainModel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
description: This is an open-source project / platform focused on embedded AI.
title: Train and Deploy Your Own AI Model
keywords:
- tinyml course
image: https://files.seeedstudio.com/wiki/seeed_logo/logo_2023.png
slug: /train_and_deploy_model
last_update:
date: 09/24/2024
author: Frank
---

# Train and Deploy Your Own AI Model

## SenseCraft AI Platform

Seeed Studio [SenseCraft AI Platform](https://sensecraft.seeed.cc/ai/#/model) is a browser-based AI Solution.

It empowers users to effortlessly train and deploy their own models onto their edge devices, providing a seamless and user-friendly experience, allowing you to train and deploy your own models directly onto your edge devices with **just a few clicks**.

:::info
The core of it is an open source project and we have share it on the [GitHub](https://github.com/Seeed-Studio/ModelAssistant) and offer the [development method](/ModelAssistant_Introduce_Overview) as well.
:::

## Start Training the Model

We first go to the [SenseCraft AI Deployment Website](https://sensecraft.seeed.cc/ai/#/device/local?time=1724577953974), then simply connect the XIAO ESP32S3 Sense to your PC via a data cable to instantly start using.

#### Step 1. Install XIAO ESP32S3 Sense expansion board

First, we need to properly connect the XIAO ESP32S3 Sense expansion board to the XIAO. Installing the expansion board is very simple, you just need to align the connector on the expansion board with the B2B connector on the XIAO ESP32S3, press it hard and hear a "click", the installation is complete.

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/img/61.gif" style={{width:500, height:'auto'}}/></div>


#### Step 2. Connecting the XIAO to your PC

Connect the XIAO to your PC using a data cable with data transfer function.

#### Step 3. Go to the SenseCraft AI Platform page and connect the XIAO

Click the button below to go to the SenseCraft AI Platform homepage.

<div class="get_one_now_container" style={{textAlign: 'center'}}>
<a class="get_one_now_item" href="https://sensecraft.seeed.cc/ai/#/home">
<strong><span><font color={'FFFFFF'} size={"2"}>SenseCraft AI Platform</font></span></strong></a>
</div><br />


#### step 4. Start training the model

After entering the SenseCraft AI platform homepage, we first click `Training`, then select `Classification Type`, name your classes, and finally choose `XIAO ESP32S3 Sense`.


<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/1.png" style={{width:800, height:'auto'}}/></div>

Then, based on your requirements for classification, refer to your class, and click `Hold to Record`.

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/2.png" style={{width:800, height:'auto'}}/></div>


This time, I chose the requirement for gesture recognition to classify "12345."

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/3.png" style={{width:800, height:'auto'}}/></div>

:::tip

Capture pictures: Each one over 10 images will be fine, more are better.

:::


After data collection is complete, we select `XIAO ESP32S3 Sense` in the Training section and click `Start Training`.

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/4.png" style={{width:800, height:'auto'}}/></div>

After training is complete, we can see our training results through a real-time preview.

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/5.png" style={{width:800, height:'auto'}}/></div>

#### step 5. Deploy the model

After previewing and confirming that the trained model is fine, we select `Training Records`, then choose the recently trained model (named “ClassTrain” and “XIAO”) and click `Deploy to device`.

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/6.png" style={{width:800, height:'auto'}}/></div>

After successfully deploying to the device, you will see the results directly:

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/7.gif" style={{width:800, height:'auto'}}/></div>

You have successfully trained your first ML model!


:::info

If you have more time, you can try using [the `Output` operation you've learned before](https://wiki.seeedstudio.com/sscma/#2-sensecraft-triggers---do-a-simple-feedback-action).

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/trainingmodel/8.png" style={{width:800, height:'auto'}}/></div>

:::


# ToDo
- [ ] Train and deploy models using the SenseCraft AI platform.
- [ ] Setup a Trigger and **Control LED** for your trained models with SenseCraft AI Platform.






2 changes: 1 addition & 1 deletion docs/Topics/TinyML/TinyML_Workshop/sscma.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: This is an open-source project / platform focused on embedded AI.
title: SenseCraft AI Platform
title: The AI "Blink"
keywords:
- tinyml course
image: https://files.seeedstudio.com/wiki/seeed_logo/logo_2023.png
Expand Down
18 changes: 15 additions & 3 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,20 @@ const sidebars = {
type: 'category',
label: 'Applications',
items: [
{
type: 'category',
label: 'Edge Impulse',
collapsed: true,
collapsible: true,
link: {
type: "doc",
id: 'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/Application/Edgeimpulse/EdgeImpulse',
},
items: [
'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/Application/Edgeimpulse/Key_Word_Spotting',
'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/Application/Edgeimpulse/Image_classification_project',
],
},
'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/Application/XIAO_ESP32S3_Speech2chatgpt',
'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/XIAO_ESP32S3_EdgeLab',
'Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32S3/Application/XIAO_ESP32S3_Geolocation',
Expand Down Expand Up @@ -3917,9 +3931,7 @@ const sidebars = {
},
items: [
'Topics/TinyML/TinyML_Workshop/sscma',
'Topics/TinyML/TinyML_Workshop/EdgeImpulse',
'Topics/TinyML/TinyML_Workshop/Key_Word_Spotting',
'Topics/TinyML/TinyML_Workshop/Image_classification_project',
'Topics/TinyML/TinyML_Workshop/TrainModel',
],
},

Expand Down
Loading