icevision_aug_tfms: Aug_tfms

Description Usage Arguments Value

View source: R/icevision_albumentations.R

Description

Collection of useful augmentation transforms.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
icevision_aug_tfms(
  size,
  presize = NULL,
  horizontal_flip = icevision_HorizontalFlip(always_apply = FALSE, p = 0.5),
  shift_scale_rotate = icevision_ShiftScaleRotate(always_apply = FALSE, p = 0.5,
    shift_limit_x = c(-0.0625, 0.0625), shift_limit_y = c(-0.0625, 0.0625), scale_limit =
    c(-0.1, 0.1), rotate_limit = c(-45, 45), interpolation = 1, border_mode = 4, value =
    NULL, mask_value = NULL),
  rgb_shift = icevision_RGBShift(always_apply = FALSE, p = 0.5, r_shift_limit = c(-20,
    20), g_shift_limit = c(-20, 20), b_shift_limit = c(-20, 20)),
  lightning = icevision_RandomBrightnessContrast(always_apply = FALSE, p = 0.5,
    brightness_limit = c(-0.2, 0.2), contrast_limit = c(-0.2, 0.2), brightness_by_max =
    TRUE),
  blur = icevision_Blur(always_apply = FALSE, p = 0.5, blur_limit = c(1, 3)),
  crop_fn = partial(icevision_RandomSizedBBoxSafeCrop, p = 0.5),
  pad = partial(icevision_PadIfNeeded, border_mode = 0, value = list(124, 116, 104))
)

Arguments

size

The final size of the image. If an 'int' is given, the maximum size of the image is rescaled, maintaing aspect ratio. If a 'list' is given, the image is rescaled to have that exact size (height, width).

presize

presize

horizontal_flip

Flip around the y-axis. If 'NULL' this transform is not applied.

shift_scale_rotate

Randomly shift, scale, and rotate. If 'NULL' this transform is not applied.

rgb_shift

Randomly shift values for each channel of RGB image. If 'NULL' this transform is not applied.

lightning

Randomly changes Brightness and Contrast. If 'NULL' this transform is not applied.

blur

Randomly blur the image. If 'NULL' this transform is not applied.

crop_fn

Randomly crop the image. If 'NULL' this transform is not applied. Use 'partial' to saturate other parameters of the class.

pad

Pad the image to 'size', squaring the image if 'size' is an 'int'. If 'NULL' this transform is not applied. Use 'partial' to sature other parameters of the class.

Value

None


fastai documentation built on Oct. 25, 2021, 5:08 p.m.