AnnotationInfo

class AnnotationInfo(image_id, image_name, annotation, created_at, updated_at, dataset_id=None)[source]

Bases: NamedTuple

Basic annotation information for an image (IDs, timestamps, and raw annotation JSON).

Create new instance of AnnotationInfo(image_id, image_name, annotation, created_at, updated_at, dataset_id)

Methods

count

Return number of occurrences of value.

index

Return first index of value.

to_json

Convert AnnotationInfo to JSON format.

Attributes

annotation

Alias for field number 2

created_at

Alias for field number 3

dataset_id

Alias for field number 5

image_id

Alias for field number 0

image_name

Alias for field number 1

updated_at

Alias for field number 4

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

to_json()[source]

Convert AnnotationInfo to JSON format.

Returns:

AnnotationInfo in JSON format.

Return type:

Dict[str, Any]

annotation

Alias for field number 2

created_at

Alias for field number 3

dataset_id

Alias for field number 5

image_id

Alias for field number 0

image_name

Alias for field number 1

updated_at

Alias for field number 4