You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading samples from the SEN12MS dataset, the Sentinel-1 dB values (floats ranging from around -30 to 0) are cast to int32, discarding a lot of important information.
Fixing this would require either breaking the current behaviour where S1 and S2 imagery are stacked into a single tensor, or casting everything to float32 (not sure if this is okay for S2 data)
The text was updated successfully, but these errors were encountered:
I vote for casting everything to float32. I think PyTorch will automatically do this for us, so all you have to do is remove the cast to int32. Want to open a PR?
I believe the reason for the cast is that the Sentinel-2 imagery comes as uint16 data, which is not a thing in torch. In general, the geo-tiffs have the following datatypes:
My current workaround is to just cast the uint16 to int32 and leave the others as they are. As you said, PyTorch will automatically cast the result to float32 when stacking.
Also not sure about the labels – but I don't believe having them as int32 is that useful.
When loading samples from the SEN12MS dataset, the Sentinel-1 dB values (floats ranging from around -30 to 0) are cast to int32, discarding a lot of important information.
This line seems to be the culprit.
Fixing this would require either breaking the current behaviour where S1 and S2 imagery are stacked into a single tensor, or casting everything to float32 (not sure if this is okay for S2 data)
The text was updated successfully, but these errors were encountered: