edflow.iterators.batches module

Summary

Functions:

batch_to_canvas

convert batch of images to canvas

deep_lod2dol

Turns a list of nested dictionaries into a nested dictionary of lists.

load_image

make_batches

plot_batch

Save batch of images tiled.

save_image

Save image.

tile

Tile images for display.

Reference

edflow.iterators.batches.load_image(path)[source]
edflow.iterators.batches.save_image(x, path)[source]

Save image.

edflow.iterators.batches.tile(X, rows, cols)[source]

Tile images for display.

edflow.iterators.batches.plot_batch(X, out_path, cols=None)[source]

Save batch of images tiled.

edflow.iterators.batches.batch_to_canvas(X, cols=None)[source]

convert batch of images to canvas

edflow.iterators.batches.deep_lod2dol(list_of_nested_things)

Turns a list of nested dictionaries into a nested dictionary of lists. This function takes care that all leafs of the nested dictionaries are considered as full keys, not only the top level keys.

Note

The difference to deep_lod2dol() is, that the correct type is always checked not only at exceptions.

Parameters

list_of_nested_things (list) – A list of deep dictionaries

Returns

out – A dict containing lists of leaf entries.

Return type

dict

Raises

ValueError – Raised if the passed object is not a list or if its values are not dict s.

edflow.iterators.batches.make_batches(dataset, batch_size, shuffle, n_processes=8, n_prefetch=1, error_on_timeout=False)[source]