Selecting Data
Select data and create a training dataset for subsequent model training.
Prerequisites
- You have obtained permissions to access OBS. For details on how to obtain OBS permissions, see Obtaining the Access Key and Configuring ModelArts.
- You have created an OBS bucket and folder for storing data. The OBS bucket should be in the same region as ModelArts Pro. For details, see Creating an OBS Bucket.
- You have uploaded required data to OBS. See Requirements on Datasets for requirements on data and How Do I Upload Data to OBS for guide on how to upload data to OBS.
- You have created an application using the goods recognition workflow on the Vision Suite console. For details, see Creating an Application.
Requirements on Datasets
- Unlabeled datasets
Images must be stored in one directory, as shown in the following example.
├─dataset-import-example │ IMG_20180919_114732.jpg │ IMG_20180919_114745.jpg │ IMG_20180919_114945.jpg
- If data is imported from an OBS path, you must have the permission to read the OBS path.
- Images in JPG, JPEG, PNG, and BMP formats are supported.
- Labeled datasets
Labeled objects and their labeling files (in one-to-one relationship with the labeled objects) must be in the same directory. For example, if the name of the labeled object file is IMG_20180919_114745.jpg, the name of the labeling file must be IMG_20180919_114745.xml.
The labeling files must be in PASCAL VOC format. For details about the format, see Table 1.
Example:
├─dataset-import-example │ IMG_20180919_114732.jpg │ IMG_20180919_114732.xml │ IMG_20180919_114745.jpg │ IMG_20180919_114745.xml │ IMG_20180919_114945.jpg │ IMG_20180919_114945.xml
A labeling file example is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <annotation> <folder>NA</folder> <filename>bike_1_1593531469339.png</filename> <source> <database>Unknown</database> </source> <size> <width>554</width> <height>606</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>Dog</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <occluded>0</occluded> <polygon> <x1>100<x1> <y1>100<y1> <x2>200<x2> <y2>100<y2> <x3>250<x3> <y3>150<y3> <x4>200<x4> <y4>200<y4> <x5>100<x5> <y5>200<y5> <x6>50<x6> <y6>150<y6> </polygon> </object> <object> <name>Cat</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <occluded>0</occluded> <polygon> <x1>100<x1> <y1>100<y1> <x2>200<x2> <y2>100<y2> <x3>250<x3> <y3>150<y3> <x4>200<x4> <y4>200<y4> <x5>100<x5> <y5>200<y5> <x6>50<x6> <y6>150<y6> </polygon> </object> </annotation>
- Images in JPG, JPEG, PNG, and BMP formats are supported. The size of a single image cannot exceed 5 MB, and the total size of all images uploaded in one attempt cannot exceed 8 MB.
Table 1 PASCAL VOC format description Parameter
Mandatory
Description
folder
Yes
Directory where the data source is located
filename
Yes
Name of the file to be labeled
size
Yes
Image pixel
- width: image width. This parameter is mandatory.
- height: image height. This parameter is mandatory.
- depth: number of image channels. This parameter is mandatory.
segmented
Yes
Segmented or not
object
Yes
Object detection information. Multiple object{} functions are generated for multiple objects.
- name: class of the labeled object. This parameter is mandatory.
- pose: shooting angle of the labeled object. This parameter is mandatory.
- truncated: whether the labeled object is truncated (0 indicates that the object is not truncated). This parameter is mandatory.
- occluded: whether the labeled object is occluded (0 indicates that the object is not occluded). This parameter is mandatory.
- difficult: whether the labeled object is difficult to identify (0 indicates that the object is easy to identify). This parameter is mandatory.
- confidence: confidence score of the labeled object. The value range is 0 to 1. This parameter is optional.
- polygon: class of the bounding box. This parameter is mandatory. When labeling with the retail goods recognition workflow, this bounding box type (polygon) must be selected to label the goods. The labeling information indicates coordinates of each point, as shown in the following:
<x1>100<x1> <y1>100<y1> <x2>200<x2> <y2>100<y2> <x3>250<x3> <y3>150<y3> <x4>200<x4> <y4>200<y4> <x5>100<x5> <y5>200<y5> <x6>50<x6> <y6>150<y6>
- Images in JPG, JPEG, PNG, and BMP formats are supported. The size of a single image cannot exceed 5 MB, and the total size of all images uploaded in one attempt cannot exceed 8 MB.
Accessing the Application Development Page
- Method 1: Accessing the page for the first time
Create an application as described in Creating an Application based on a preset workflow. The Application Development page is directly displayed.
- Method 2: Accessing the page when you have created an application before
Log in to the ModelArts Pro > Vision Suite console. By default, the AppDev > Workbench page is displayed. Locate the target application and click View in the Operation column. The Application Development page is displayed.
Creating Training Datasets
Choose Application Development > Select Data. On the page that is displayed, click Create Dataset. On the Create Dataset page that is displayed on the right, set basic information about a dataset based on its storage location and labeling information and click OK. For details, see Table 2.
| Parameter | Description |
|---|---|
| Dataset | Name of a dataset to be created |
| Description | Dataset description |
| Upload Mode | Mode for uploading training data. Currently, data can only be uploaded to OBS. Therefore the default value is OBS. |
| Input Dataset Path | Location where training data is stored in OBS Click the text box on the right of Input Dataset Path. In the displayed dialog box, select an OBS bucket and folder, and click OK. |
| Output Dataset Path | Location where the dataset to be created is stored in OBS There is a default path for storing a dataset to be created. To modify it, click Modify on the right of Output Dataset Path. In the displayed dialog box, select an OBS bucket and folder, and click OK. |
After creating training datasets, select the training dataset required for application development.
Labeled data is required during model training. For uploaded datasets, you can
- Manually add or modify labels.
Click Label in the Operation column of the dataset. On the Dashboard page that is displayed, click Label in the upper right corner. On the displayed page, manually label data. For details, see Labeling Data > Object Detection.
When labeling data with the retail goods recognition workflow, the polygon bounding box must be used to label goods outline.
- Automatically label data.
Click Next. Create SKUs and automatically label data.
Viewing Label Parsing
After creating and selecting a training dataset, you can view the statistical data of label samples in the Label Parsing area. The horizontal axis indicates the labels, and the vertical axis indicates the number of valid samples corresponding to the label.
Follow-up Operations
On the Application Development > Select Data page, select a training dataset and label the data that is not labeled. You can manually label the data. Click Next to go to step Create SKU. For details, see Creating SKUs.
Last Article: Introduction
Next Article: Creating SKUs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.