Links

Labelproject

class Labelproject(object)

This namespace represents each lebeling projects in LABELING AI.

init()

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

repr()

Returns the Labeling AI's project ID as a printable format.
__repr__()

Return type

  • str

delete()

Deletes the project in Labeling AI corresponding to the user object.
delete()

Return type

  • None

get_labels()

Get each individual labels as a list form with their IDs.
get_labels()

Return type

  • list

get_labelclasses()

Returns self.labelclasses.
get_labelclasses()

Return type

  • list

get_labelfiles()

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

create_labelclass()

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

create_labelfile()

Uploads a new image file for labelling and add it to the current labeling project.
create_labelfile(data_file)

Parameters

  • data_file (str) : Name of the new file.

Return type

  • requests(dict)

create_custom_ai()

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)

autolabeling()

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)

export()

Exports the current labeling project.
export(is_get_image=False)

Parameters

  • is_get_image (Boolean) : Whether to get image or not when creating a new Asynctask object.

Return type

  • Asynctask object