datumaro.plugins.data_formats.datumaro_binary.mapper.annotation#
Classes
Just clone MaskMapper. |
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.AnnotationMapper[source]#
Bases:
Mapper
- ann_type = 0#
- classmethod forward(ann: Annotation) bytes [source]#
Convert an object to bytes.
- classmethod backward(_bytes: bytes, offset: int = 0) Tuple[Annotation, int] [source]#
Build an object from bytes.
- static parse_ann_type(_bytes: bytes, offset: int = 0) AnnotationType [source]#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.LabelMapper[source]#
Bases:
AnnotationMapper
- ann_type = 1#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.MaskMapper[source]#
Bases:
AnnotationMapper
- ann_type = 2#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.RleMaskMapper[source]#
Bases:
MaskMapper
Just clone MaskMapper.
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PointsMapper[source]#
Bases:
_ShapeMapper
- ann_type = 3#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PolyLineMapper[source]#
Bases:
_ShapeMapper
- ann_type = 5#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PolygonMapper[source]#
Bases:
_ShapeMapper
- ann_type = 4#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.BboxMapper[source]#
Bases:
_ShapeMapper
- ann_type = 6#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.CaptionMapper[source]#
Bases:
AnnotationMapper
- ann_type = 7#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.Cuboid3dMapper[source]#
Bases:
AnnotationMapper
- ann_type = 8#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.EllipseMapper[source]#
Bases:
_ShapeMapper
- ann_type = 11#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.Cuboid2DMapper[source]#
Bases:
AnnotationMapper
- ann_type = 16#
- class datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.AnnotationListMapper[source]#
Bases:
Mapper
- backward_map = {AnnotationType.label: <bound method LabelMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.LabelMapper'>>, AnnotationType.mask: <bound method MaskMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.MaskMapper'>>, AnnotationType.points: <bound method PointsMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PointsMapper'>>, AnnotationType.polygon: <bound method PolygonMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PolygonMapper'>>, AnnotationType.polyline: <bound method PolyLineMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.PolyLineMapper'>>, AnnotationType.bbox: <bound method BboxMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.BboxMapper'>>, AnnotationType.caption: <bound method CaptionMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.CaptionMapper'>>, AnnotationType.cuboid_3d: <bound method Cuboid3dMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.Cuboid3dMapper'>>, AnnotationType.ellipse: <bound method EllipseMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.EllipseMapper'>>, AnnotationType.cuboid_2d: <bound method Cuboid2DMapper.backward of <class 'datumaro.plugins.data_formats.datumaro_binary.mapper.annotation.Cuboid2DMapper'>>}#
- classmethod forward(anns: List[Annotation]) bytes [source]#
Convert an object to bytes.