Selecting Data

Select data and create a training dataset for subsequent model training.

Prerequisites

  • The cloud type recognition workflow allows you to deploy the service to edge devices with just a few clicks. If you want to deploy the service to edge devices, register Atlas 500 on the Huawei HiLens console in advance.
  • 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 cloud type 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

    The cloud type recognition workflow only supports recognition of a single label for one image.

    • Images with the same label must be stored in the same directory, and the label name is the directory name. If there are multiple levels of directories, the last level is used as the label name.

      In the following example, Cat and Dog are label names.

      dataset-import-example 
      ├─Cat 
      │      10.jpg 
      │      11.jpg 
      │      12.jpg 
      │ 
      └─Dog 
              1.jpg 
              2.jpg 
              3.jpg
    • If .txt files exist in the directory, the content in the .txt files is used as the image label. This mode is better than the previous one.

      In the following example, import-dir-1 and import-dir-2 are the imported subdirectories:

      dataset-import-example 
      ├─import-dir-1
      │      10.jpg
      │      10.txt    
      │      11.jpg 
      │      11.txt
      │      12.jpg 
      │      12.txt
      └─import-dir-2
              1.jpg 
              1.txt
              2.jpg 
              2.txt

      The following shows a label file for a single label, for example, the 1.txt file:

      Cat

      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 1.

Table 1 Parameters required for creating a dataset

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 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 > Image Classification.

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

After selecting the training dataset, click Next to go to step Train Model. For details, see Training a Model.