Commit a41ea9fc authored by sjromuel's avatar sjromuel
Browse files

d

parent 6c76b537
......@@ -210,12 +210,18 @@ def main():
hausdorff_distance_filter2.Execute(sitk.GetImageFromArray(pred_np), sitk.GetImageFromArray(y_true_np))
test_loss_hdd2.append(hausdorff_distance_filter2.GetHausdorffDistance())
if y_pred3d ==[]:
'''if y_pred3d ==[]:
y_pred3d = pred_np
y_true3d = y_true_np
else:
y_pred3d = np.append(pred_np, y_pred3d, axis=0)
y_true3d = np.append(y_true_np, y_true3d, axis=0)
y_true3d = np.append(y_true_np, y_true3d, axis=0)'''
if y_pred3d == []:
y_pred3d = np.reshape(pred_np, newshape=(1, 512, 512))
y_true3d = np.reshape(y_true_np, newshape=(1, 512, 512))
else:
y_pred3d = np.append(np.reshape(pred_np, newshape=(1, 512, 512)), y_pred3d, axis=0)
y_true3d = np.append(np.reshape(y_true_np, newshape=(1, 512, 512)), y_true3d, axis=0)
except:
......
......@@ -13,6 +13,9 @@ predseg = np.load("finalResults/3dnpys/ctfgt2/unet_cv_ctfgt2/P01_pred3D.npy")
print(np.shape(predseg))
plt.imshow(predseg[5, :, :], cmap=plt.cm.bone)
plt.show()
'''pat = "06"
inputimg = np.load("data/npy_thresh/P"+pat+"_mr_T1.gipl.npy")
......
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