@staticmethod
def offset(image, dx_factor=0.1, dy_factor=0.2):
    (width, height) = image.size
    dx = int(((random.random() * width) * dx_factor))
    dy = int(((random.random() * height) * dy_factor))
    image2 = Image.new('RGB', ((width + dx), (height + dy)))
    image2.paste(image, (dx, dy))
    return image2
@staticmethod
def offset(image, dx_factor=0.1, dy_factor=0.2):
    (width, height) = image.size
    dx = int(((random.random() * width) * dx_factor))
    dy = int(((random.random() * height) * dy_factor))
    image2 = Image.new('RGB', ((width + dx), (height + dy)))
    image2.paste(image, (dx, dy))
    return image2