Commit e4fa4640 authored by sjromuel's avatar sjromuel
Browse files

d

parent 6fe371a1
......@@ -80,7 +80,7 @@ def main():
seg = onehotencode(seg, autoencoder=True)
slice_dsc = dice_loss(noisygt, seg)
patient_dsc.append(slice_dsc)
patient_dsc.append(slice_dsc.numpy())
try:
y_true_np = np.squeeze(seg[0, :, :, 0].numpy() > 0.5)
......@@ -100,11 +100,9 @@ def main():
y_true3d = np.append(np.reshape(y_true_np, newshape=(1, 512, 512)), y_true3d, axis=0)
except:
pass
print("Dice Score for patient", patientnumber, ":", np.mean(patient_dsc))
dice_Score16.append(patient_dsc)
try:
hausdorff_distance_filter = sitk.HausdorffDistanceImgiageFilter()
hausdorff_distance_filter = sitk.HausdorffDistanceImageFilter()
hausdorff_distance_filter.Execute(sitk.GetImageFromArray(y_true3d),
sitk.GetImageFromArray(y_pred3d))
hdd3d = hausdorff_distance_filter.GetHausdorffDistance()
......@@ -113,7 +111,10 @@ def main():
except:
pass
dice_Score16.append(np.mean(patient_dsc))
print("Dice Score for patient", patientnumber, np.mean(patient_dsc))
print("All Dice-Scores for", gt_type, ":", dice_Score16)
print("All 3d-HDDs for", gt_type, ": ", all3dhdds)
print("Dice-Score mean: ", np.mean(dice_Score16))
print("Dice-Score std: ", np.std(dice_Score16))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment