Open brando90 opened 2 years ago
more context. Original img process:
def _original_data_transforms_delauny(size: int = 256) -> transforms.Compose:
transform = transforms.Compose([
transforms.Resize((size, size)),
transforms.ToTensor(),
transforms.Normalize(mean=mean,
std=std),
])
return transform
the one I am trying to do:
train_data_transform = Compose([
# ToPILImage(),
transforms.Resize((256, 256)), # todo think about this, is this what we want to do? https://github.com/camillegontier/DELAUNAY_dataset/issues/4
RandomCrop(size, padding=8),
ColorJitter(brightness=0.4, contrast=0.4, saturation=0.4),
RandomHorizontalFlip(),
ToTensor(),
normalize,
])
test_data_transform = transforms.Compose([
transforms.Resize((size, size)),
transforms.ToTensor(),
transforms.Normalize(mean=mean,
std=std),
])
validation_data_transform = test_data_transform
more is similar to imagenet like things.
asking due to error:
ValueError: Requires scalar labels.
Required crop size (84, 84) is larger then input image size (46, 616)
python-BaseException
(also I think the target transform is missing from your 5cnn script?)
this might be a consideration to use: https://pytorch.org/vision/main/generated/torchvision.transforms.RandAugment.html
saw this one: https://github.com/camillegontier/DELAUNAY_dataset/blob/827db39400d8b5e12b4cc538b98a2f77099b747d/CNN_training/training.py#L26 curious about choice
@camillegontier