Hi @tom, I want to calculate IoU where my labels are of dimension [batch, class, h, w] and I have 4 classes. Initially I had 4 masks per image and I stacked them together to form the above mentioned dimension. Now I’m having difficulty in calculating IoU per class. Can you help me with that ?