Intel® Smart Edge Open with ThunderSoft ModelFarm* Deployment

ID 768988
Updated 2/15/2023
Version Latest
Public

author-image

By

Overview

Use a low code device AI development platform with Intel® Smart Edge Open. Features include low threshold (full UI operation), low data requirements (enriching pre-training models), high efficiency (semi-automatic labeling), high performance (model pruning and compression), and high precision (Quantization Aware Training and Knowledge Distillation). 

ModelFarm* includes two functional modules: data management and model management.  

  • Data management includes data cleaning, data labeling, and data analysis.  
  • Model management includes model training, model optimization, model evaluation, model transformation (target operation platform), and algorithm SDK export. 

Use the exported AI algorithm SDK to deploy on your edge device and inference AI for your use case. Use cases include:  

  • Object detection, such as helmet detection, facemask detection, area intrusion detection, defect inspection etc. 
  • Behavior analysis, such as Driver Monitor System (DMS). 
  • Environment monitoring, such as bright kitchen and stove, restaurant use transparent video, and other methods to show the public the process of catering services in kitchens.

To run the reference implementation, you will need to first download and install the Intel® Smart Edge Open Developer Experience Kit

  • Time to Complete:  20 minutes
  • Programming Language:  C, C++

Target System Requirements

Edge Server: 

  • One of the following processors. 
    • Intel® Xeon® Scalable processor. 
    • Intel® Xeon® D processor. 
  • At least 128 GB RAM. 
  • At least 4T GB hard drive. 
  • GPU RTX3090 or V100 or A100 
  • Ubuntu* 20.04 LTS Server. 
  • An Internet connection.   

AI Box: 

  • 6th generation or higher Intel® Core™ processors. 
  • At least 4 GB RAM.   
  • At least 10 GB hard drive.   
  • Ubuntu* 18.04 / Ubuntu* 20.04. 
  • An Internet connection.   
  • OpenVINO™ toolkit
  • OpenCV  

How It Works

Upload the dataset from the camera or local video mp4 file to the ModelFarm platform and complete the model training. 

The following algorithms are supported for training: 

  • Object detection 
  • Image classification 
  • Image segmentation 
  • Face key point detection 
  • Human body key point detection 

Deploy the completed training model SDK to the edge equipment. The camera transmits the real-time video stream to the edge device for inference by the edge AI application. The AI inference results will be transmitted to your supervision platform or visualization monitor in real-time.

A complex architecture diagram showing the steps from Camera monitoring to the Edge Box.
Figure 1: Deployment Architecture Diagram

 

A complex block diagram showing the components of the software.
Figure 2: Software Architecture Diagram

Get Started 

Edge Server Side Installation

  1. To run the reference implementation, you will need to first download and install the Intel® Smart Edge Open Developer Experience Kit
  2. After you install Intel® Smart Edge Open Developer Experience Kit, contact ThunderSoft to install ModelFarm as it is a licensed software.  
  3. This reference implementation provides a server that already installed ModelFarm. Log into https://aiplatform.thundersoft.com/user/login for information on how to use ModelFarm.    

Register Account

Log into https://aiplatform.thundersoft.com/user/login

  1. Select the Create Account button to enter the registration page.
     
  2. Enter your E-mail (ID) and basic information. Select Next and the verification code will be sent to the registered email. 
  3. Check the verification code from the email and fill it in for verification. If the email does not have the verification code, select the option to send the verification code again after 60 seconds. 

Accept Invitation to Register

  1. Select the Join button to enter the invitation registration page.
     
  2. Enter the basic information and select the Create button. 
  3. Check the agreement and select the Join button to enter the Welcome page. 
  4. If you have registered an account, directly select the Sign in button to log in. 
  5. If you have joined the organization through the above email, select Join again, and the following information will be prompted. 

Create Dataset

  1. Select the Create Dataset button to create a new dataset.
     
  2. Select the model card to view the version details. 
  3. Select the Create New Version button to inherit or create the existing data version. 
  4. If the inheritance history version is closed, it is a new dataset Version (no dataset version is inherited). 

Upload Data and Label

  1. Select the Local Data Upload button to upload local data.
     
  2. Select the Label button to enter the label page. 

Create a New Model

  1. Select the Create a New Model button to create the number model card.
     
  2. Enter the basic information and select Next to select the pre-train model. 

Train the Model

  1. Select the Create button to create the model training task.
     
  2. Select a version to inherit. 
  3. Select the data set version for model training. 

Create a Quantization Aware Training (QAT) Task

  1. Select the QAT button to create a quantitative training task.
     
  2. After the parameter configuration is completed, select the dataset. 

Create Knowledge Distillation Task

  1. Select the KD button to create knowledge distillation task.
     
  2. After the parameter configuration is completed, select the dataset. 
  3. Create and generate a teacher model. 
  4. When a teacher model is obtained from training, kd training can be started based on the teacher model. 

Create Validation Task

  1. Select Validation button to create validation task.
     
  2. Enter validation basic information and select the dataset. 
  3. View the comparison of ground truth and inference result. 

Complete a Test

  1. Select images for test and view the test result.
     
  2. Select a video file for test and view the test result. 

Download

  1. Select the Download button.
     
  2. Select Intel OpenVino to download.

Edge AI Box Demo 

You can run an edge application demo on the Edge AI Box. For a real case, you can train an object detection model downloaded from ModelFarm.  

  1. Install the downloaded < ts_ai_demo.deb > package. This package already includes a training model and dataset. You can download from Configure & Download.

Install the Reference Implementation 

Select Configure & Download to download the reference implementation and then follow the below steps to install it. 

Configure & Download 

  1. Open a new terminal, go to the downloaded folder and move the downloaded zip package to /home/<non-root-user> folder.  
    mv <path-of-downloaded-directory>/ts_ai_demo.deb /home/<non-root-user>
  2.  Go to the /root directory of the non-root user using the following command to install the package: 
    cd /home/<non-root-user>  
    sudo dpkg -i ts_ai_demo.deb 
    
  3. Go to the /opt/ts/demo directory using the following command:  
    cd  /opt/ts/demo
  4. Execute the command below to run the demo: 
    ./run.sh
     
  5. You will see the following images during the demo. An image of the demo running: there is bunch of bananas, an orange, and two apples with bounding boxes surrounding them.

How to Use the New Training Model (Optional)

You must follow Edge AI Box demo step to make sure you can successfully run the demo. Then use your training model generated by ModelFarm and download it on the Edge AI Box to run your model inference application with the following steps.

  1. Download the trained model from ModelFarm. Unzip the package name3_OPENVINO_FP32_V2.0_L.zip. All the info will be unzipped into the folder name3_OPENVINO_FP32_V2.0_L. 
  2. Move xxx.onnx and Readme.txt  file   to the folder /opt/ts/demo, using the command below: 

    mv xxx.onnx /opt/ts/demo 
    mv Readme.txt /opt/ts/demo

     

  3. Copy the new file Readme.txt to label.txt, then modify label.txt using the command below: 
    cp Readme.txt label.txt
  4.  Modify file /opt/ts/demo/config.json. Use the command
    cp Readme.txt label.txt 
    vi label.txt 
      

    =================================================== 
    Before: 

    // *******       Label Info     ******* // 

    //***** ID *****  Label Name *****// 

              1       banana 
              2       orange 
              3       apple 

    After: 

    banana 

    orange 

    apple 

    ===================================================

  5. Modify file /opt/ts/demo/config.json, use the command vi /opt/ts/demo/config.json .
  6. Change “"ie-file":"1587724663042211840.onnx",” replace 1587724663042211840.onnx to your xxx.onnx file name. 
  7. Change “"label-path":"./fruit_list.txt",” replace fruit_list.txt to your label file (label.txt).  
  8. Change  "video-url":"fruits.mp4", replace “fruits.mp4” to your local mp4 file name. 
    • The mp4 video format should be 1920*1080.  

Note: This also supports RTSP video stream. Replace fruits.mp4 with RTSP video stream address.

After making the above modification, run the command ./run.sh under the folder /opt/ts/demo to see your demo.


Summary and Next Steps 

You have successfully learned how to use ModelFarm to generate an SDK algorithm and how to infer AI applications on the Edge AI Box. 

As a next step, you can train your own AI model by ModelFarm and download the SDK algorithm on the Edge AI Box, then infer with your local video or RTSP video stream.


Learn More 

To continue learning, see the following guides and software resources: 


Troubleshooting 

If the demo failed, check whether or not your system has Ubuntu 20.04 installed. Install Ubuntu 20.04 if it is not present on your system.

Check all the lib files under the folder. Reinstall xxx.deb if you are able.

Support Forum 

If you're unable to resolve your issues, contact the Support Forum.