Hello @ptrblck
I am using a python dictionary that has parameters for imaugment method in the data.Dataset class.
The params is as below:
    params = {}
    params["augmentation"] = [1, 1, 1]  # , 1, 1]
    params["only"] = None
    params["e_deform_p"] = dict()
    params["e_deform_g"] = dict()
    params["random_deform"] = dict()
    params["random_deform"]['height_shift_range'] = 0.1  # 0.1
    params["random_deform"]['width_shift_range'] = 0.1  # 0.1
    params["random_deform"]['depth_shift_range'] = None  # ?
    params["random_deform"]['rotation_range_alpha'] = 5
    params["random_deform"]['rotation_range_beta'] = None
    params["random_deform"]['rotation_range_gamma'] = None
    params["random_deform"]["horizontal_flip"] = True
    params["random_deform"]["vertical_flip"] = True 
    params["random_deform"]["z_flip"] = False
    # Add elastic deformations
    params["e_deform_p"]["alpha"] = 5
    params["e_deform_p"]["sigma"] = 2
    params["e_deform_g"]["sigma"] = 5  # 10
    params["e_deform_g"]["points"] = 3

I pass the params to the dataset and imaugment method is performed on image and mask.
With RandomApply as you’ve mentioned:
    transforms = transforms.RandomApply(params, p=0.3)
    dataSet = Seg_aug(train_dict, num_labels=9, params=transforms, isTransform=True, isplot=True)
    tl = DataLoader(dataSet, batch_size=10, shuffle=True, num_workers=1)
    x, y, z = next(iter(tl))

I am getting the following error:
TypeError: 'RandomApply' object is not subscriptable
Is there ways to implement imaugment based on p=0.5(50%) of the images+masks with params?