Hi again
I just want to ask about these lines in semantic segmentation data augmentation operation
based on previews question discussion ptrblck said :
  
    
    
    Data augmentation changed the mask in semantic segmentation vision
  
  
    so, which transform operations can I apply to my train dataset?
  


Spatial transformations applied on the input image should also be applied on the mask tensor to make sure that the input pixel location still corresponds to the mask (e.g. rotations, resizing, etc.).
Besides that, you should treat the mask as a classification target and should not change its values.
also, I found this statement in Albumentations data augmentation methods:
Many non-spatial transformations like,CLAHE, [RandomBrightness], [RandomContrast] [RandomGamma] can be also added. They will be applied only to the image and not the mask.
and  they writ this code :
aug = A.Compose([
A.OneOf([
A.RandomSizedCrop(min_max_height=(50, 101), height=original_height, width=original_width, p=0.5),
A.PadIfNeeded(min_height=original_height, min_width=original_width, p=0.5)
], p=1),
A.VerticalFlip(p=0.5),
A.RandomRotate90(p=0.5),
A.OneOf([
A.ElasticTransform(alpha=120, sigma=120 * 0.05, alpha_affine=120 * 0.03, p=0.5),
A.GridDistortion(p=0.5),
A.OpticalDistortion(distort_limit=2, shift_limit=0.5, p=1)
], p=0.8),
A.CLAHE(p=0.8),
A.RandomBrightnessContrast(p=0.8),
A.RandomGamma(p=0.8)])
random.seed(11)
augmented = aug(image=image, mask=mask)
image_heavy = augmented[‘image’]
mask_heavy = augmented[‘mask’]
visualize(image_heavy, mask_heavy, original_image=image, original_mask=mask)
my question is: based on the above code the augment operation applied to the image and mask why they write “they will be applied only to the image and not the mask”