poseinterface.io.frames_to_poseinterface#

poseinterface.io.frames_to_poseinterface(input_dir, output_dir, framelabels_path)[source]#

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

Source frames are matched to target names by frame number: the first group of digits in each source filename is compared against the frame-<ID> field in the COCO file_name entries.

Parameters:
  • input_dir (Path) – Directory containing the source frame images (e.g. DLC labeled-data/<video>/ folder).

  • output_dir (Path) – Directory to copy the renamed frames into.

  • framelabels_path (Path) – Path to a COCO JSON file whose images entries provide the target filenames.

Raises:

FileNotFoundError – If a source frame cannot be found for a frame number listed in the COCO JSON.

Return type:

None