FastSurferCNN.data_loader.augmentation¶
- class FastSurferCNN.data_loader.augmentation.AddGaussianNoise(mean=0, std=0.1)[source]¶
Add gaussian noise to sample.
Attributes
std
Standard deviation.
mean
Gaussian mean.
Methods
__call__
(sample)Add gaussian noise to scalefactor.
- class FastSurferCNN.data_loader.augmentation.AugmentationPadImage(pad_size=((16, 16), (16, 16)), pad_type='edge')[source]¶
Pad Image with either zero padding or reflection padding of img, label and weight.
Attributes
pad_size_image
(tuple) The padding size for the image.
pad_size_mask
(tuple) The padding size for the mask.
pad_type
(str) The type of padding to be applied.
Methods
__call
Add zeroes.
- class FastSurferCNN.data_loader.augmentation.AugmentationRandomCrop(output_size, crop_type='Random')[source]¶
Randomly Crop Image to given size.
Methods
__call__
(sample)Crops the augmentation.
- class FastSurferCNN.data_loader.augmentation.ToTensor[source]¶
Convert ndarrays in sample to Tensors.
Methods
__call__
(sample)Convert the image to float within range [0, 1] and make it torch compatible.
- class FastSurferCNN.data_loader.augmentation.ToTensorTest[source]¶
Convert np.ndarrays in sample to Tensors.
Methods
__call__
(img)Convert the image to float within range [0, 1] and make it torch compatible.
- class FastSurferCNN.data_loader.augmentation.ZeroPad2D(output_size, pos='top_left')[source]¶
Pad the input with zeros to get output size.
Attributes
output_size
(Union[Number, Tuple[Number, Number]]) Size of the output image either as Number or tuple of two Number.
pos
(str, Optional) Position to put the input.
Methods
_pad
(image)Pad the input image with zeros.
__call__
(sample)Pad the image, label and weights.
- class FastSurferCNN.data_loader.augmentation.ZeroPad2DTest(output_size, pos='top_left')[source]¶
Pad the input with zeros to get output size.
Attributes
output_size
(Union[Number, Tuple[Number, Number]]) Size of the output image either as Number or tuple of two Number.
pos
(str) Position to put the input.
Methods
pad
Pad zeroes of image.
call
Call _pad().