class documentation

class BaseLoader(ABC):

Known subclasses: luxonis_ml.data.loaders.LuxonisLoader

View In Hierarchy

Base abstract loader class.

Implementations return samples in the loader output format used by Luxonis datasets.

Method __getitem__ Load a sample from the dataset.
Method __iter__ Iterate over the dataset.
Method __len__ Return the number of samples in the dataset.
@abstractmethod
def __getitem__(self, idx: int) -> LoaderOutput:

Load a sample from the dataset.

Parameters
idx:intIndex of the sample to load.
Returns
LoaderOutputSample data in loader output format.
def __iter__(self) -> Iterator[LoaderOutput]:

Iterate over the dataset.

Returns
Iterator[LoaderOutput]Iterator over loader outputs.
@abstractmethod
def __len__(self) -> int:

Return the number of samples in the dataset.

Returns
intNumber of samples.