wormpose.dataset.loaders.tierpsy.features_dataset

Implementation of BaseFeaturesDataset to load Tierpsy tracker features

class wormpose.dataset.loaders.tierpsy.features_dataset.FeaturesDataset(dataset_path, video_names)[source]
get_features(video_name)[source]

Returns a dictionary of features

Returns

dictionary with keys: skeletons, head_width, midbody_width, tail_width, frame_rate, ventral_side, timestamp WHERE skeletons: Coordinates x y of the centerline for each frame in pixel coordinates, a numpy floating point array of shape (N number of frames, J number of joints, 2) The quality of the synthetic images will start degrading when J < 50, consider interpolating if less joints head_width: numpy floating point array of shape N midbody_width: numpy floating point array of shape N tail_width: numpy floating point array of shape N frame_rate: One float number for the frame rate of the video. ventral_side: Optional One string value for the entire video. ‘clockwise’ or ‘anticlockwise’. If None, defaults to anticlockwise timestamp: Optional Timestamp of each frame, a numpy array of shape (N number of frames). If None, will consider each frame to be equidistant in time

wormpose.dataset.loaders.tierpsy.features_dataset.get_features_filename(root_dir: str, name: str)[source]

The features filename has different formats: ex: videoname_features.hdf5 or sometimes videoname_featuresN.hdf5