I'm working with MONAI library in order to segment brain tumor in MRI images. My dataset is composed of 500 patients and for each patient there're three types of images and the segmentation mask. I've trained my network (UNet architecture) but I've a problem during the inference part. If the input image has a few non-zero pixels the network's output is mainly white. Why does it happen? Can someone help me?
Example of input image with a few non-zero pixels Example of the predicted segmentation
I've already checked the output values before the discretization but they're equal to 1.
Try assigning class weights for every image the training your model sometimes because of majority classes the model just predicts everything as the majority classes and still get high accuracy