generate_cropped_csv_file

lightning_pose.utils.cropzoom.generate_cropped_csv_file(input_csv_file: str | Path, input_bbox_file: str | Path, output_csv_file: str | Path, mode: str = 'subtract') None[source]

Adjusts coordinates in the input CSV file either by adding or subtracting corresponding values from a bounding box CSV file. The resulting data is saved to a new output CSV file.

Parameters:
  • input_csv_file (str | Path) – Path to the input CSV file containing coordinate data.

  • input_bbox_file (str | Path) – Path to the CSV file containing bounding box data.

  • output_csv_file (str | Path) – Path where the output CSV file will be saved.

  • mode (str) – Specifies the operation to apply to the coordinates. Must be β€œadd” or β€œsubtract”. Defaults to β€œsubtract”.

Raises:

ValueError – If the provided mode is not β€œadd” or β€œsubtract”.