-
Notifications
You must be signed in to change notification settings - Fork 294
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
Anomaly with RandomGrayScale tests #2002
Comments
This looks like a bug in our import kornia.augmentation as K
import torch
import torchgeo.transforms as T
image = torch.randn(1, 1, 3, 3)
aug_dict = K.AugmentationSequential(K.RandomHorizontalFlip(p=1.0), data_keys=None)
data = {"image": image}
print("\nKornia:")
print(data["image"])
out = aug_dict(data)
print(data["image"])
print(out["image"])
image = torch.randn(1, 1, 3, 3)
aug_dict = T.AugmentationSequential(K.RandomHorizontalFlip(p=1.0), data_keys=["image"])
data = {"image": image}
print("\nTorchGeo:")
print(data["image"])
out = aug_dict(data)
print(data["image"])
print(out["image"]) I wouldn't devote too much energy to fixing this. We should instead remove our implementation. |
Actually, and fully realizing that I was the one who wrote these tests, I see no reason why these tests should pass. As an example, imagine an image with 3 channels. The first channel is white (255). All other channels are black (0). If we use |
Description
So I noticed something strange while running tests for grayscale. Passing sample through our
AugmentationSequential
is changing the value ofsample["image"]
to be equal to that ofoutput["image"]
.Steps to reproduce
In theory, the following change should allow the test to pass but it does not.
But this throws the following errors:
Version
0.6.0.dev0 (abceea0)
The text was updated successfully, but these errors were encountered: