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.

[Bug] Mismatched input and output shapes in Augmentations

See original GitHub issue

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

Simply applying ColorJitter to an RGB image would produce the batch version. First discussion was here.

>>> import torch
>>> from kornia.augmentation import ColorJitter
>>> x = T.rand(3, 4, 4)
>>> cj = ColorJitter(0.2, 0.3, 0.2, 0.3)
>>> cj(x).shape
torch.Size([1, 3, 4, 4])

Expected behavior

Output should have the same shape as input.

Additional context

Maybe it is the originally intended behavior, but I think it is too rigid and deeply integrated into training deep NN, while the goal of Kornia is a differentiable OpenCV in GPU. Or am I missing anything here?

Edit 2: Added link to the original discussion.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
justanhduccommented, Oct 20, 2020

Ok I will try to work on it asap.

0reactions
shijianjiancommented, Nov 22, 2020

Cloased by #731

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors when using imgaug's augmentation. #2018 - GitHub
Hello, I'm getting this error each time I'm trying to use augmentation. SuspiciousSingleImageShapeWarning: You provided a numpy array of shape ( ...
Read more >
Data Augmentation Layer in Keras Sequential Model
I tried specifying the input shape in the augmented layer as well. When I take out the data_augmentation layer from the model it...
Read more >
Change input shape dimensions for fine-tuning with Keras
In this tutorial, you will learn how to change the input shape tensor dimensions for fine-tuning using Keras. After going through this guide ......
Read more >
How to Configure Image Data Augmentation in Keras
The brightness of the image can be augmented by either randomly darkening images, brightening images, or both. The intent is to allow a...
Read more >
Working with preprocessing layers - Keras
With Keras preprocessing layers, you can build and export models that are truly end-to-end: models that accept raw images or raw structured data ......
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