Spaces:
Running
Running
File size: 930 Bytes
f3b2c5b |
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 |
import timm
import torchvision
data_config = {'input_size': (3, 384, 384),
'interpolation': 'bicubic',
'mean': (0.48145466, 0.4578275, 0.40821073),
'std': (0.26862954, 0.26130258, 0.27577711),
'crop_pct': 1.0,
'crop_mode': 'squash'}
transform_synthetic = timm.data.create_transform(**data_config, is_training=False)
transform_200M = torchvision.transforms.Compose([
torchvision.transforms.Resize((640, 640)),
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]),
])
transform_5M = torchvision.transforms.Compose([
torchvision.transforms.Resize((224, 224)),
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]),
]) |