this is the possible approach
approach 1: training a model with U-NET and doing the segmentations and predicting the medical diseases with the help of segmentation. This is a supervised approach.
approach 2:This is semi-supervised approach. Training a dataset with U-NET for contrastive learning. so you get meaningful features in your latent space and then you train your normal segmentation u-Net while using the pre-trained Encoder part of your contrastive learning U-Net. Here to remember this normal segmentation u-net would be different from the U-NET for contrastive learning. So, there would be 2 different classes for U-NET. and then simply do the predictions by the semantic segmentation approach.