Updated on 2022-11-24 GMT+08:00

Creating a Labeling Job

Create a labeling job based on a dataset.

dataset.create_label_task(self, task_name=None, task_type=None, **kwargs)

Sample Code

Example 1: Create an object detection labeling job based on an image dataset.
from modelarts.session import Session
from modelarts.dataset import Dataset

session = Session()
dataset = Dataset(session, dataset_id="VukxA2FlaTUm7tkDtq0") # Initialize the dataset.
create_task_resp = dataset.create_label_task(task_name="obj_detection_task", task_type=1, description="label task")

Parameters

Table 1 Request parameters

Parameter

Mandatory

Type

Description

task_name

Yes

String

Name of a labeling job

task_type

Yes

Integer

Type of a labeling job. Options:
  • 0: image classification
  • 1: object detection
  • 3: image segmentation
  • 100: text classification
  • 101: named entity recognition
  • 102: text triplet
  • 200: sound classification
  • 201: speech content
  • 202: speech paragraph labeling
  • 400: table dataset
  • 600: video labeling
  • 900: custom format

description

No

String

Description of a labeling job