jaclearn.imageaug.shape#

Functions

horizontal_flip_augment(img, prob)

random_crop(img, target_shape)

random crop a image.

random_crop_and_resize(img, max_shape, ...)

random_crop_random_shape(img, max_shape[, ...])

random_size_crop(img, target_shape, area_range)

random size crop used for Facebook ImageNet data augmentation see facebook/fb.resnet.torch

Functions

horizontal_flip_augment(img, prob)[source]#
random_crop(img, target_shape)[source]#

random crop a image. output size is target_shape

random_crop_and_resize(img, max_shape, target_shape, min_shape=0)[source]#
random_crop_random_shape(img, max_shape, min_shape=0)[source]#
random_size_crop(img, target_shape, area_range, aspect_ratio=None, contiguous_ar=False, *, nr_trial=10)[source]#

random size crop used for Facebook ImageNet data augmentation see facebook/fb.resnet.torch