wormpose.dataset.features

This module deals with loading features from a dataset.

It will calculate extra features such as the worm length.

wormpose.dataset.features.calculate_crop_window_size(features: Dict[str, wormpose.dataset.features.Features]) Tuple[int, int][source]

Returns an image shape that is just big enough to view the worm object, the image will be cropped (or expanded) to that size as an input to the neural network Can be overriden in child classes for another behavior (for example a fixed chosen size) :param features: A dictionary of Features :return: A tuple of two integer values (height, width)

wormpose.dataset.features.calculate_max_average_worm_length(features: Dict[str, wormpose.dataset.features.Features]) float[source]

Calculates the average worm length from each video, and returns the maximum.

Parameters

features – A dictionary of Features

Returns

Biggest average worm length from all videos