portraitseg/data_augmentations.py
def apply_data_aug(inp, target, data_aug, kwargs=None):
    """
    Applies the transform to the input and target in the same way.
    """
    concatenation = np.concatenate([inp, target[None, :]])
    if kwargs:
        concatenation_aug = data_aug(concatenation, **kwargs)
    else:
        concatenation_aug = data_aug(concatenation)
    inp, target = concatenation_aug[:-1], concatenation_aug[-1]
    return inp, target

    Applies the transform to the input and target in the same way.
    
Applies the transform to the input and target in the same way.
Applies the transform to the input and target in the same way .
def apply_data_aug(inp, target, data_aug, kwargs=None):
    concatenation = np.concatenate([inp, target[None, :]])
    if kwargs:
        concatenation_aug = data_aug(concatenation, **kwargs)
    else:
        concatenation_aug = data_aug(concatenation)
    inp, target = concatenation_aug[:-1], concatenation_aug[-1]
    return inp, target
def apply_data_aug ( inp , target , data_aug , kwargs = None ) : concatenation = np . concatenate ( [ inp , target [ None , : ] ] ) if kwargs : concatenation_aug = data_aug ( concatenation , ** kwargs ) else : concatenation_aug = data_aug ( concatenation ) inp , target = concatenation_aug [ : - 1 ] , concatenation_aug [ - 1 ] return inp , target
Applies the transform to the input and target in the same way.
Applies the transform to the input and target in the same way .
"""
    Applies the transform to the input and target in the same way.
    """
inp
target
data_aug
kwargs