Skip to content

ds2ai.Labelclass

class Labelclass(object)

This namespace represents label classes for training data, such as in object detection and structured data's category classification

init()

__init__(info, user)
  • Parmeters:
    • info (dict) : information about the training data
    • user (class User): User object for making the data connector
  • Fields:
    • id: stores the id from the 'info' parameter
    • labelproject: stores the info of corresponding labeling project
    • url: stores the url as a string for connecting APIs to DS2.ai desktop application
    • user: stores the User object from the 'user' parameter
    • user_token: stores the user's appcode as a token

repr()

returns self.id

__repr__()
  • Return type:

modify()

modifies the name and color of a label class and returns the modified Labelclass object

modify(name=None, color=None)
  • Parmeters:
    • name (str) : name of the label class
    • color (str): hex code of the color that represents the label class
  • Return type: -

delete()

deletes the currenet Labelclass object

delete()
  • Return type:
    • None