compute_metrics

lightning_pose.utils.scripts.compute_metrics(cfg: DictConfig, preds_file: str | list[str], data_module: BaseDataModule | UnlabeledDataModule | None = None) None[source]

Compute various metrics on predictions csv file, potentially for multiple views. Saves metrics to files next to predictions file, in the convention of:

{prediction_file_stem}_{metric_name}.csv

Parameters:
  • cfg – the config used to determine whether single or multiview and which metrics to compute

  • preds_file – Path to model predictions used to compute metrics. For multiview, a list of prediction files corresponding to the csv_files.