File size: 831 Bytes
092fe0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
from torchvision import transforms
THYROID_LABEL = ['Benign', 'Malignant']
THYROID_SUBGROUP = [['Papillary','Follicular','Medullary']]
def THYROID():
return (THYROID_LABEL, THYROID_SUBGROUP[0])
def Transforms(name):
# if name in ["Thyroid"]:
data_transforms_ONE = {
'valid': transforms.Compose([
transforms.CenterCrop(512),
transforms.Resize(224),
transforms.ToTensor(),
transforms.Normalize([.5, .5, .5], [.5, .5, .5])
]),
'train': transforms.Compose([
transforms.CenterCrop(512),
transforms.RandomCrop(256),
transforms.Resize(224),
transforms.ToTensor(),
transforms.Normalize([.5, .5, .5], [.5, .5, .5])
])
}
return data_transforms_ONE
|