HypVINN.utils.stats_utils

HypVINN.utils.stats_utils.compute_stats(orig_path, prediction_path, stats_dir)[source]

Compute statistics for the segmentation results.

Parameters:
orig_pathPath

The path to the original image.

prediction_pathPath

The path to the predicted segmentation.

stats_dirPath

The directory for storing the statistics.

Returns:
int, str

The return value of the main function from FastSurferCNN.segstats. Exit code. Returns 0 upon successful execution.

Raises:
RuntimeError

If the main function from FastSurferCNN.segstats fails to run.

Notes

The underlying segstats will read the number of threads from the global variable set via FastSurfer.utils.parallel.set_num_threads.