nicetoolbox.evaluation.in_out

Input and Output management for the evaluation module.

Classes

IO

Manages folder structure and reading/writing NPZ results.

class nicetoolbox.evaluation.in_out.IO(io_config: EvaluationIO, experiment_io: DetectorsRunIO, cfg_loader: ConfigLoader)[source]

Manages folder structure and reading/writing NPZ results.

Initialize the IO manager with the provided IO configuration.

Parameters:

io_config (IOConfig) – Configuration object containing paths for experiment, output, and evaluation visualization folders.

get_csv_folder()[source]

Returns the path to the CSV folder within the output directory.

get_detector_results_file(video_config, component, algorithm)[source]

Returns the path to the detector results file based on the video configuration, component, and algorithm.

Parameters:
  • video_config (RunConfigVideo) – Configuration for the video run.

  • component (str) – Name of the component.

  • algorithm (str) – Name of the algorithm.

Returns:

The path to the detector results file.

Return type:

Path

get_out_folder(selection='', component='')[source]

Returns the output folder path based on the provided parameters.

Parameters:
  • selection (str) – Selection criteria for the output.

  • component (str) – Component name.

Returns:

The output folder path.

Return type:

Path

init_dataset(dataset_properties: DatasetConfig)[source]

Dataset-specific IO initialization inside the main dataset loop.

Parameters:

dataset_properties (DatasetProperties) – Properties for the specific dataset.

save_npz(path: Path, **arrays)[source]

Save arrays to a compressed NPZ file.

save_summaries_to_csv(path: Path, data: Dict[str, Any])[source]

Save a summary dict to a CSV file.