ZFTurbo / volumentations

Library for 3D augmentations
MIT License
220 stars 35 forks source link

Difference between torchvision.transforms #30

Open jizhang02 opened 1 year ago

jizhang02 commented 1 year ago

Hello,

I would like to know what's the difference between your volumentations and the lib of torchvision.transforms?

import torchvision.transforms as transforms

 im_aug = transforms.Compose([
                #tfs.Resize(120),
                #transforms.RandomCrop(image_size),
                transforms.RandomHorizontalFlip(),
                transforms.RandomVerticalFlip(),
                #transforms.RandomRotation(5),
                #transforms.ColorJitter(brightness=0.5, contrast=0.5, hue=0.5),
                #transforms.RandomPerspective(),
                #transforms.GaussianBlur(kernel_size=(3, 3), sigma=(0.1, 1.5)),
                #transforms.RandomInvert(),
                #transforms.RandomPosterize(bits=2),
                #transforms.RandomAdjustSharpness(sharpness_factor=2),
                #transforms.RandomAutocontrast(),
                #transforms.RandomEqualize()
            ])
            img = im_aug(img)

Thanks, Jing

ZFTurbo commented 1 year ago

The main difference is that torchvision is for images e.g. shapes like (224, 224, 3). This library is for 3D volumes e.g. shapes like (224, 224, 224, 3).