Create a dataset
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
-
Go to Intelligent Annotation (iTAG).
-
Log on to the PAI console.
-
In the left-side navigation pane, click Workspaces, and then click the name of the workspace that you want to manage.
-
In the left-side navigation pane, choose Data Preparation > iTAG.
-
-
Click Upload Data. You are redirected to the Create Original Dataset dialog box on the Management Center > Asset Management page.
Configure the following parameters:
-
Enter a dataset name.
-
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
.csvor.xlsxfile must contain either the text to be labeled or the URLs for images, audio, or videos.Procedure
-
Create a data file in the required format on your local machine.
-
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.
-
-
Click Upload File to upload the local data file.
-
Prerequisite: The data file must be stored in OSS.
-
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.
-
-
Click Authorization Check to verify access to the file path.
Sample files
-
-
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
-
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.
-
-
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.
-
Upload the image files to OSS to generate OSS URLs. For more information, see Upload files.
-
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.
-
-
Click Authorization Check to verify access to the file path.
-
-
-
After the dataset uploads, confirm the imported fields, including the Data Type and Dataset field name.
-
Follow the prompts in the console to confirm the Data Security Level.
-
-
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:
-
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.
-
Use the ossutil tool to upload the data from the transit server to OSS.