fetch_dataset_paths#
- movement.sample_data.fetch_dataset_paths(filename, with_video=False)[source]#
Get paths to sample dataset and any associated frames or videos.
The data are downloaded from the
movement
data repository to the user’s local machine upon first use and are stored in a local cache directory. The function returns the paths to the downloaded files.- Parameters:
- Returns:
paths – Dictionary mapping file types to their respective paths. The possible file types are: “poses” or “bboxes” (depending on tracking type), “frame”, “video”. A None value for “frame” or “video” indicates that the file is either not available or not requested (if
with_video=False
).- Return type:
Examples
Fetch a sample dataset and get the paths to the file containing the predicted poses, as well as the associated frame and video files:
>>> from movement.sample_data import fetch_dataset_paths >>> paths = fetch_dataset_paths( ... "DLC_single-mouse_EPM.predictions.h5", with_video=True ... ) >>> poses_path = paths["poses"] >>> frame_path = paths["frame"] >>> video_path = paths["video"]
If the sample dataset contains bounding boxes instead of poses, use
paths["bboxes"]
instead ofpaths["poses"]
:>>> paths = fetch_dataset_paths("VIA_multiple-crabs_5-frames_labels.csv") >>> bboxes_path = paths["bboxes"]
See also