Deci-AI / data-gradients

Computer Vision dataset analysis
Apache License 2.0
293 stars 33 forks source link

Fix questions display when asking n_channels #198

Closed Louis-Dupont closed 1 year ago

Louis-Dupont commented 1 year ago

Before

Which dimension corresponds the image channel?

Your tensor is of shape torch.Size([1, 640, 427, 3])
Options:
[0] | 0
[1] | 1
[2] | 2
[3] | 3

Your selection (Enter the corresponding number) >>> 2
Great! You chose: `2`

Now

How many channels compose your image?

Your tensor is of shape torch.Size([1, 640, 427, 3])
Options:
[0] | 1
[1] | 640
[2] | 427
[3] | 3

Your selection (Enter the corresponding number) >>> 2
Great! You chose: `427`

Motivation I fel the old approach was very confusing - weird looking.

Your tensor is of shape torch.Size([1, 3, 640, 427])
Options:
[0] | 0
[1] | 1
[2] | 2
[3] | 3

In this case, I intuitively want to press 3 (for RGB) but 3 represents the 3. index, i.e. 427. It's more intuitive to choose the number of channels (e.g. 3 for RGB), than the dimension index