API#

io#

annotations_to_poseinterface(input_path, ...)

Export annotations file from a single video to poseinterface format.

frames_to_poseinterface(input_dir, ...)

Copy and rename frame images to match filenames in COCO JSON.

predictions_to_poseinterface(input_path, ...)

Convert a prediction file to poseinterface COCO JSON format.

split_lp_collected_data(input_path, output_dir)

Split a Lightning Pose project-level CollectedData.csv into per-session CSVs.

video_to_poseinterface(input_video, ...)

Reencode and rename a video to poseinterface format.

clips#

extract_single_clip(video_path, duration, ...)

Extract a video clip (and its clip labels if available).

extract_clips(video_path, duration, start_frames)

Extract multiple clips from a video.

extract_clips_uniform(video_path, duration, ...)

Extract clips with uniformly spaced starting frames from a video.

extract_startlabels(cliplabels_path[, ...])

Extract only the first frame's labels from a cliplabels.json file.

extract_startlabels_s3(s3_cliplabels_uri[, ...])

Extract first frame's labels from a cliplabels.json file on S3.

s3#

parse_s3_uri(s3_uri)

Parse an S3 URI into bucket and key components.

download_json_from_s3(bucket_name, key[, ...])

Download and parse a JSON file from S3.

upload_json_to_s3(data, bucket_name, key[, ...])

Upload a JSON object to S3.

utils#

tree(dir_path, *[, level, ...])

Return a visual tree structure of a directory as a string.