Preprocessing

class hugin.preprocessing.augmentation.Augmentation(operators: bool = None, random_order: bool = False, augment_outputs: bool = True)
augment(input, gti=None, aug_gti=False)
legacy_aug(y, horizontal_flip=False, vertical_flip=False, rotate=False, shift=False, zoom=False, laplace=False)
Parameters:
  • X – input image
  • y – ground truth
  • horizontal_flip – flip image and ground truth horizontally - False -> skip - probability in float (i.e. 0.5)
  • vertical_flip – flip image and ground truth vertically - False -> skip - probability in float (i.e. 0.5)
  • rotate – roatate image - False -> skip - {“prob”: 0.5, “angle”: 45}
  • shift – shift image to location by columns, rows - False -> skip - {“prob”: 0.05, “rcol”: 0.1, “rrow”: 0.1}
  • zoom – zoom image to a certain range - False -> skip - {“prob”: 0.05, “zoom_rg”: (1, 1)}
  • laplace – apply Laplacian gradient filter with definable kernel size - False -> skip - {“prob”: 0.05, “ksize”: 7}
Returns:

tuple with transformed input and ground truth

class hugin.preprocessing.standardize.SkLearnStandardizer(path, standardize_output=False)