Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cutmix

Cutmix is a data augmentation technique that creates new samples by combining patches from two images while blending their labels proportionally to the area of the patches.. We follow the implementation of cutmix in SRe2L.

CLASS ddranking.aug.Cutmix(params: dict) [SOURCE]

Parameters

  • params(dict): Parameters for the cutmix augmentation. We require the parameters to be in the format of {'param_name': param_value}. For cutmix, only beta (beta distribution parameter) needs to be specified, e.g. {'beta': 1.0}.

Example

# When intializing an evaluator with cutmix augmentation, and cutmix object will be constructed.
>>> self.aug_func = Cutmix(params={'beta': 1.0})

# During training, the cutmix object will be used to augment the data.
>>> images = aug_func(images)