Create a dataset

Updated at:

To create a labeling task, you must select a dataset. This topic describes how to create a dataset for data labeling and specifies the required dataset formats.

Prerequisites

  • You have activated Platform for AI (PAI) and created a workspace with your Alibaba Cloud account. Log on to the PAI console, select a region in the upper-left corner, and then complete the one-click authorization to activate the product.

  • You must store your annotation data in Object Storage Service (OSS), which requires that you:

    • You have activated OSS and created a bucket in the same region as your PAI workspace. For more information, see Console-based getting started.

    • You have obtained the endpoint for the region where your OSS bucket is located. For more information, see Regions and endpoints.

Procedure

  1. Go to Intelligent Annotation (iTAG).

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces, and then click the name of the workspace that you want to manage.

    3. In the left-side navigation pane, choose Data Preparation > iTAG.

  2. Click Upload Data. You are redirected to the Create Original Dataset dialog box on the Management Center > Asset Management page.

    Configure the following parameters:

    1. Enter a dataset name.

    2. Upload the dataset.

      • If you set Import Method to File:

        Item

        Method 1: Local Upload

        Method 2: OSS Upload

        Supported file extensions

        .csv, .xlsx, or .manifest.

        File format requirements

        A column in a .csv or .xlsx file must contain either the text to be labeled or the URLs for images, audio, or videos.

        Procedure

        1. Create a data file in the required format on your local machine.

        2. On the dataset creation page, configure the following key parameters:

          • Data import: Select Local Upload.

          • Import Format: Select File.

          • OSS Bucket: Select the created OSS bucket.

          • File Path in OSS: Select a file path in OSS.

        3. Click Upload File to upload the local data file.

        1. Prerequisite: The data file must be stored in OSS.

        2. On the dataset creation page, configure the following key parameters:

          • Import Data: Select OSS Upload.

          • Import Format: Select File.

          • Endpoint: Enter the endpoint for the region.

          • OSS Bucket: Select the created OSS bucket.

          • File Path in OSS: Select a file path in OSS.

        3. Click Authorization Check to verify access to the file path.

        Sample files

        textDemo1.manifest, textDemo2.csv

      • If you set Import Method to Folder:

        The following example uses images, but the procedure is the same for video and audio files.

        Item

        Method 1: Local Upload

        Method 2: OSS Upload

        Procedure

        1. Create a folder that contains image files on your local machine.

          • You can upload only a single folder. The system automatically reads data in subfolders.

          • Supported file types are image, video, and audio.

        2. On the dataset creation page, configure the following key parameters:

          • Data import: Select Local Upload.

          • Import Format: Select Folder.

          • OSS Bucket: Select the created OSS bucket.

          • File Path in OSS: Select a file path in OSS.

        • Click Upload Folder to upload the local folder.

        1. Upload the image files to OSS to generate OSS URLs. For more information, see Upload files.

        2. On the dataset creation page, configure the following key parameters:

          • Data import: Select OSS Upload.

          • Import Format: Select Folder.

          • Endpoint: Enter the endpoint for the region.

          • OSS Bucket: Select the created OSS bucket.

          • File Path in OSS: Select a file path in OSS.

        3. Click Authorization Check to verify access to the file path.

    3. After the dataset uploads, confirm the imported fields, including the Data Type and Dataset field name.

    4. Follow the prompts in the console to confirm the Data Security Level.

  3. Click Create.

FAQ

Q: How to migrate data from NAS or CPFS to OSS?

You can use a transit server and the ossutil tool to upload data to OSS. Follow these steps:

  1. Mount the Apsara File Storage NAS or Cloud Parallel File System (CPFS) data on a transit server, such as an Elastic Compute Service (ECS) instance.

  2. Use the ossutil tool to upload the data from the transit server to OSS.