I am using Unet for segmentation in python and my unet's output is a mask with this shape [512,512,1].
After predicted a mask I want to do f1 score between the predicted mask and the real mask of the test image. I need to convert the real mask from [512,512,3] to [512,512,1] and I just can convert to [512,512].
Can anyone help me? Image with my outputs