HypVINN.utils.stats_utils

HypVINN.utils.stats_utils.compute_stats(orig_path, prediction_path, stats_file)[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_filePath

The file to write the statistics to.

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.