tensorbay.dataset.dataset
Notes, DatasetBase, Dataset and FusionDataset.
Notes contains the basic information of a DatasetBase.
DatasetBase defines the basic concept of a dataset,
which is the top-level structure to handle your data files, labels and other additional information.
It represents a whole dataset contains several segments
and is the base class of Dataset and FusionDataset.
Dataset is made up of data collected from only one sensor
or data without sensor information.
It consists of a list of Segment.
FusionDataset is made up of data collected from multiple sensors.
It consists of a list of FusionSegment.
- class tensorbay.dataset.dataset.Notes(is_continuous=False, bin_point_cloud_fields=None)[source]
Bases:
tensorbay.utility.attr.AttrsMixin,tensorbay.utility.repr.ReprMixinThis is a class stores the basic information of
DatasetBase.- Parameters
is_continuous (bool) – Whether the data inside the dataset is time-continuous.
bin_point_cloud_fields (Optional[List[str]]) – The field names of the bin point cloud files in the dataset.
- Return type
None
- classmethod loads(contents)[source]
Loads a
Notesinstance from the given contents.- Parameters
contents (Dict[str, Any]) –
The given dict containing the dataset notes:
{ "isContinuous": <boolean> "binPointCloudFields": [ <array> or null <field_name>, <str> ... ] }
- Returns
The loaded
Notesinstance.- Return type
tensorbay.dataset.dataset._T
- class tensorbay.dataset.dataset.DatasetBase(name, gas=None, revision=None)[source]
Bases:
Sequence[tensorbay.dataset.dataset._T],tensorbay.utility.name.NameMixinThis class defines the concept of a basic dataset.
DatasetBase represents a whole dataset contains several segments and is the base class of
DatasetandFusionDataset.A dataset with labels should contain a
Catalogindicating all the possible values of the labels.- Parameters
name – The name of the dataset.
gas – The
GASclient for getting a remote dataset.revision – The revision of the remote dataset.
- property cache_enabled: bool
Whether the cache is enabled.
- Returns
Whether the cache is enabled.
- enable_cache(cache_path='')[source]
Enable cache when open the remote data of the dataset.
- Parameters
cache_path (str) – The path to store the cache.
- Return type
None
- keys()[source]
Get all segment names.
- Returns
A tuple containing all segment names.
- Return type
Tuple[str, …]
- class tensorbay.dataset.dataset.Dataset(name, gas=None, revision=None)[source]
Bases:
tensorbay.dataset.dataset.DatasetBase[tensorbay.dataset.segment.Segment]This class defines the concept of dataset.
Dataset is made up of data collected from only one sensor or data without sensor information. It consists of a list of
Segment.
- class tensorbay.dataset.dataset.FusionDataset(name, gas=None, revision=None)[source]
Bases:
tensorbay.dataset.dataset.DatasetBase[tensorbay.dataset.segment.FusionSegment]This class defines the concept of fusion dataset.
FusionDataset is made up of data collected from multiple sensors. It consists of a list of
FusionSegment.- create_segment(segment_name='default')[source]
Create a fusion segment with the given name.
- Parameters
segment_name (str) – The name of the fusion segment to create, which default value is an empty string.
- Returns
The created
FusionSegment.- Return type