tensorbay.dataset.frame¶
Frame.
Frame
is a concept in FusionDataset
.
It is the structure that composes a FusionSegment
,
and consists of multiple Data
collected at the same time
from different sensors.
- class tensorbay.dataset.frame.Frame(frame_id: Optional[ulid.ulid.ULID] = None)[source]¶
Bases:
tensorbay.utility.user.UserMutableMapping
[str
,DataBase._Type
]This class defines the concept of frame.
Frame is a concept in
FusionDataset
.It is the structure that composes
FusionSegment
, and consists of multipleData
collected at the same time corresponding to different sensors.Since
Frame
extendsUserMutableMapping
, its basic operations are the same as a dictionary’s.To initialize a Frame and add a
Data
to it:frame = Frame() frame[sensor_name] = Data()
- classmethod loads(contents: Dict[str, Any]) tensorbay.dataset.frame._T [source]¶
Loads a
Frame
object from a dict containing the frame information.- Parameters
contents –
A dict containing the information of a frame, whose format should be like:
{ "frameId": <str>, "frame": [ { "sensorName": <str>, "remotePath" or "localPath": <str>, "timestamp": <float>, "label": {...} }, ... ... ] }
- Returns
The loaded
Frame
object.