-
Notifications
You must be signed in to change notification settings - Fork 41
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
AssertionError when do augment policy #30
Comments
I find that this error is cause by the code located at 65-70 lines of augmenter.py in function transform(). elif aug_type == "brighten":
X_aug = iaa.Add(
(int(-40 * magnitude), int(40 * magnitude)), per_channel=0.5
).augment_images(
X
) # brighten The use of iaa.Add will cause X_aug out of the range [0,255], just add one line can fix the problem. elif aug_type == "brighten":
X_aug = iaa.Add(
(int(-40 * magnitude), int(40 * magnitude)), per_channel=0.5
).augment_images(
X
) # brighten
np.clip(X_aug, 0, 255, out=X_aug) Now my puzzle is that the transform() is a very important function, and if it has a bug, the whole program does not work properly,so the author won't miss it. |
I also encounter the same error with TF 1.13.1, python 3.5 (after patching all f-string formating), imgaug 0.3.0 (latest version at this time). I apply your patch but I got another error that I will try to fix soon.
Line 108 of |
It seems line 133 of |
I write a simple script like this:
after run it, about one minute, I got a AssertionError:
The code that throw Error is:
It seems the code after data-augmentation is out of range [0,255].
So if the function augment_by_policy() in augmenter.py has some bug?
The text was updated successfully, but these errors were encountered: