examples.dataloader_simple module

Simple dataloader example without using datadings. The example prepares the included tinyset dataset, which is given in ./tinyset and in the form of imangenet’s folder structure. Afterwards crumpets TurboDataLoader is created and run through.

examples.dataloader_simple.main(show=True, wait_key=2000)[source]
examples.dataloader_simple.prepare_dataset(dsdir)[source]

We have to prepare our example dataset tinyset s.t. we have encoded images and labels. Crumpets default worker expect msgpack packed dictionaries. Thus we have to create an iterable of packed elements, which unpacked are of form: {‘image’: …, ‘label’: …}.

Parameters

dsdir – path to dataset directory

Returns

iterable of msgpack packed directories