tensorbay.label.basic

SubcatalogBase.

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.SubcatalogBase(description='')[source]

Bases: tensorbay.utility.repr.ReprMixin, tensorbay.utility.attr.AttrsMixin

This 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 (str) – The description of the entire subcatalog.

Return type

None

description

The description of the entire subcatalog.

Type

str

classmethod loads(contents)[source]

Loads a subcatalog from a dict containing the information of the subcatalog.

Parameters

contents (Dict[str, Any]) – A dict containing the information of the subcatalog.

Returns

The loaded SubcatalogBase object.

Return type

tensorbay.label.basic._T

dumps()[source]

Dumps all the information of the subcatalog into a dict.

Returns

A dict containing all the information of the subcatalog.

Return type

Dict[str, Any]