allenai / satlas-super-resolution

Apache License 2.0
190 stars 24 forks source link

Data Normalization in Sentinel-2 #2

Closed csaybar closed 10 months ago

csaybar commented 11 months ago

Hi!,

First off, thank you so much for your effort in sharing the weights and code for SR (not many people in the field tend to do that)! Unfortunately, I am having some issues reproducing the results.

If I intend to apply the model in a fresh Sentinel-2 scene:

a) Should I use L1C or L2A data? If it's L2A, are you using Sen2Cor processing? In the https://satlas.allen.ai/map also seems like you applied a blur kernel to the Sentinel-2.

b) Did you apply any form of data normalization when converting the S2 data to .png?

Thank you very much!

https://satlas.allen.ai/map?state={%22view%22:{%22longitude%22:-113.30307090140528,%22latitude%22:44.503575173782934,%22zoom%22:14.606271409299431,%22pitch%22:0,%22bearing%22:0},%22showHeatmap%22:true,%22showAnimation%22:false,%22showSatellite%22:false,%22selectedDateOption%22:%222022-12%22,%22selectedDateOptionSecondary%22:%222016-01%22,%22selectedStartDateOption%22:%222016-01%22,%22selectedEndDateOption%22:%222022-12%22,%22selectedTreeCoverFill%22:[{%22label%22:%22None%22,%22isChecked%22:false},{%22label%22:%22Low%22,%22isChecked%22:false},{%22label%22:%22Medium%22,%22isChecked%22:true},{%22label%22:%22High%22,%22isChecked%22:true},{%22label%22:%22Full%22,%22isChecked%22:true}],%22selectedMarineInfra%22:[{%22label%22:%22Offshore%20Wind%20Turbines%22,%22isChecked%22:true},{%22label%22:%22Offshore%20Platforms%22,%22isChecked%22:false}],%22selectedRenewableEnergy%22:[{%22label%22:%22Solar%20Farms%22,%22isChecked%22:true},{%22label%22:%22Onshore%20Wind%20Turbines%22,%22isChecked%22:true}],%22selectedApplication%22:%22Super%20Resolution%22,%22selectedLayout%22:%22Single%20Map%22}

image

csaybar commented 11 months ago

I prepared a reproducible demo in colab: https://colab.research.google.com/drive/1OlrYome8gcBH6Wu3SQhaw6mSlr2apWdV?usp=sharing

Hope it helps!

pbeukema commented 10 months ago

Hi @csaybar, The main researcher of this work, @piperwolters, is on vacation this week but will get back to you asap. Thanks!

piperwolters commented 10 months ago

Hi!,

First off, thank you so much for your effort in sharing the weights and code for SR (not many people in the field tend to do that)! Unfortunately, I am having some issues reproducing the results.

If I intend to apply the model in a fresh Sentinel-2 scene:

a) Should I use L1C or L2A data? If it's L2A, are you using Sen2Cor processing? In the https://satlas.allen.ai/map also seems like you applied a blur kernel to the Sentinel-2.

b) Did you apply any form of data normalization when converting the S2 data to .png?

Thank you very much!

https://satlas.allen.ai/map?state={%22view%22:{%22longitude%22:-113.30307090140528,%22latitude%22:44.503575173782934,%22zoom%22:14.606271409299431,%22pitch%22:0,%22bearing%22:0},%22showHeatmap%22:true,%22showAnimation%22:false,%22showSatellite%22:false,%22selectedDateOption%22:%222022-12%22,%22selectedDateOptionSecondary%22:%222016-01%22,%22selectedStartDateOption%22:%222016-01%22,%22selectedEndDateOption%22:%222022-12%22,%22selectedTreeCoverFill%22:[{%22label%22:%22None%22,%22isChecked%22:false},{%22label%22:%22Low%22,%22isChecked%22:false},{%22label%22:%22Medium%22,%22isChecked%22:true},{%22label%22:%22High%22,%22isChecked%22:true},{%22label%22:%22Full%22,%22isChecked%22:true}],%22selectedMarineInfra%22:[{%22label%22:%22Offshore%20Wind%20Turbines%22,%22isChecked%22:true},{%22label%22:%22Offshore%20Platforms%22,%22isChecked%22:false}],%22selectedRenewableEnergy%22:[{%22label%22:%22Solar%20Farms%22,%22isChecked%22:true},{%22label%22:%22Onshore%20Wind%20Turbines%22,%22isChecked%22:true}],%22selectedApplication%22:%22Super%20Resolution%22,%22selectedLayout%22:%22Single%20Map%22}

image

Hi Cesar! Thank you for bringing up these questions.

1) We trained on L1C data, not L2A. And the images were warped to webmercator to make alignment of multiple input images easier.

2) As for normalization, see the Sentinel-2 Images section of the main Satlas [repo].(https://github.com/allenai/satlas/blob/main/Normalization.md#sentinel-2-images) We used the L1C's 8-bit TCI image files for training these models.