Skip to content

Commit

Permalink
Merge pull request Seeed-Studio#1606 from MatthewJeffson/docusaurus-v…
Browse files Browse the repository at this point in the history
…ersion

Update: update sensecraft AI part of ai
  • Loading branch information
MatthewJeffson authored Aug 26, 2024
2 parents b17a849 + 618504f commit 15d728a
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 50 deletions.
25 changes: 16 additions & 9 deletions docs/Topics/TinyML/TinyML_Workshop/TinyML_workshop_course.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: TinyML Workshop Course.
title: TinyML Workshop Course
title: AI Workshop - How to Add AI to Almost Everything
keywords:
- tinyml course
image: https://files.seeedstudio.com/wiki/seeed_logo/logo_2023.png
Expand All @@ -11,28 +11,35 @@ last_update:
---


# TinyML Workshop Course
# How to Add AI to Almost Everything

Welcome to the course on using SenseCraft Model Assistant and Edge Impulse for TinyML on the XIAO ESP32S3 Sense! This course is a culmination of Seeed Studio's offline workshops, and it aims to provide you with a comprehensive understanding of how to utilize SenseCraft Model Assistant and Edge Impulse platforms effectively. We will explore the functionalities of SSCMA, learn about Edge Impulse's capabilities, and focus on implementing TinyML on the XIAO ESP32S3 development board.
## The AI Workshop Overview

<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/3.jpg" style={{width:1000, height:'auto'}}/></div>
Hosted by Seeed Studio, this hands-on workshop is specifically tailored for AI beginners and Arduino fans.

Dive into the transformative world of TinyML using our XIAO ESP32S3 Sense, a thumb-sized yet powerful MCU.

Throughout this course, we will delve into the usage of SenseCraft Model Assistant(Beta) as a powerful online development environment. It will guide you through data management, preprocessing, feature engineering, model design, training, evaluation, and optimization. We will emphasize its graphical interface, which simplifies tasks such as data collection, preprocessing, and feature engineering, as well as selecting appropriate model architectures and training parameters.
This workshop will provide you with a practical, easy-to-understand introduction to machine learning while demystifying the world of AI.

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

Throughout this course, we will delve into the usage of SenseCraft AI Platform as a powerful online development environment. It will guide you through data management, preprocessing, feature engineering, model design, training, evaluation, and optimization.

We will emphasize its graphical interface, which simplifies tasks such as data collection, preprocessing, and feature engineering, as well as selecting appropriate model architectures and training parameters.

<div class="button_tech_support_container">
<a href="/ModelAssistant_Introduce_Overview" class="button_edgelab"></a>
<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 Model Assistant 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.
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 Model Assistant.
- 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.
Expand All @@ -49,7 +56,7 @@ 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 Model Assistant</a>
<a href= "/sscma" class="getting_started_label2">1.1 SenseCraft AI Platform</a>
<br/>Use pre-made tinyML models and experiment quickly.
</div>
</div>
Expand Down
77 changes: 41 additions & 36 deletions docs/Topics/TinyML/TinyML_Workshop/sscma.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
---
description: Introduction to SenseCraft Model Assistant.
title: SenseCraft Model Assistant
description: This is an open-source project / platform focused on embedded AI.
title: SenseCraft AI Platform
keywords:
- tinyml course
image: https://files.seeedstudio.com/wiki/seeed_logo/logo_2023.png
slug: /sscma
last_update:
date: 08/09/2023
date: 08/25/2024
author: Salman
---

## SenseCraft Model Assistant
## SenseCraft AI Platform

Seeed Studio [SenseCraft Model Assistant](https://seeed-studio.github.io/SenseCraft-Web-Toolkit/#/setup/process) is an open-source project focused on embedded AI. We have optimized excellent algorithms from OpenMMLab for real-world scenarios and made implementation more user-friendly, achieving faster and more accurate inference on embedded devices. With SenseCraft Model Assistant we can easily get-started with tinyML project and work on it. Let's get started.
Seeed Studio [SenseCraft AI Platform](https://sensecraft.seeed.cc/ai/#/model) is a browser-based AI Solution.

### 1. Get started with Face Recognition.
It empowers users to effortlessly deploy a vast library of publicly available AI models onto their edge devices provides a seamless and user-friendly experience, allowing you to deploy public AI models directly onto your edge devices with **just a few clicks**.

We flash the SenseCraft Model Assistant program in advance for all XIAO ESP32S3 Sense participating in the Workshop, and pre-set the model for face recognition. Simply connect the XIAO ESP32S3 Sense to your PC via a data cable to instantly display face recognition.
:::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.
:::

### 1. Get started with Face Recognition

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 display face recognition.

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

Expand All @@ -29,52 +35,51 @@ First, we need to properly connect the XIAO ESP32S3 Sense expansion board to the

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

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

Click the button below to go to the SenseCraft Model Assistant homepage.
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://seeed-studio.github.io/SenseCraft-Web-Toolkit/#/setup/process">
<strong><span><font color={'FFFFFF'} size={"2"}>SenseCraft Model Assistant</font></span></strong></a>
<a class="get_one_now_item" href="https://sensecraft.seeed.cc/ai/#/device/local?time=1724577953974">
<strong><span><font color={'FFFFFF'} size={"2"}>SenseCraft AI Platform</font></span></strong></a>
</div><br />

Once we are on the homepage of SenseCraft Model Assistant, we need to first need to connect the XIAO ESPS3 for that, click **Connect** button.
Once we are on the homepage of SenseCraft AI Platform, we need to first need to connect the XIAO ESPS3 for that, click **Connect** button.

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Home_Connect.png" style={{width:800, height:'auto'}}/></div>
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai3.png" style={{width:800, height:'auto'}}/></div>

The browser will then pop up a window. We need to select the correct port for XIAO here. For **Windows**, this port usually starts with **COM**, and in case of **MacOS**, this port usually starts with **/dev/tty**. And it will have the words **USB JTAG**.

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

Clicking the **Connect** button will only result in an automatically identify the board and configuration information is being read.

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Select_model.png" style={{width:800, height:'auto'}}/></div>
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai5.png" style={{width:800, height:'auto'}}/></div>

Once the **Connect** button is back to Red as **Disconnect**, we can select the model from the "Ready to use AI Models" list. Here I selected the face recognition for demo. After selecting it, click the **Send** button and wait few second.
Then we can move to **Select Model** button and click it to find another pop up window. Here I selected the face recognition for demo. After selecting it, click the **Send** button and wait few second. You will see directly the results:

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Select_model_loading.png
" style={{width:800, height:'auto'}}/></div>

Finally, we come to the Preview section, click once on **Stop** in the upper right corner, and then click **Invoke**, if everything runs smoothly, you can see the real-time screen effect.
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai6.gif" style={{width:500, height:'auto'}}/></div>

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Face_demo.png" style={{width:800, height:'auto'}}/></div>
You are getting it! You have successfully deployed your first ML model!

### 2. SenseCraft Triggers - Do a simple feedback action

### 2. SenseCraft Triggers - Control things with tinyML
That is, when we recognize our face, we let XIAO's LED light up. For that, go to **Output** section and Select the "Trigger action" to setup a trigger. .

We can also make conditions statements using the SenseCraft tool. for example: we can control XIAO-ESP32S3 onboard LED when a face is detected. For that, go to **Output** section and Select the "Trigger action" to setup a trigger. .

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Select_model_action1.png" style={{width:800, height:'auto'}}/></div>
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai7.png" style={{width:800, height:'auto'}}/></div>

Here, When the face detection have confidencet above 50% and enable a trigger.

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Select_model_action2.png" style={{width:800, height:'auto'}}/></div>
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai8.png" style={{width:800, height:'auto'}}/></div>

And here the **Trigger Action** is "Light up the LED". Ater that, click "Send" and you can see, whenver the face detected, you can see the onboard LED is turned on.

<div style={{textAlign:'center'}}><img src="https://raw.githubusercontent.com/salmanfarisvp/TinyML/main/EdgeLab/src/img/Edgelab2.0/EL_Select_model_action3.png" style={{width:800, height:'auto'}}/></div>

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

:::info
**Congratulations!** You have successfully deployed the AI automated System!
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/fab24/sensecraftai10.png" style={{width:800, height:'auto'}}/></div>
:::

<!-- ### 2. Key Word Spotting(KWS) to control XIAO onboard LED.
Expand Down Expand Up @@ -112,11 +117,11 @@ Download the three binary files below.
**Step 2. Flash all files to XIAO**
Please click the button below to come to SenseCraft Model Assistant Flash Tools page.
Please click the button below to come to SenseCraft AI Platform Flash Tools page.
<div class="get_one_now_container" style={{textAlign: 'center'}}>
<a class="get_one_now_item" href="https://seeed-studio.github.io/SenseCraft-Web-Toolkit/#/dashboard/workplace">
<strong><span><font color={'FFFFFF'} size={"4"}>Go to SenseCraft Model Assistant</font></span></strong></a>
<strong><span><font color={'FFFFFF'} size={"4"}>Go to SenseCraft AI Platform</font></span></strong></a>
</div><br />
Once you are on the web page, please click on the **Connect** button from **Deployment** and then select the port number of your XIAO. Again, it should be clearly labeled **USB JTAG**.
Expand Down Expand Up @@ -164,7 +169,7 @@ Then click **Burn**, watch the progress bar for all the files and make sure each
Once all the files have been uploaded successfully, you can press the reset button to allow the program to start executing. The effect of this sample program is that when the microphone of the XIAO ESP32S3 Sense detects the Hello command that you utter, the built-in LED orange light will illuminate. When the Stop command you say is monitored, the orange light goes off.
-->

<!--
### 3. More Custom Prebuild Models
:::tip
Expand Down Expand Up @@ -208,13 +213,13 @@ Finally, we come to the Preview section, click once on **Stop** in the upper rig
<div style={{textAlign:'center'}}><img src="https://files.seeedstudio.com/wiki/tinyml-topic/10.gif" style={{width:800, height:'auto'}}/></div>
<hr></hr>
<hr></hr> -->

# ToDo
- [ ] Load and Run **Face Recognition Model** with SenseCraft Model Assistant.
- [ ] Setup a Trigger and **Control LED** with SenseCraft Model Assistant.
- [ ] Load and Run **Face Recognition Model** with SenseCraft AI Platform.
- [ ] Setup a Trigger and **Control LED** with SenseCraft AI Platform.

:::tip
<!-- :::tip
If you also want to experience this water meter that generates readings automatically, you can download the zip package by clicking **[here](https://files.seeedstudio.com/wiki/tinyml-topic/clock-master.zip)**, unzip it and then double click to open the html file in the root directory.
:::
::: -->

2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,7 @@ const sidebars = {
items: [
{
type: 'category',
label: 'TinyML Workshop',
label: 'AI Workshop',
collapsed: true,
collapsible: true,
link: {
Expand Down
8 changes: 4 additions & 4 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ a.getting_started:hover .getting_started_label3 {

.button_edgelab {
display: inline-block;
background-image: url('https://files.seeedstudio.com/wiki/tinyml-topic/edgelab.png');
background-image: url('https://files.seeedstudio.com/wiki/tinyml-topic/sensecraftai2.png');
background-size: cover;
background-position: center;
margin: auto;
Expand All @@ -1206,14 +1206,14 @@ a.getting_started:hover .getting_started_label3 {
border: 1px solid #ffffff;
border-radius: 8px;
transition: transform 0.2s ease-in-out;
width: 1000px; /* 按钮宽度 */
height: 500px; /* 按钮高度 */
width: 800px; /* 按钮宽度 */
height: 365px; /* 按钮高度 */
}

.button_edgelab:hover {
margin: auto;
transform: scale(1.1);
background-image: url('https://files.seeedstudio.com/wiki/tinyml-topic/edgelab.png');
background-image: url('https://files.seeedstudio.com/wiki/tinyml-topic/sensecraftai.png');
background-size: cover;
}

Expand Down

0 comments on commit 15d728a

Please sign in to comment.