poseinterface.clips.extract_startlabels_s3#
- poseinterface.clips.extract_startlabels_s3(s3_cliplabels_uri, output_uri=None, aws_profile=None)[source]#
Extract first frame’s labels from a cliplabels.json file on S3.
Reads a
*_cliplabels.jsonfile from S3 and creates a corresponding*_startlabels.jsonfile on S3 containing only the labels for the first frame (frame with id=0).- Parameters:
s3_cliplabels_uri (
str) – S3 URI of the input*_cliplabels.jsonfile in the formats3://bucket-name/path/to/file_cliplabels.json.output_uri (
str|None) – Optional S3 URI for the output file. IfNone(default), it is derived from thes3_cliplabels_uriby replacing_cliplabels.jsonwith_startlabels.json.aws_profile (
str|None) – Optional AWS profile name to use for authentication. If None, uses the default AWS credentials chain.
- Returns:
S3 URI of the output
*_startlabels.jsonfile.- Return type:
- Raises:
ValueError – If the S3 URI format is invalid, the input filename does not end with
_cliplabels.json,output_uridoes not end with_startlabels.json, or the clip labels do not contain exactly one first-frame image (id: 0).FileNotFoundError – If the input file does not exist on S3.
ClientError – If there are other S3 access issues (e.g. permissions).