How to generate burst of images from a single image by adding misalignment?
I'm learning about image denoising and Pytorch.I want to get burst of images generated from a single image. For example, I have an image, then random crop a patch of specific size from it. Then I want to add an 1 or 2 pixels shift on it to get a new image with tiny difference. What could I do? Is it better to use some techniques in PIL or others?

You should use the transforms to do some image augmentation for your problem. 

As I read your comment, you can restrict translate = (a, b) to do some tiny random shifts in both dimensions.

import torchvision.transforms as transforms

transform = transforms.RandomAffine(degrees, translate=None, scale=None, shear=None, resample=False, fillcolor=0)

img = PIL.Image.open('path/img')

new_img = transform(img)


If you want to perform more transforms like Crop as well, group all the transform into one big transform using transforms.Compose. Here is your reference
