.initialise_labels()
first. To upload your added labels, call :meth:.save()
.
Optional[str]
- The label row hash or None if not set.str
- The branch name.str
- The data row hash.str
- The dataset hash.str
- The dataset title.str
- The data row title.DataType
- The data type.workflow documentation <tutorials/workflows:Workflows>
for more details.
Returns:
LabelStatus
- The current labeling status.WrongProjectTypeError
- If used with workflow-based projects.workflow documentation <tutorials/workflows:Workflows>
for more details.
Returns:
AnnotationTaskStatus
- The current annotation task status.WrongProjectTypeError
- If used with workflow-based projects.Optional[WorkflowGraphNode]
- The workflow graph node or None if not set.bool
- True if the label row is shadow data, False otherwise.Optional[datetime]
- The creation date or None if not yet created.Optional[datetime]
- The last edited date or None if not yet edited.int
- The number of frames.Optional[float]
- The duration or None if not applicable.Optional[float]
- The fps or None if not applicable.None
for DICOM series or image groups created without performance optimisations, as there is no single underlying
file for these data types.
This property will contain a signed URL if :meth:.initialise_labels
was called with include_signed_url=True
.
Returns:
Optional[str]
- The data link or None if not applicable.None
for image groups without performance optimisation, as there is no single underlying width
for this data type.
Returns:
Optional[int]
- The width or None if not applicable.None
for image groups without performance optimisation, as there is no single underlying height
for this data type.
Returns:
Optional[int]
- The height or None if not applicable.Optional[str]
- The codec or None if not applicable.Optional[int]
- The sample rate or None if not applicable.Optional[int]
- The bit depth or None if not applicable.Optional[int]
- The number of channels or None if not applicable.Optional[UUID]
- The backing storage item id or None if not found.Optional[UUID]
- The workflow task uuid or None if not applicable.WrongProjectTypeError
- If used with non-workflow-based projects.Optional[float]
- The workflow priority or None if not applicable.WrongProjectTypeError
- If used with non-workflow-based projects.True
if the labels have correct structure and match the project ontology.
If it is False
, then loading the labels via LabelRowV2
will raise an error, and the label editor
will not be able to load the labels.
You can call :meth:.get_validation_errors
to get the validation error messages.
Returns:
bool
- True if the labels are valid, False otherwise.bool
- True
if labelling is initialized, False
otherwise.
If this is False
, call the :meth:.initialise_labels
method to read or write specific
ObjectInstances or ClassificationInstances.
LabelStatus.LABEL_IN_PROGRESS
.
Arguments:
include_object_feature_hashes
- If None
, all objects will be included. Otherwise,
only objects with the specified feature hashes will be included.WARNING
- Use this filter only for reading labels. Saving a filtered subset will
delete all other object instances stored in the Encord platform.include_classification_feature_hashes
- If None
, all classifications will be included.
Otherwise, only classifications with the specified feature hashes will be included.WARNING
- Use this filter only for reading labels. Saving a filtered subset will
delete all other classification instances stored in the Encord platform.include_reviews
- Whether to request read-only information about the reviews of the label row.overwrite
- If True
, overwrite current labels with those stored in the Encord server.
If False
and the label row is already initialized, this function will raise an error.bundle
- If not provided, initialization is performed independently. If provided,
initialization is delayed and performed along with other objects in the same bundle.include_signed_url
- If True
, the :attr:.data_link
property will contain a signed URL.
See documentation for :attr:.data_link
for more details.label_row_dict
- The dictionary of all labels in the Encord format.frame_number
- The frame number.Optional[str]
- The image hash if the frame number is within bounds, None
otherwise.LabelRowError
- If this function is used for non-image data types.image_hash
- The image hash.Optional[int]
- The frame number if the image hash is found, None
otherwise.LabelRowError
- If this function is used for non-image data types.bundle
- If not provided, save is executed immediately. If provided, save is executed
as part of the bundle.validate_before_saving
- Enable stricter server-side integrity checks. Default is False
.Optional[DICOMSeriesMetadata]
- Metadata for the data type, or None
if not supported.
Currently only supported for DICOM. Returns None
for other formats.
Label row needs to be initialized before using this property.
frame
- Either the frame number or the image hash if the data type is an image or image group.
Defaults to the first frame.FrameView
- A view of the specified frame.frame
- The frame number or the image hash. Defaults to the first frame.FrameViewMetadata
- Metadata for the specified frame or image hash.LabelRowError
- If the specified frame or image hash is not found in the label row.List[FrameViewMetadata]
- A list of metadata for each frame.List[FrameView]
- A list of frame views in order of available frames.filter_ontology_object
- Optionally filter by a specific ontology object.filter_frames
- Optionally filter by specific frames.List[ObjectInstance]
- A list of ObjectInstance
s that match the filters.object_instance
- The object instance to add.force
- If True
, overwrites the current objects; otherwise, it will replace the current object.LabelRowError
- If the object instance is already part of another LabelRowV2.classification_instance
- The classification instance to add.force
- If True
, overwrites the current objects; otherwise, it will replace the current object.LabelRowError
- If the classification instance is already part of another LabelRowV2 or has overlapping frames.classification_instance
- The classification instance to remove.filter_ontology_classification
- Optionally filter by a specific ontology classification.filter_frames
- Optionally filter by specific frames.List[ClassificationInstance]
- All the ClassificationInstance
s that match the filter.object_instance
- The object instance to remove..save()
function.
Returns:
Dict[str, Any]: A dictionary representing the label row in Encord format.
Workflow <tutorials/workflows:Workflows>
feature, and will raise an error for pre-workflow projects.
Arguments:
bundle
- Optional parameter. If passed, the method will be executed in a deferred way as part of the bundle..initialise_labels()
was called at least once, and
consequentially the “label_hash” field is not None
. Labels need not be initialised every time the
workflow_complete() method is called.
This method is only relevant for the projects that use the :ref:Workflow <tutorials/workflows:Workflows>
feature, and will raise an error for projects that don’t use Workflows.
Arguments:
bundle
- Optional parameter. If passed, the method will be executed in a deferred way as part of the bundle.LabelRowError
- If the label hash is None.priority
- Float value from 0.0 to 1.0, where 1.0 is the highest priority.bundle
- Optional parameter. If passed, the method will be executed in a deferred way as part of the bundle.WrongProjectTypeError
- If the project is not a workflow-based project.None
.
str
- The image hash.int
- The frame number.str
- The image hash.LabelRowError
- If the data type is not IMAGE or IMG_GROUP.str
- The image title.LabelRowError
- If the data type is not IMAGE or IMG_GROUP.str
- The file type.LabelRowError
- If the data type is not IMAGE or IMG_GROUP.int
- The frame number.int
- The width of the image or image group.LabelRowError
- If the width is not set for the data type.int
- The height of the image or image group.LabelRowError
- If the height is not set for the data type.Optional[str]
- The data link, or None
if not available.LabelRowError
- If the data type is not IMAGE or IMG_GROUP.Optional[DICOMSliceMetadata]
- The metadata for the frame, or None
if not applicable.None
for other formats.
object_instance
- The object instance to add.coordinates
- The coordinates for the object instance.overwrite
- Whether to overwrite existing instance data (default is False).created_at
- Optional creation timestamp.created_by
- Optional creator identifier.last_edited_at
- Optional last edited timestamp.last_edited_by
- Optional last editor identifier.confidence
- Optional confidence score.manual_annotation
- Optional flag indicating manual annotation.LabelRowError
- If the object instance is already assigned to a different label row.classification_instance
- The classification instance to add.overwrite
- Whether to overwrite existing instance data (default is False).created_at
- Optional creation timestamp.created_by
- Optional creator identifier.confidence
- Confidence score (default is DEFAULT_CONFIDENCE).manual_annotation
- Flag indicating manual annotation (default is DEFAULT_MANUAL_ANNOTATION).last_edited_at
- Optional last edited timestamp.last_edited_by
- Optional last editor identifier.LabelRowError
- If the classification instance is already assigned to a different label row.filter_ontology_object
- Optionally filter by a specific ontology object.List[ObjectInstance]
- All ObjectInstance
s that match the filter.filter_ontology_classification
- Optionally filter by a specific ontology classification.List[ClassificationInstance]
- All ClassificationInstance
s that match the filter.image_hash
- Hash of the image.image_title
- Title of the image.file_type
- Type of the file (e.g., JPEG, PNG).frame_number
- The number of the frame in the sequence.width
- Width of the image.height
- Height of the image.data_link
- Optional link to additional data related to the image.index
- Index of the image.title
- Title of the image.file_type
- Type of the file (e.g., JPEG, PNG).height
- Height of the image.width
- Width of the image.image_hash
- Hash of the image.label_hash
- Optional hash for the label. None
if not initialized for labeling.created_at
- Optional creation timestamp. None
if not initialized for labeling.last_edited_at
- Optional last edited timestamp. None
if not initialized for labeling.data_hash
- Hash of the data.data_type
- Type of the data (e.g., IMAGE, VIDEO).label_status
- Status of the label.annotation_task_status
- Optional status of the annotation task.workflow_graph_node
- Optional workflow graph node related to the data.is_shadow_data
- Boolean indicating if the data is shadow data.number_of_frames
- Number of frames in the data.duration
- Optional duration of the video or sequence.fps
- Optional frames per second for video.dataset_hash
- Hash of the dataset.dataset_title
- Title of the dataset.data_title
- Title of the data.audio_codec
- Codec for audio data.audio_bit_depth
- Bit depth for audio data.audio_sample_rate
- Sample Rate for audio data.audio_num_channels
- Number of channels for audio data.width
- Optional width of the data.height
- Optional height of the data.data_link
- Optional link to additional data.task_uuid
- Optional task uuid of the data.priority
- Optional priority of the data.file_type
- Optional file type of the data.client_metadata
- Optional metadata provided by the client.images_data
- Optional list of image data entries.branch_name
- Name of the branch associated with the data.frame_level_data
- Mapping from frame number to frame level data.image_hash_to_frame
- Mapping from image hash to frame number.frame_to_image_hash
- Mapping from frame number to image hash.is_valid
- Boolean indicating if the data is valid.assigned_user_email
- Optional email of the user assigned to the data.last_actioned_by_user_email
- Optional email of the user who last actioned the data.