question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow augmentations without DataKey.Input

See original GitHub issue

🚀 Feature

Sometimes you want to apply augmentations to e.g. masks the need to transform also an image.

Alternatives

None

Additional context

When using AugmentationSequential like this:

self.random_aug = AugmentationSequential(
   K.RandomVerticalFlip(),
  data_keys=["mask"]
)

following error is thrown: NotImplementedError: The first input must be DataKey.INPUT.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
edgarribacommented, Dec 16, 2021

Agree, but for now they are treated the same, must be the user who specifies the interpolation method. I don’t think we support out of the box such fine-grained automation. In principle, for such cases we recommend to create custom classes and define different behaviors per data type.

1reaction
maaftcommented, Dec 16, 2021

Are they really currently treated the same for geometric augmentations? IMHO the interpolation method must differ.

One should never use other interpolation methods other than nearest for mask, or you’ll end up with non-binary values.

Same for actual metric data like e.g. depth-images

Read more comments on GitHub >

github_iconTop Results From Across the Web

Augmentation Containers - Kornia
Mix augmentations (e.g. RandomMixUp, RandomCutMix) can only be working with “input” data key. It is not clear how to deal with the conversions...
Read more >
What is the difference between feature extraction with or ...
There are two ways that you could perform data augmentation: Up front, by expanding the input dataset into a larger one, performing a...
Read more >
Transit Secrets Engine (API) - Vault - HashiCorp Developer
This documentation assumes the transit secrets engine is enabled at the /transit path in Vault. Since it is possible to enable secrets engines ......
Read more >
Transforms — MONAI 1.1.0 Documentation
To simplify the input validations, this method assumes: data is a Python dictionary,. data[key] is a Numpy ndarray, PyTorch Tensor or string, ...
Read more >
Keras Data Augmentation with ImageDataGenerator (Your ...
Hpwever, when I train the model, I received the Tensorflow Warning, "Your input ran out of data..." and stopped the training process. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found