No, I don’t think RandomBrightnessContrast and MedianBlur would make sense to be applied on a mask containing class indices as both transformations would change the “pixel values”, which represent class indices (not color values as in e.g. RGB input images).