Deploy model on PSOC™ 6 and PSOC™ Edge boards
In this section, we cover information on how to deploy an Imagimob-generated machine learning model for PSOC™ 6 and PSoC™ Edge using ModusToolbox™. To demonstrate this, we will use a code example provided within ModusToolbox™. We offer a variety of code examples designed for different use cases for both PSOC™ 6 and PSoC™ Edge, simplifying the deployment process. You need to create the required machine learning project for your board within ModusToolbox™ and then replace the model.c and model.h files in the project with the model.c and model.h files for your model following by building the project. Follow the step-by-step instructions to learn the deployment process.
Pre-requisites:
- Download and Install ModusToolbox™ (opens in a new tab) (recommended v3.4 or later)
- Infineon PSOC™ 6 or PSOC™ Edge board on which you want to deploy the model
- ModusToolbox™ PSoC™ E84 Early Access Pack, only for PSOC™ Edge
How to get the Early Access Pack for PSOC™ Edge?
- External teams require an NDA.
- Obtain an Infineon account
- If you are a member of Infineon Team, you already have Infineon account as your Infineon email address
- If you are a member of External Infineon Team, you need to register a myInfineon account. To do so, go to infineon.com (opens in a new tab)> click myInfineon button on the top right > click Register for myInfineon from the drop down menu > register with your company email address.
- If you are a member of Infineon Team, you already have Infineon account as your Infineon email address
- Click the alpha site link https://ishare.extra.infineon.com/sites/PSoCEdgeE84AlphaSite/ (opens in a new tab) to request access, and please note your Infineon primary contact.
Code Examples for PSOC™ 6 and PSOC™ Edge
The following code examples are available for PSOC™ 6 AI Evaluation Kit in ModusToolbox™:
- DEEPCRAFT™ Studio Deploy Model: Audio (opens in a new tab)
- DEEPCRAFT™ Studio Deploy Model: Motion (opens in a new tab)
- DEEPCRAFT™ Studio Deploy Model: Radar (opens in a new tab)
The following code examples are available for PSOC™ Edge in ModusToolbox™:
- DEEPCRAFT™ Studio Deploy Model: Audio
- DEEPCRAFT™ Studio Deploy Model: Motion
You can access the code examples for PSOC™ Edge only if you have the Early Access Pack.
How to deploy the model onto the board?
Deploying the model using ModusToolbox™ consists of two parts:
- Create and build the project
- Flash and run the project
We will show how to deploy the model on PSoC™ 6 AI Evaluation Kit, similarly you can deploy the model on PSOC™ Edge.
Create and Build the project
-
Open ModusToolbox™ > Eclipse IDE for ModusToolbox™ from the Windows Start menu. The Eclipse IDE for ModusToolbox window appears.
-
Browse and select the workspace directory for your project and click Launch to open the ModusToolbox™ workspace.
-
Select New Application from the Quick Panel or navigate to File> New> Modus Toolbox™ Application to open the Project Creator Tool.
-
Expand the Kit Name PSoC™ 6 from the list and select the CY8CKIT-062S2-AI as BSP for your board and click Next. The Select Application window appears.
-
In Template Application, expand Machine Learning and select the required deploy code example and click Create.
-
After the project is created successful, navigate to the models directory and substitute the provided example model.c and model.h files with the actual model.c and model.h files that you have generated for your model.
-
Right-click the project and select Build Project or click Build Application in the Quick panel to build the project.
Flash and Run the project
-
Connect the USB port on the board with the PC using the USB cable.
-
In Quick Panel> Launches, click the program. The code is deployed on the board.