Skip to content


class Labelproject(object)

This namespace represents each lebeling projects in LABELING AI.


__init__(info, user)
  • Parmeters:
    • info (str): Information about the current labeling project corresponding to the object
    • user (str): User for creating, modifying, deleting the label project
  • Fields:
    • id: Project id.
    • workapp: Project workapp.
    • url: DS2 API url information.
    • user: User information
    • user_token: User token information
    • labelclasses: Label classes in the labeling projects


Returns the Labeling AI's project ID as a printable format

  • Return type:
    • str


Deletes the project in Labeling AI corresponding to the user object

  • Return type:
    • None


Get each individual labels as a list form with their ids

  • Return type:
    • list


Returns self.labelclasses

  • Return type:
    • list


Get each individual image files for labeling as a list form

get_labelfiles(sorting="created_at", tab="all", count=10, desc=False, searching="", workAssignee=None)
  • Parmeters:
    • sorting (str): sorting order, such as "created_at""
    • tab (str): "all" to get all the files
    • count (int): number of labelfiles to get
    • desc (Boolean): whether to add description or not
    • searching (str): specific status of the project
    • workAssignee (str or None): set workAssignee as the assignee's email if you want the specific labeling work of the corresponding assignee
  • Return type:
    • list


Creates a new label class and returns the new Labelclass object

create_labelclass(name, color="#000000")
  • Parameters:
    • name (str) : Label class's name
    • color (str) : Hex color code of the label
  • Return type:
    • Labelclass


Uploads a new image file for labelling and add it to the current labeling project

  • Parameters:
    • data_file (str) : name of the new file
  • Return type:
    • requests(dict)


creates a custom AI using the variables such as custom ai type and training column information

create_custom_ai(custom_ai_type="box", use_class_info={},
                valueForPredictColumnId=None, trainingColumnInfo={})
  • Parameters:
    • custom_ai_type (str): Labeling type, "polygon" or "box"
    • use_class_info (dict): Label class to use for Autolabeling
    • valueForPredictColumnId (int): Id of the column if the data is in csv format. Otherwise, None.
    • trainingColumnInfo (dict): Info of the training column as a dict
  • Return type:
    • requests(dict)


Starts auto-labeling with user's preferences as parameters

autolabeling(amount, ai_type="general", autolabeling_type="box", general_ai_type="person",
        model_id=None, custom_ai_stage=0, preprocessing_ai_type={}, labeling_class=None )
  • Parameters:
    • amount (int): Desired amount of auto-labeling.
    • ai_type (str): Auto-labeling AI type ("custom" or "general" or "inference").
    • autolabeling_type (str): Auto-labeling type ("box" or "polygon").
    • general_ai_type (str): None(when ai_type is "custom" or "inference") or general AI type(possible_values: 'person', 'animal', 'autonomous_driving', 'face_point detection','people_keypoints').
    • model_id (int): model's id, as shown at the end of url
    • custom_ai_stage (int)
    • preprocessing_ai_type (dict)
    • labeling_class (str)
  • Return type:
  • requests(dict)


Exports the current labeling project

  • Parameters: ~
    • is_get_image (Boolean): whether to get image or not when creating a new Asynctask object
  • Return type:
    • Asynctask object