We want to have an image augmentation pipeline that randomly transforms the images. PR #9
Relevant background
DL models are known to become more robust and overfit less when augmentations are used during training. Thus we want to have an augmentation pipeline that applies spatial and intensity augmentations onto images and solely spatial augmentations on the masks.
Design overview
get_augmentation_pipeline(params) function that takes in a parameter dict and returns an object of class imagaug.augmenters.Sequential.
augment_images(images, masks, augmentation_pipeline) function that takes in the augmentation pipeline, input images and masks and returns augmented images and masks
augment_images(images, masks, augmentation_pipeline) applies augmentation pipeline onto our data. For images bilinear interpolation is used, for masks nearest-neighbor interpolation so that their unique values don't change.
Intermediate output: augmentation pipeline object of class imagaug.augmenters.Sequential
Final output: augmented images (np.array, dtype=float32) B x H x W x C and masks (np.array, dtype=uint8/16) B x H x W x C
Section 2: Implementation details
Control flow
Images need to be interpolated with bilinear interpolation, masks need to be interpolated with nearest-neighbor interpolation, otherwise the they will contain label values that weren't there before.
Section 1: Design details
We want to have an image augmentation pipeline that randomly transforms the images. PR #9
Relevant background
DL models are known to become more robust and overfit less when augmentations are used during training. Thus we want to have an augmentation pipeline that applies spatial and intensity augmentations onto images and solely spatial augmentations on the masks.
Design overview
get_augmentation_pipeline(params)
function that takes in a parameter dict and returns an object of classimagaug.augmenters.Sequential
.augment_images(images, masks, augmentation_pipeline)
function that takes in the augmentation pipeline, input images and masks and returns augmented images and masksDesign list/flowchart
get_augmentation_pipeline(params)
produces pipeline objectaugment_images(images, masks, augmentation_pipeline)
applies augmentation pipeline onto our data. For images bilinear interpolation is used, for masks nearest-neighbor interpolation so that their unique values don't change.Required inputs
flip
}`
Output files
Intermediate output: augmentation pipeline object of class
imagaug.augmenters.Sequential
Final output: augmented images (np.array, dtype=float32) B x H x W x C and masks (np.array, dtype=uint8/16) B x H x W x CSection 2: Implementation details
Control flow
Images need to be interpolated with bilinear interpolation, masks need to be interpolated with nearest-neighbor interpolation, otherwise the they will contain label values that weren't there before.
Milestones and timeline
Ready for review.