lisbet.datasets.map_style#

Map-style dataset for extracting windows of frames from records.

Classes

AnnotatedWindowDataset(records, window_size)

Map-style dataset for extracting labeled windows of frames from records.

WindowDataset(records, window_size[, ...])

Map-style dataset for extracting windows of frames from records.

class lisbet.datasets.map_style.WindowDataset(records, window_size, window_offset=0, fps_scaling=1.0, transform=None)[source]#

Map-style dataset for extracting windows of frames from records.

This dataset generates windows of frames from a collection of records. It is intended for inference (no labels, ordered windows) or as a base class for tasks requiring labeled windows (e.g., classification, regression). Windows can be centered, causal, or anticausal with respect to the reference frame, depending on the window_offset parameter. Padding and interpolation are applied as needed.

__init__(records, window_size, window_offset=0, fps_scaling=1.0, transform=None)[source]#

Initialize a WindowDataset instance.

Parameters:
  • records (list) – List of records containing the data.

  • window_size (int) – Size of the window in frames.

  • window_offset (int, optional) – Offset for the window in frames (default is 0).

  • fps_scaling (float, optional) – Scaling factor for the frames per second (default is 1.0).

  • transform (callable, optional) – A function/transform to apply to the data (default is None).

class lisbet.datasets.map_style.AnnotatedWindowDataset(records, window_size, window_offset=0, fps_scaling=1.0, transform=None, annot_format='multiclass')[source]#

Map-style dataset for extracting labeled windows of frames from records.

This dataset generates labeled windows of frames from a collection of records, suitable for evaluation or supervised learning tasks. It supports different label formats, including binary, multiclass, and multilabel, for various classification tasks. Labels are extracted according to the specified annotation format.

__init__(records, window_size, window_offset=0, fps_scaling=1.0, transform=None, annot_format='multiclass')[source]#

Initialize an AnnotatedWindowDataset instance.

Parameters:
  • records (list) – List of records containing the data.

  • window_size (int) – Size of the window in frames.

  • window_offset (int, optional) – Offset for the window in frames (default is 0).

  • fps_scaling (float, optional) – Scaling factor for the frames per second (default is 1.0).

  • transform (callable, optional) – A function/transform to apply to the data (default is None).

  • annot_format (str, optional) – Format of the labels. Valid options are ‘binary’, ‘multiclass’, or ‘multilabel’ for the respective classification tasks (default is ‘multiclass’).