Skip to main content

_AnnotationMetadata Objects

Contains metadata information about an annotation (on a frame or a range)

created_by

None defaults to the user of the SDK once uploaded to the server.

last_edited_by

None defaults to the user of the SDK once uploaded to the server.

from_dict

Create a AnnotationInfo instance from a dictionary. Arguments:
  • d - A dictionary containing information about the annotation.
Returns:
  • AnnotationInfo - An instance of AnnotationInfo.

update_from_optional_fields

Update the AnnotationInfo fields with the specified values. Arguments:
  • created_at - Optional creation time.
  • created_by - Optional creator identifier.
  • last_edited_at - Optional last edited time.
  • last_edited_by - Optional last editor identifier.
  • confidence - Optional confidence value.
  • manual_annotation - Optional manual annotation flag.
  • reviews - Optional list of reviews.
  • is_deleted - Optional deleted flag.

_Annotation Objects

Class providing common annotation properties.

frame

int: Gets the frame number. Notes: This is a legacy attribute. For new subclasses where frame is not applicable (e.g. audio and text), this returns 0.

space

Get the space that this annotation is on.

created_at

Get the creation timestamp of the annotation.

created_at

Set the creation timestamp of the annotation.

created_by

Get the email of the user who created the annotation.

created_by

Set the creator email. None defaults to the current SDK user. Arguments:
  • created_by - User email or None to default to SDK user.
Raises:
  • ValueError - If the email format is invalid.

last_edited_at

Get the last edited timestamp of the annotation.

last_edited_at

Set the last edited timestamp of the annotation.

last_edited_by

Get the email of the user who last edited the annotation.

last_edited_by

Set the last editor email. None defaults to the current SDK user. Arguments:
  • last_edited_by - User email or None to default to SDK user.
Raises:
  • ValueError - If the email format is invalid.

confidence

Get the confidence score of the annotation.

confidence

Set the confidence score of the annotation.

manual_annotation

Get whether this annotation was created manually.

manual_annotation

Set whether this annotation was created manually.

_ObjectAnnotation Objects

Represents an object annotation on a Space. Provides access to annotation metadata for a SpaceObject.

object_hash

Get the hash of the object instance.

coordinates

coordinates: Gets the frame number. Notes: This is a legacy attribute. For new subclasses where coordinates are not applicable, do not use this attribute. Instead, use .ranges instead (e.g. for audio or text spaces)

_ClassificationAnnotation Objects

Represents a classification annotation on a Space. Allows setting or getting annotation data for the Classification.

classification_hash

Get the hash of the object instance.