--- title: Ground Truth Estimation keywords: fastai sidebar: home_sidebar summary: "Implements functions for ground truth estimation from the annotations of multiple experts. Based on SimpleITK." description: "Implements functions for ground truth estimation from the annotations of multiple experts. Based on SimpleITK." nb_path: "nbs/09_gt.ipynb" ---
Installing SimpleITK, which is not a dependency of deepflash2
.
The STAPLE algorithm considers a collection of segmentations and computes a probabilistic estimate of the true segmentation and a measure of the performance level represented by each segmentation.
Source: Warfield, Simon K., Kelly H. Zou, and William M. Wells. "Simultaneous truth and performance level estimation (STAPLE): an algorithm for the validation of image segmentation." IEEE transactions on medical imaging 23.7 (2004): 903-921
exp_dir = Path('gt_tmp')
url = 'https://github.com/matjesg/deepflash2/releases/download/sample_data/'
download_sample_data(url, 'wue1_cFOS_expert_segmentation_samples.zip', exp_dir , extract=True)
files=['0004_mask.png', '0001_mask.png']
t = GTEstimator(exp_dir=exp_dir, config=Config(instance_segmentation_metrics=True));
t.gt_estimation()
t.show_gt(files=files)
t.gt_estimation(method='majority_voting', save_dir=exp_dir/'mv_test')
t.show_gt(method='majority_voting', max_n=2)
shutil.rmtree(exp_dir)