Closed khawar-islam closed 1 year ago
Hello Khawar, Thanks for your questions! Yes, it is correct. It depends on the probability of applying augmentation operations. The demo code you are using is horizontal flip, which is applied with a probabily of 0.5 by default. You may modify the following part, an example (p=1) is attached below:
aug = torch.nn.Sequential(
transforms.RandomHorizontalFlip(p=1), )
@JunlinHan thank you for your answer. If i apply two techniques at the same time, it must generate two augmented images. Am i right?
for i, (images, target) in enumerate(train_loader):
aug = torch.nn.Sequential(
transforms.RandomHorizontalFlip(p=1),
transforms.RandomVerticalFlip(p=1))
_, _, h, w = images.shape
# perform augmentations with YOCO
images = YOCO(images, aug, h, w)
save_image(images, 'img' + str(i) + '.png')
Hello Khawar, No, this is a sequence operation, so you will get one augmented image only (but this image has been augmented with 2 operations).
@JunlinHan thank you
Hi @JunlinHan
I have a dataset contains single image and I am simply applying your
YOCO
technique to visualize image generated by YOCO. I just get a single output sometimes the output is same image as input and sometimes flip+cut. Is that correct?Code
Input image:
Output Image