mdbloice / Augmentor

Image augmentation library in Python for machine learning.
https://augmentor.readthedocs.io/en/stable
MIT License
5.08k stars 866 forks source link

Severe misalignment between image and mask after random distortion #188

Closed VincentYCYao closed 5 years ago

VincentYCYao commented 5 years ago

related issues: #173 #184 This is a bug

def augmentation(x_root, y_root):
    p = Augmentor.Pipeline(x_root)
    p.ground_truth(y_root)

    # TODO: Bug fix: Augmentor can not synchronize the random distortion between image and label
    p.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=8)

    # save augmented images
    num_of_samples = int(1e2)
    p.sample(num_of_samples)

distored_mask distore_image

mdbloice commented 5 years ago

Hi @VincentYCYao, sorry for the delay checking this, I have not been able to dedicate much time for Augmentor over the past few days. I will check this immediately, and try to see what might be happening.

mdbloice commented 5 years ago

Hi @VincentYCYao, this has now been resolved as of version 0.2.6. Just upgrade via pip (pip install Augmentor -U)

Thanks for pointing out the issue!

VincentYCYao commented 5 years ago

@mdbloice Thanks a lot!