otx.api.entities.metadata#

This module defines classes representing metadata information.

Classes

FloatMetadata(name, value[, float_type])

This class represents metadata of type float.

FloatType(value)

Represents the use of the FloatMetadata.

IMetadata()

This interface represents any additional metadata information which can be connected to an IMedia.

MetadataItemEntity(data[, model])

This class is a wrapper class which connects the metadata value to model, which was used to generate it.

VideoMetadata(video_id, frame_idx, ...)

This class represents metadata of video.

class otx.api.entities.metadata.FloatMetadata(name: str, value: float, float_type: FloatType = FloatType.FLOAT)[source]#

Bases: IMetadata

This class represents metadata of type float.

Parameters:
  • name (str) – Name of the metadata.

  • value (float) – Value of the metadata.

  • float_type (FloatType) – Type of the metadata.

class otx.api.entities.metadata.FloatType(value)[source]#

Bases: Enum

Represents the use of the FloatMetadata.

class otx.api.entities.metadata.IMetadata[source]#

Bases: object

This interface represents any additional metadata information which can be connected to an IMedia.

property name#

Gets or sets the name of the Metadata item.

class otx.api.entities.metadata.MetadataItemEntity(data: Any, model: ModelEntity | None = None)[source]#

Bases: object

This class is a wrapper class which connects the metadata value to model, which was used to generate it.

Parameters:
  • data (IMetadata) – The metadata value.

  • model (Optional[ModelEntity]) – The model which was used to generate the metadata. Defaults to None.

class otx.api.entities.metadata.VideoMetadata(video_id: str, frame_idx: int, is_empty_frame: bool)[source]#

Bases: IMetadata

This class represents metadata of video.

Parameters:
  • video_id (str) – id(name) for video.

  • frame_idx (int) – Index for frame.

  • is_empty_frame (bool) – whether this is empty frame(for action detection)

update(key: str, value: Any)[source]#

Update metadata infomation.