rofunc.utils.datalab.data_sampler.holders#
Data processing class for synchronisation and re-sampling of data. /!This is very much a work in progress. /! /!Unstable when accessing the data in funkyway because all the data holders are designed to keep as little data as possible in memory /! Known limitations: - The re-sampling is only done by ignoring or copying samples. It would be nice to add interpolation methods - The re-sampling is done in a for loop. A bit slow, can be improved.
Code structure: - MultiModalDataHandler: class to handle multiple data streams. Interface with the data.
MultiModalDataHandler is ‘fed’ DataHolders. DataHolders deal with the specificities of each data sources. DataHolders must inherit from DataHolder.
XSensorDataHolder: class to handle data from XSens sensor.
OptitrackDataHolder: class to handle data from Optitrack.
RGBDDatasetDataHolder: class to handle data from Zed2i.
Author: Donatien Delehelle (donatien.delehelle[at]iit.it)
1. Module Contents#
1.1. Classes#
Class to hold data for each frame |
|
Class to handle multimodal data collection. |
1.2. API#
- class rofunc.utils.datalab.data_sampler.holders.DataHolder[source]#
Bases:
objectClass to hold data for each frame
Initialization
- property sampled_data#
- class rofunc.utils.datalab.data_sampler.holders.RGBDDataHolder(root_path, show_color=True, stat_clean=True, depth_trunc=3500, size=(1920, 1080), tshift=0)[source]#
- class rofunc.utils.datalab.data_sampler.holders.XsensDataHolder(root_path, transform=None)[source]#
Bases:
rofunc.utils.datalab.data_sampler.holders.DataHolder- property sampled_data#
- class rofunc.utils.datalab.data_sampler.holders.OptitrackDataHolder(meta=None, labels=None, data=None)[source]#
Bases:
rofunc.utils.datalab.data_sampler.holders.DataHolder- property sampled_data#
- class rofunc.utils.datalab.data_sampler.holders.MultimodalDataHandler(tstep: int = None, tstart: int = None, tstop: int = None, data_holders: List[rofunc.utils.datalab.data_sampler.holders.DataHolder] = None, interpolate: str = 'repeat')[source]#
Bases:
objectClass to handle multimodal data collection.
- Attributes:
tstep (int): Time step between each data point. tstart (int): Start time of the shared data time serie. tstop (int): Stop time of the shared data time serie.
Initialization
- property sampled_data#
- update_bounds()[source]#
Update the ticks attribute of the handler.
- Args:
force (bool, optional): Force the update of the ticks. Defaults to False.
- add_data()[source]#
Add new data series to the handler. Adding a data serie will update the time boundaries of the handler. You can set custom boundaries when loading the data.
- sample(bounds: Tuple[int, int] = None, tstep=None, interpolate: str = None)[source]#
Get the data from the data series.
- Args:
bounds (Tuple[int, int], optional): Time bounds of the data to load. Defaults to None, which means all the data will be loaded.
Returns: