I’m using three torchvision transforms
transform_list = [transforms.RandomHorizontalFlip(p=1),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]
and I want to view that horizontal flip IS indeed done, so in the training loop I did this
for i, (images, _) in tqdm(enumerate(trainloader)):
but it would only show only original images
how can I view those augmented images?
one more question… (if I may…)
I want to receive a ‘flag’ variable when a certain transformation (or augmentation) is done to that data…
Any possible ideas? I will re-code <torch.utils.data> if I have to
Did you apply the transform in in the trainloader ?
yes, as you see in the code above
I did apply random horizontal flip with probability of 1
I meant if you passed the transformation to the Dataset object as shown in the Transforms section for eg.
transformed_dataset = FaceLandmarksDataset(csv_file='data/faces/face_landmarks.csv', root_dir='data/faces/', transform=transforms.Compose([ Rescale(256), RandomCrop(224), ToTensor() ]))
as shown in more detail here
Yes it was
The list was made only for my convenience but it was wrapped woth compose and given to dataloader
There no problem with it
OK… I thought horizontal flip was flipping on horizontal axis… hence the name horizontal flip
should have noticed though, since horizontal flip was used ubiquitously… nobody wants his/her network to learn from upside down images…
Random horizontal flip is flipping horizontally… (so in my sense, it is flipping on vertical axis)
many peop might know… but I just figured out by comparing original images… haha