datumaro.plugins.data_formats.datumaro.page_mapper#
Classes
|
Construct page maps for items and annotations from the JSON file, which are used for the stream importer. |
- class datumaro.plugins.data_formats.datumaro.page_mapper.DatumPageMapper(path: str)[source]#
Bases:
object
Construct page maps for items and annotations from the JSON file, which are used for the stream importer.
It also provides __iter__() to produce item and annotation dictionaries in stream manner after constructing the page map.
- property dm_format_version: str | None#
Parse “dm_format_version” section from the given JSON file using the stream json parser
- property media_type: MediaType | None#
Parse “media_type” section from the given JSON file using the stream json parser
- property ann_types: Set[AnnotationType] | None#
Parse “media_type” section from the given JSON file using the stream json parser
- class datumaro.plugins.data_formats.datumaro.page_mapper.AnnotationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
IntEnum
- unknown = 0#
- label = 1#
- mask = 2#
- points = 3#
- polygon = 4#
- polyline = 5#
- bbox = 6#
- caption = 7#
- cuboid_3d = 8#
- super_resolution_annotation = 9#
- depth_annotation = 10#
- ellipse = 11#
- hash_key = 12#
- feature_vector = 13#
- tabular = 14#
- rotated_bbox = 15#
- cuboid_2d = 16#
- class datumaro.plugins.data_formats.datumaro.page_mapper.Any(*args, **kwargs)[source]#
Bases:
object
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.
- datumaro.plugins.data_formats.datumaro.page_mapper.DatumPageMapperImpl#
alias of
DatumPageMapper
- class datumaro.plugins.data_formats.datumaro.page_mapper.MediaType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
IntEnum
- NONE = 0#
- MEDIA_ELEMENT = 1#
- IMAGE = 2#
- BYTE_IMAGE = 3#
- VIDEO_FRAME = 4#
- VIDEO = 5#
- POINT_CLOUD = 6#
- MULTIFRAME_IMAGE = 7#
- ROI_IMAGE = 8#
- MOSAIC_IMAGE = 9#
- TABLE_ROW = 10#
- property media: Type[MediaElement] | None#