📘

SDK Version >= 0.1.7.3

Beta Feature

Calling project.get_label(name)

Arguments:

name, str
name_list, list, optional
schema_id, int, required

Name must be an exact match (case sensitive) to label name.

If a name_list is provided it will construct a list of objects that match that name.

Returns

None if not found.
File object of type Label if found.
List of File objects if a name_list is provided.

🚧

Use unique labels

When using advanced options, such as single_frame events, it's possible to have multiple labels with the same string name. We encourage use of unique label names.

Example of Passing label_file_list to Job

Motivation: We want to construct a job that uses only a subset of the project labels.
We want to do this using the SDK and also want to visually verify the labels are correct (ie not use the ids directly).

# SDK version >= 0.1.7.3
name_list = ["cat", "test", "third"]
label_file_list = project.get_label(name_list=name_list)
project.job.new(label_file_list=label_file_list)