wormpose.dataset.loaders.images_folder

Simple FramesDataset implementation reading image files from a folder

Only one video is supported (one folder of images)

class wormpose.dataset.loaders.images_folder.ImagesFolder(dataset_path: str, extension: str = '*.png')[source]

Simple loading images in memory from one folder (one video_name)

open(_)[source]

The frames of the dataset are accessed trough a context manager object, in this way we have the option of not entirely loading a big image array in memory if possible

Parameters

video_name – One video unique id (should be one value of video_names())

Returns

A context manager object that can be used with the “with” python statement giving access to the frames (array of images) of the dataset Example use : frames = open(“video0”)

video_names()[source]

A dataset is composed of several videos

Returns

A list of unique ids (string) identifying a video in the dataset