Skip to content
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

[Feature]: Better documentation for what W&B does when logging a PyTorch tensor as a PIL Image #7377

Open
RylanSchaeffer opened this issue Apr 14, 2024 · 2 comments
Labels
a:cli Area: Client c:doc Component: Docs c:media

Comments

@RylanSchaeffer
Copy link

RylanSchaeffer commented Apr 14, 2024

Description

This is W&B's documentation for Images: https://docs.wandb.ai/ref/python/data-types/image

There are two cryptic sentences: "Note : When logging a torch.Tensor as a wandb.Image, images are normalized. If you do not want to normalize your images, please convert your tensors to a PIL Image."

Suggested Solution

Please say a little more about what this means. When you say images are normalized, what specifically is meant? Subtract the mean or divide by the maximum? Is the mean/maximum calculated per channel or over all three channels? Do we also divided by the standard deviations i.e. is this really standardization? Additionally, if we pass a numpy array instead of a torch tensor, is this normalization still applied?

More documentation about this point would be appreciated! I just wasted a lot of compute saving images that weren't the images I thought they were 😢

Alternatives

No response

Additional Context

No response

@JoanaMarieL
Copy link

Hello @RylanSchaeffer , thank you for your suggestion we appreciate this. I already created a feature request and tagged our Docs team to check it. We'll provide an update for any progress about it.

@kptkin kptkin added a:cli Area: Client c:doc Component: Docs c:media labels Apr 17, 2024
@TonyPolich
Copy link

Agreed! What is particularly unclear is if the images are normalised on a per image basis or per batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:cli Area: Client c:doc Component: Docs c:media
Projects
None yet
Development

No branches or pull requests

4 participants