otx.api.serialization.label_mapper#
.This module contains the mapper for label related entities.
Functions
|
Returns json-serialized LabelSchemaEntity as bytes. |
Classes
This class maps a Color entity to a serialized dictionary, and vice versa. |
|
This class maps a LabelGroup entity to a serialized dictionary, and vice versa. |
|
This class maps a Label entity to a serialized dictionary, and vice versa. |
|
This class maps a LabelSchema entity to a serialized dictionary, and vice versa. |
|
This class maps a LabelTree entity to a serialized dictionary, and vice versa. |
- class otx.api.serialization.label_mapper.ColorMapper[source]#
Bases:
objectThis class maps a Color entity to a serialized dictionary, and vice versa.
- class otx.api.serialization.label_mapper.LabelGroupMapper[source]#
Bases:
objectThis class maps a LabelGroup entity to a serialized dictionary, and vice versa.
- static backward(instance: dict, all_labels: Dict[ID, LabelEntity]) LabelGroup[source]#
Deserializes from dict.
- static forward(instance: LabelGroup) dict[source]#
Serializes to dict.
- class otx.api.serialization.label_mapper.LabelMapper[source]#
Bases:
objectThis class maps a Label entity to a serialized dictionary, and vice versa.
- static backward(instance: dict) LabelEntity[source]#
Deserializes from dict.
- static forward(instance: LabelEntity) dict[source]#
Serializes to dict.
- class otx.api.serialization.label_mapper.LabelSchemaMapper[source]#
Bases:
objectThis class maps a LabelSchema entity to a serialized dictionary, and vice versa.
- static backward(instance: dict) LabelSchemaEntity[source]#
Deserializes from dict.
- static forward(instance: LabelSchemaEntity) dict[source]#
Serializes to dict.
- class otx.api.serialization.label_mapper.LabelTreeMapper[source]#
Bases:
objectThis class maps a LabelTree entity to a serialized dictionary, and vice versa.
- otx.api.serialization.label_mapper.label_schema_to_bytes(label_schema: LabelSchemaEntity) bytes[source]#
Returns json-serialized LabelSchemaEntity as bytes.