-
Notifications
You must be signed in to change notification settings - Fork 411
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
Dataset plotting: normalization #1263
Comments
Before #476, we basically had this functionality for most of our |
In my own plotting funcs I have been applying the |
Summary
At the moment, our dataset plotting routines are inconsistent. While some plot methods stretch to the range of the image, others simply divide by 3K or 10K and clip to get images to the range of 0–1. I propose we convert the latter to the former and consistently stretch images for all datasets.
Rationale
While technically correct, many of our plotting methods make it difficult to visualize images. This is especially true for datamodules, where normalization has been applied to all images and images are no longer in the uint8 or float32 range of the original data.
Implementation
I propose we use one of the default visualization options used by QGIS:
We already have a
torchgeo.datasets.utils.percentile_normalization
method we could use or modify for this purpose.Alternatives
We could apply an inverse Normization transform during datamodule plotting. This would help with datamodule plotting, but still suffers from inconsistent dataset plotting. It would only be a couple lines of code though, which would make it much easier.
Additional information
@calebrob6 we discussed this on Slack or somewhere.
Note that this contradicts #496, so we should decide on one approach or another.
The text was updated successfully, but these errors were encountered: