def _aug(self, mode): aug = dp.Augmentor() if mode == "train": aug.append('misalign', max_trans=17.0) aug.append('missing', max_sec=5, mode='mix', random_color=True) aug.append('blur', max_sec=5, mode='mix') if mode == "train": aug.append('warp') aug.append('greyscale', mode='mix') aug.append('flip') return aug
def _aug(self): aug = dp.Augmentor() if self.aug[0]: print("[misalign]") aug.append('misalign', max_trans=17.0) if self.aug[1]: print("[missing] max_sec = {}".format(10)) aug.append('missing', max_sec=10, mode='mix', random_color=True) if self.aug[2]: print("[blur] max_sec = {}".format(10)) aug.append('blur', max_sec=10, mode='mix') if self.mode == 'train': aug.append('warp') aug.append('greyscale', mode='mix') aug.append('flip') return aug