1.
Blur
Blurs the image.
BLUR
Original
Augmented
stream = solt.Stream([
slt.Blur(p=1, blur_type='g', k_size=15, gaussian_sigma=None,
data_indices=None)
])
Original
Augmented
stream = solt.Stream([
slt.Blur(p=1, blur_type='m', k_size=15, gaussian_sigma=None,
data_indices=None)
])
Original
Augmented
stream = solt.Stream([
slt.Blur(p=1, blur_type='mo', k_size=15, gaussian_sigma=None,
data_indices=None)
])
2.
Brightness
Performs a random brightness augmentation.
PHOTOMETRY
Original
Augmented
stream = solt.Stream([
slt.Brightness(brightness_range=None, data_indices=None, p=1)
])
Original
Augmented
Original
Augmented
stream = solt.Stream([
slt.Brightness(brightness_range=(5,20), data_indices=None, p=1)
])
3.
Contrast
Randomly changes the contrast.
PHOTOMETRY
Original
Augmented
Original
Augmented
stream = solt.Stream([
slt.Contrast(p=1, contrast_range=0.8, data_indices=None)
])
4.
Crop
Center/Random crop transform.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Crop(crop_to=(2000,1300), crop_mode='c')
])
Original
Augmented
stream = solt.Stream([
slt.Crop(crop_to=(2000,1300), crop_mode='r')
])
5.
CutOut
Does a CutOut augmentation.
DROPOUT
Original
Augmented
Original
Augmented
stream = solt.Stream([
slt.CutOut(cutout_size=100, data_indices=None, p=1)
])
Original
Augmented
stream = solt.Stream([
slt.CutOut(cutout_size=(80,230), data_indices=None, p=1)
])
6.
Flip
Random Flipping transform.
BASIC GEOMETRY
Original
Augmented
# vertical
stream = solt.Stream([
slt.Flip(p=1, axis=0, data_indices=None)
])
Original
Augmented
# horizontal
stream = solt.Stream([
slt.Flip(p=1, axis=1, data_indices=None)
])
Original
Augmented
# all axes
stream = solt.Stream([
slt.Flip(p=1, axis=-1, data_indices=None)
])
7.
GammaCorrection
Applies random gamma correction.
PHOTOMETRY
Original
Augmented
Original
Augmented
stream = solt.Stream([
slt.GammaCorrection(p=1, gamma_range=0.8, data_indices=None)
])
8.
GridMask
Performs a GridMask augmentation.
DROPOUT
Original
Augmented
stream = solt.Stream([
slt.GridMask(d_range=(50,50), ratio=0.9, rotate=(0,0), mode='crop',
data_indices=None, p=1)
])
Original
Augmented
stream = solt.Stream([
slt.GridMask(d_range=(50,50), ratio=0.9, rotate=(20,20), mode='reverse',
data_indices=None, p=1)
])
9.
HSV
Performs a random HSV color shift.
PHOTOMETRY
Original
Augmented
stream = solt.Stream([
slt.HSV(h_range=(0,360), s_range=None, v_range=None, data_indices=None,
p=1)
])
Original
Augmented
stream = solt.Stream([
slt.HSV(h_range=None, s_range=(-50,0), v_range=None, data_indices=None,
p=1)
])
Original
Augmented
stream = solt.Stream([
slt.HSV(h_range=None, s_range=None, v_range=(-50,50), data_indices=None,
p=1)
])
10.
IntensityRemap
Performs random intensity remapping. See Intensity augmentation for domain transfer of whole breast segmentation in MRI .
PHOTOMETRY
Original
Augmented
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
dc = solt.DataContainer(img, 'I')
stream = solt.Stream([
slt.IntensityRemap(kernel_size=9, data_indices=None, p=1)
])
dc_res = stream(dc, return_torch=False)
img_res = np.array(dc_res.data)
img_out = cv2.cvtColor(img_res.squeeze(), cv2.COLOR_BGR2RGB)
11.
JPEGCompression
Performs random JPEG-based worsening.
WORSENING
Original
Augmented
stream = solt.Stream([
slt.JPEGCompression(p=1, quality_range=0.1, data_indices=None)
])
12.
Noise
Adds noise.
NOISE
Original
Augmented
stream = solt.Stream([
slt.Noise(p=1, gain_range=0.5, data_indices=None)
])
13.
Pad
Pads the input to a given size.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Pad(pad_to=5000, padding='z')
])
Original
Augmented
stream = solt.Stream([
slt.Pad(pad_to=(4500,3000), padding='z')
])
Original
Augmented
stream = solt.Stream([
slt.Pad(pad_to=5000, padding='r')
])
14.
Projection
Random Projective transform.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Projection(affine_transforms=None, v_range=(0.0001,0.0005),
interpolation='bilinear', padding='z', p=1,
ignore_state=True, ignore_fast_mode=False)
])
15.
Resize
Resizes the input to a given size.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Resize(resize_to=(500,600), interpolation='bilinear')
])
16.
Rotate
Random rotation around the center clockwise.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Rotate(angle_range=(30,30), interpolation='bilinear', padding='z',
p=1, ignore_state=True, ignore_fast_mode=False)
])
17.
Rotate90
Performs a random rotation around the center by 90 degrees.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Rotate90(k=2, p=1, ignore_fast_mode=False)
])
18.
SaltAndPepper
Adds salt and pepper noise.
NOISE
Original
Augmented
stream = solt.Stream([
slt.SaltAndPepper(p=1, gain_range=0.1, salt_p=0.5, data_indices=None)
])
19.
Scale
Random scale transform.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Scale(range_x=0.1, range_y=0.3, same=True,
interpolation='bilinear', p=0.5, ignore_state=True,
padding='z', ignore_fast_mode=False)
])
20.
Shear
Random shear around the center.
BASIC GEOMETRY
Original
Augmented
stream = solt.Stream([
slt.Shear(range_x=0.3, range_y=None, interpolation='bilinear',
padding='z', p=1, ignore_state=True,
ignore_fast_mode=False)
])
Original
Augmented
stream = solt.Stream([
slt.Shear(range_x=None, range_y=0.5, interpolation='bilinear',
padding='z', p=1, ignore_state=True,
ignore_fast_mode=False)
])
21.
Translate
Random Translate transform.
BASIC GEOMETRY
Original
Augmented
Original
Augmented
stream = solt.Stream([
slt.Translate(range_x=1000, range_y=None, interpolation='bilinear',
padding='z', p=0.5, ignore_state=True,
ignore_fast_mode=False)
])
Original
Augmented
stream = solt.Stream([
slt.Translate(range_x=None, range_y=(-300,-200), interpolation='bilinear',
padding='z', p=0.5, ignore_state=True,
ignore_fast_mode=False)
])