Closed alfieroddan closed 8 months ago
tensor([], device='cuda:0', dtype=torch.int64)
tensor([], device='cuda:0', dtype=torch.int64)
It looks like that you have a batch of images with only invalid pixels, i.e. no annotated region is left. If there is no label left, it is not possible to calculate the loss.
You are using the full HeiPorSPECTRAL dataset but the labels from our semantic segmentation task:
'label_mapping': 'htc.settings_seg>label_mapping',
This label mapping does not include bone, cartilage and bile_fluid and if only images with annotations from those images are part of the batch, no valid label remains (because the annotated regions of those labels are not used).
You have two options depending on what you want to do:
set(path.annotated_labels()) - set(["bone", "cartilage", "bile_fluid"])
and if that set is empty, remove the image from the specs.'htc.tissue_atlas.settings_atlas>label_mapping'
which uses all 20 classes.Thank you Jan!
:bug: Bug
Hi HTC team,
Apologies to ask for help again so soon!
I think there may be a bug in
calc_dice_metric
fromevaluate_images.py
.Description
I did a little investigating and added some print statements to the following:
Output just before break is as follows:
So I'm guessing there's cases where the mask is None? I assume this is due to the union of the 3 annotators?
Dataset
HeiPorSPECTRAL
Environment