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 dd_ranking.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, onlybeta
(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)