check_video_paths
- lightning_pose.utils.io.check_video_paths(video_paths: list[str] | str, view_names: None = None) list[str][source]
- lightning_pose.utils.io.check_video_paths(video_paths: list[str] | str, view_names: list[str]) list[list[str]]
Validate and normalise video paths, returning a flat or nested list of mp4 paths.
Accepts a single file path, a list of file paths, or a directory and returns a flat list of video paths for single-view models, or a nested list
(views × sessions)for multi-view models.- Parameters:
video_paths – single video file path, list of video file paths, or a directory.
view_names – if provided, organise the paths by view name for a multi-view model.
- Returns:
list[str]of mp4 file paths. For multi-view:list[list[str]]where outer list indexes views.- Return type:
For single-view
- Raises:
ValueError – if
video_pathsis not a valid file, list, or directory.