Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneOf wrong behaviour #68

Closed
vimalaguti opened this issue Oct 4, 2017 · 2 comments
Closed

OneOf wrong behaviour #68

vimalaguti opened this issue Oct 4, 2017 · 2 comments

Comments

@vimalaguti
Copy link

Hi,
looks like there is something broken there, I suppose.

With this code, I get at the same time: dropout and Add+
Dropout is always used.
Never get Add- nor constrastNorm.

color = iaa.Sometimes(1,iaa.OneOf([
        iaa.Add((-50, -20)),
        iaa.Add((20, 50)),
        iaa.ContrastNormalization((0.3, 0.5)),
        iaa.ContrastNormalization((1.5, 1.9))
        iaa.CoarseDropout(p=0.05, size_percent=0.2)
        ]))

I use like this (I know, it's not good..):

img1 = iaa.Sequential([iaa.Fliplr(p=1),color]).augment_image(img)
img2 = iaa.Sequential([iaa.Fliplr(p=1),color]).augment_image(img)
@vimalaguti
Copy link
Author

Looks like there is something wrong when I use iaa.Sometimes(iaa.OneOf())
When I use OneOf alone, it works fine.

@aleju aleju closed this as completed in 516b58d Oct 4, 2017
@aleju
Copy link
Owner

aleju commented Oct 4, 2017

Should be fixed now. Sometimes falsely turned OneOf into a Sequential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants