smooth_bbox
- lightning_pose.utils.cropzoom.smooth_bbox(input_bbox_dir: Path, output_dir: Path, method: str = 'median', window: int = 5) None[source]
Smooth bbox CSV files in a directory and save the results to a new directory.
Reads every
*_bbox.csvfile ininput_bbox_dir, applies a rolling smoothing operation over thex,y,h,wcolumns, and writes the smoothed files tooutput_diralongside ametadata.jsonthat records the smoothing parameters.- Parameters:
input_bbox_dir – directory containing raw
*_bbox.csvfiles.output_dir – directory where smoothed files and
metadata.jsonwill be written.method – smoothing method; currently only
'median'is supported.window – window size (number of frames) for the rolling operation.
- Raises:
ValueError – if
methodis not supported or no*_bbox.csvfiles are found.