sksurgerytf.utils.segmentation_statistics module¶
Module to implement various segmentation statistics for evaluation.
-
sksurgerytf.utils.segmentation_statistics.
calculate_dice
(gold_standard, segmentation)[source]¶ Computes dice score of two boolean images.
Inspired by NiftyNet.
Parameters: - gold_standard – gold standard / reference image.
- segmentation – segmented / predicted / inferred image.
Returns: dice score
-
sksurgerytf.utils.segmentation_statistics.
check_same_size
(image_a, image_b)[source]¶ Check shape the same.
Parameters: - image_a – image
- image_b – image
Returns:
-
sksurgerytf.utils.segmentation_statistics.
get_confusion_matrix
(gold_standard, segmentation)[source]¶ Compute the confusion matrix of 2 boolean images.
Inspired by NiftyNet.
Parameters: - gold_standard – gold standard / reference image.
- segmentation – segmented / predicted / inferred image.
Returns: 2x2 confusion matrix, [[TN, FN],[FP,TP]].