jactorch.transforms.coor.transforms#
Classes
Class CenterCrop
- class CenterCrop[source]#
Bases:
CenterCrop
Class ColorJitter
- class ColorJitter[source]#
Bases:
ColorJitter
- __init__(brightness=0, contrast=0, saturation=0, hue=0)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(img)[source]#
- Parameters:
img (PIL Image or Tensor) – Input image.
- Returns:
Color jittered image.
- Return type:
PIL Image or Tensor
- static get_params(brightness, contrast, saturation, hue)[source]#
Get the parameters for the randomized transform to be applied on image.
- Parameters:
brightness (tuple of float (min, max), optional) – The range from which the brightness_factor is chosen uniformly. Pass None to turn off the transformation.
contrast (tuple of float (min, max), optional) – The range from which the contrast_factor is chosen uniformly. Pass None to turn off the transformation.
saturation (tuple of float (min, max), optional) – The range from which the saturation_factor is chosen uniformly. Pass None to turn off the transformation.
hue (tuple of float (min, max), optional) – The range from which the hue_factor is chosen uniformly. Pass None to turn off the transformation.
- Returns:
The parameters used to apply the randomized transform along with their random order.
- Return type:
Class Compose
Class DenormalizeCoor
Class Grayscale
- class Grayscale[source]#
Bases:
Grayscale
Class Lambda
Class LinearTransformation
- class LinearTransformation[source]#
Bases:
LinearTransformation
Class Normalize
- class Normalize[source]#
Bases:
Normalize
Class NormalizeCoor
Class Pad
Class PadMultipleOf
- class PadMultipleOf[source]#
Bases:
PadMultipleOf
- __new__(**kwargs)#
Class RandomCrop
- class RandomCrop[source]#
Bases:
RandomCrop
- __init__(size, padding=None, pad_if_needed=False, fill=0, padding_mode='constant')[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
Class RandomGrayscale
- class RandomGrayscale[source]#
Bases:
RandomGrayscale
Class RandomHorizontalFlip
- class RandomHorizontalFlip[source]#
Bases:
RandomHorizontalFlip
Class RandomResizedCrop
- class RandomResizedCrop[source]#
Bases:
RandomResizedCrop
- __init__(size, scale=(0.08, 1.0), ratio=(3.0 / 4.0, 4.0 / 3.0), interpolation=InterpolationMode.BILINEAR, antialias=True)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- Parameters:
antialias (bool | None)
- forward(img)[source]#
- Parameters:
img (PIL Image or Tensor) – Image to be cropped and resized.
- Returns:
Randomly cropped and resized image.
- Return type:
PIL Image or Tensor
Class RandomRotation
- class RandomRotation[source]#
Bases:
RandomRotation
- __init__(angle, crop=False, **kwargs)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
Class RandomVerticalFlip
- class RandomVerticalFlip[source]#
Bases:
RandomVerticalFlip
Class Resize
- class Resize[source]#
Bases:
Resize
Class ToTensor