tensorbay.label.basic¶
LabelType, SubcatalogBase.
LabelType is an enumeration type
which includes all the supported label types within Label.
Subcatalogbase is the base class for different types of subcatalogs,
which defines the basic concept of Subcatalog.
A subcatalog class extends SubcatalogBase and needed SubcatalogMixin classes.
- class tensorbay.label.basic.LabelType(value)[source]¶
Bases:
tensorbay.utility.type.TypeEnumThis class defines all the supported types within
Label.Examples
>>> LabelType.BOX3D <LabelType.BOX3D: 'box3d'> >>> LabelType["BOX3D"] <LabelType.BOX3D: 'box3d'> >>> LabelType.BOX3D.name 'BOX3D' >>> LabelType.BOX3D.value 'box3d'
- property subcatalog_type: Type[Any]¶
Return the corresponding subcatalog class.
Each label type has a corresponding Subcatalog class.
- Returns
The corresponding subcatalog type.
Examples
>>> LabelType.BOX3D.subcatalog_type <class 'tensorbay.label.label_box.Box3DSubcatalog'>
- class tensorbay.label.basic.SubcatalogBase(description: str = '')[source]¶
Bases:
tensorbay.utility.type.TypeMixin[tensorbay.label.basic.LabelType],tensorbay.utility.repr.ReprMixin,tensorbay.utility.attr.AttrsMixinThis is the base class for different types of subcatalogs.
It defines the basic concept of Subcatalog, which is the collection of the labels information. Subcatalog contains the features, fields and specific definitions of the labels.
The Subcatalog format varies by label type.
- Parameters
description – The description of the entire subcatalog.
- description¶
The description of the entire subcatalog.
- Type
str
- classmethod loads(contents: Dict[str, Any]) tensorbay.label.basic._T[source]¶
Loads a subcatalog from a dict containing the information of the subcatalog.
- Parameters
contents – A dict containing the information of the subcatalog.
- Returns
The loaded
SubcatalogBaseobject.