I did image segmentation using U-net, and after trained the model could get the predicted image of one test data.
a = X_test[n]
b = y_test[n]
input = np.expand_dims(a,axis=0)
mask = np.expand_dims(b,axis=0)
preds_test = unet_model.predict(input)
y_true = mask
y_pred = tf.cast(preds_test, tf.double)
dice_coef(y_true, y_pred)
unet_model.evaluate(input, mask)
By using preds_test, I could get the predicted image.
However I found there is noise on this image, so I need to remove these noise from this image, and I want to get the dice score of this image.
What I want to get in final is value of dice_coef(y_true, y_filter). The problem is I don't have any idea to get the value of 'y_filter'.
How can I solve this problem? It maybe hard to understand but I have no idea to solve this problem..