class LabelboxAnnotationAPI(foua.AnnotationAPI): (source)
Constructor: LabelboxAnnotationAPI(name, url, api_key, export_version, _experimental)
A class to facilitate connection to and management of projects in Labelbox.
On initialization, this class constructs a client based on the provided server url and credentials.
This API provides methods to easily upload, download, create, and delete projects and data through the formatted urls specified by the Labelbox API.
Additionally, samples and label schemas can be uploaded and annotations downloaded through this class.
Parameters | |
name | the name of the backend |
url | url of the Labelbox server |
api | the Labelbox API key |
export | the Labelbox export format and API version to use. Supported values are ("v1", "v2") |
Method | __init__ |
Undocumented |
Method | add |
Adds a member to the given Labelbox project with the given project-level role. |
Method | delete |
Deletes the given datasets from the Labelbox server. |
Method | delete |
Deletes the given project from the Labelbox server. |
Method | delete |
Deletes the given projects from the Labelbox server. |
Method | delete |
Deletes unused ontologies from the Labelbox server. |
Method | download |
Downloads the annotations from the Labelbox server for the given results instance and parses them into the appropriate FiftyOne types. |
Method | editor |
Undocumented |
Method | get |
Undocumented |
Method | get |
Retrieves the labelbox.schema.project.Project for the project with the given ID. |
Method | get |
Returns a list of users that are assigned to the given project. |
Method | launch |
Launches the Labelbox editor in your default web browser. |
Method | list |
Retrieves the list of datasets in your Labelbox account. |
Method | list |
Retrieves the list of projects in your Labelbox account. |
Method | project |
Undocumented |
Method | upload |
Uploads the media for the given samples to Labelbox. |
Method | upload |
Uploads the given samples to Labelbox according to the given backend's annotation and server configuration. |
Instance Variable | export |
Undocumented |
Property | attr |
Undocumented |
Property | attr |
Undocumented |
Property | base |
Undocumented |
Property | base |
Undocumented |
Property | projects |
Undocumented |
Property | roles |
Undocumented |
Method | _add |
Adds the labels in labels_dict to results. |
Method | _add |
Adds the video labels in frames_dict to results. |
Method | _build |
Undocumented |
Method | _build |
Returns the classifications for the given label field. Generally, the classification is a dropdown selection for given classes, but can be a text entry for scalars without provided classes. |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _convert |
Undocumented |
Method | _convert |
Undocumented |
Method | _create |
Creates radio attributes for all classes and formats all class-specific attributes. |
Method | _create |
Undocumented |
Method | _download |
Undocumented |
Method | _gather |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _merge |
Undocumented |
Method | _parse |
Undocumented |
Method | _process |
Undocumented |
Method | _setup |
Undocumented |
Method | _setup |
Undocumented |
Method | _setup |
Undocumented |
Method | _skip |
Undocumented |
Instance Variable | _api |
Undocumented |
Instance Variable | _client |
Undocumented |
Instance Variable | _experimental |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _protocol |
Undocumented |
Instance Variable | _roles |
Undocumented |
Instance Variable | _tool |
Undocumented |
Instance Variable | _url |
Undocumented |
Property | _ |
Undocumented |
Inherited from AnnotationAPI
:
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | close |
Closes the API session. |
Method | _prompt |
Undocumented |
Method | _prompt |
Undocumented |
Undocumented
Adds a member to the given Labelbox project with the given project-level role.
If the user is not a member of the project's parent organization, an email invitivation will be sent.
Parameters | |
project | the labelbox.schema.project.Project |
the email of the user | |
role | the role for the user. Supported values are ["LABELER", "REVIEWER", "TEAM_MANAGER", "ADMIN"] |
Deletes the given datasets from the Labelbox server.
Parameters | |
dataset | an iterable of dataset IDs |
progress:None | whether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead |
Deletes the given projects from the Labelbox server.
Parameters | |
project | an iterable of project IDs |
deleteFalse | whether to delete the attached batches as well |
Downloads the annotations from the Labelbox server for the given results instance and parses them into the appropriate FiftyOne types.
Parameters | |
results | a LabelboxAnnotationResults |
Returns | |
the annotations dict |
Retrieves the labelbox.schema.project.Project for the project with the given ID.
Parameters | |
project | the project ID |
Returns | |
a labelbox.schema.project.Project |
Returns a list of users that are assigned to the given project.
Provide either project or project_id to this method.
Parameters | |
project | a labelbox.schema.project.Project |
project | the project ID |
Returns | |
a list of labelbox.schema.user.User objects |
Launches the Labelbox editor in your default web browser.
Parameters | |
url:None | an optional URL to open. By default, the base URL of the server is opened |
Uploads the media for the given samples to Labelbox.
This method uses labelbox.schema.dataset.Dataset.create_data_rows() to add data in batches, and sets the global key of each DataRow to the ID of the corresponding sample.
Parameters | |
samples | a fiftyone.core.collections.SampleCollection
containing the media to upload |
dataset | the name of the Labelbox dataset created if data needs to be uploaded |
media | string field name containing the paths to media files on disk to upload |
Uploads the given samples to Labelbox according to the given backend's annotation and server configuration.
Parameters | |
samples | a fiftyone.core.collections.SampleCollection |
anno | the annotation key |
backend | a LabelboxBackend to use to perform the upload |
Returns | |
a LabelboxAnnotationResults |
Adds the labels in labels_dict to results.
results:
<label_field>: { <label_type>: { <sample_id>: { <label_id>: <fo.Label> or <label - for scalars> } } }
labels_dict:
{ <label_field>: { <label_type>: [<fo.Label>, ...] } }
Adds the video labels in frames_dict to results.
results:
<label_field>: { <label_type>: { <sample_id>: { <frame_id>: { <label_id>: <fo.Label> } or <label - for scalars> } } }
frames_dict:
{ <frame_id>: { <label_field>: { <label_type>: [<fo.Label>, ...] } } }
Returns the classifications for the given label field. Generally, the classification is a dropdown selection for given classes, but can be a text entry for scalars without provided classes.
Attributes are available for Classification and Classifications types in nested dropdowns.
Undocumented
Undocumented
Undocumented