ScaleJitter¶
- class torchaug.transforms.ScaleJitter(target_size, scale_range=(0.1, 2.0), interpolation=InterpolationMode.BILINEAR, antialias=True)[source]¶
Perform Large Scale Jitter on the input according to “Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation”.
If the input is a
torch.Tensoror aTATensor(e.g.Image,Video,BoundingBoxesetc.) it can have arbitrary number of leading batch dimensions. For example, the image can have[..., C, H, W]shape. A bounding box can have[..., 4]shape.- Parameters:
target_size (
Tuple[int,int]) – Target size. This parameter defines base scale for jittering, e.g.min(target_size[0] / width, target_size[1] / height).scale_range (
Tuple[float,float], optional) – Minimum and maximum of the scale range. Default:(0.1, 2.0)interpolation (
Union[InterpolationMode,int], optional) – Desired interpolation enum defined bytorchvision.transforms.InterpolationMode. OnlyInterpolationMode.NEAREST,InterpolationMode.NEAREST_EXACT,InterpolationMode.BILINEARandInterpolationMode.BICUBICare supported. Default:InterpolationMode.BILINEARantialias (
bool, optional) – Whether to apply antialiasing. Default:True