The visual modeling platform plug-in allows you to label training data, train common computer vision models, and deploy the models. It deeply optimizes the models that are used on mobile platforms. You can test the performance of a model on your mobile phone by scanning the QR code of the model. You can also deploy a model on your mobile device. This topic describes how to use a visual modeling platform plug-in to detect objects.
Prerequisites
- AutoLearning is authorized to access Object Storage Service (OSS). For more information, see OSS authorization.
- An instance of the object detection type is created. For more information, see Create instances.
- The image dataset for model training is uploaded to OSS and meets the requirements and specifications of optical character recognition (OCR). For more information, see Limits. We recommend that you use the graphical management tool ossbrowser to upload images in bulk. For more information, see Use ossbrowser.
Background information
Test data: Demo data of object detection
Limits
- Dataset requirements
- Image quality: The images are not damaged, and the resolution of the images must be higher than 30 pixels per inch (PPI). AutoLearning supports images in the JPG and JPEG formats.
- Data balance: We recommend that you balance the image quantity among image categories and include more than 50 images in each category.
- Generalization: The images are taken in real scenes from different perspectives.
- Dataset specifications
The images stored in OSS for model training must meet the preceding format requirements. your_image_dir refers to the folder that stores all the images for model training. The image labeling results are stored in the XML format that is supported by Pattern Analysis, Statistic Modelling, and Computational Learning (PASCAL) Visual Object Classes (VOC).|-- your_image_dir / | -- a.jpg | -- a.xml | -- b.png | -- b.xml | -- c.png ...
The following example describes the XML format:
In the preceding example, the following two objects are detected: dog and cat.<?xml version="1.0" encoding="utf-8"?> <annotation> <size> <width>1280</width> <height>720</height> <depth>3</depth> </size> <object> <name>dog</name> <bndbox> <xmin>549</xmin> <xmax>715</xmax> <ymin>257</ymin> <ymax>289</ymax> </bndbox> <truncated>0</truncated> <difficult>0</difficult> </object> <object> <name>cat</name> <bndbox> <xmin>842</xmin> <xmax>1009</xmax> <ymin>138</ymin> <ymax>171</ymax> </bndbox> <truncated>0</truncated> <difficult>0</difficult> </object> <segmented>0</segmented> </annotation>
Procedure
- Step 1: Create a dataset
Create a training dataset for object detection.
- Step 2: Label images
If unlabeled data exists, label it on the AutoLearning platform.
- Step 3: Create a task
Create a model training task.
- Step 4: View training details
You can view the training progress, node details, and training logs during model training.
- Step 5: Generate a mini program to test the model
You can use Alipay on your mobile phone to scan the QR code to test the model performance.
- Step 6: Deploy the model
The visual modeling platform plug-in is highly compatible with Elastic Algorithm Service (EAS) of Machine Learning Platform for AI (PAI). You can use the plug-in to deploy a model as a RESTful service with ease.
Step 1: Create a dataset
Step 2: Label images
If your dataset contains unlabeled images, you can label them on the AutoLearning platform.
- In the Dataset list section of the Data Preparation step, find the created dataset and click Labeling in the Operation column.
- On the Labeling tab, label all images and click Submit.
- Click Preview to view the labeling results.