wormpose.dataset.loaders.hdf5features

Simple FeaturesDataset implementation that reads features from a HDF5 file

class wormpose.dataset.loaders.hdf5features.HDF5Features(dataset_path: str, video_names: List[str])[source]
get_features(video_name: str)[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