crop_labeled_frames

lightning_pose.utils.cropzoom.crop_labeled_frames(input_data_dir: Path, input_csv_file: Path, input_bbox_file: Path, output_data_dir: Path, output_csv_file: Path) None[source]

Crop labeled frames to bounding-box regions and generate a remapped labels CSV.

Parameters:
  • input_data_dir – root directory containing the original images.

  • input_csv_file – path to the original labels CSV (e.g. CollectedData.csv).

  • input_bbox_file – path to a bbox CSV produced by generate_bbox() or smooth_bbox().

  • output_data_dir – directory where cropped images will be saved.

  • output_csv_file – path where the remapped labels CSV will be written.