pansism / downscale-satelliteLST

A python class for enhancing the spatial resolution of satellite-derived Land Surface Temperatures (LST) using statistical downscaling.
MIT License
57 stars 24 forks source link

Padding on the bottom and right edges of result #5

Open pramitghosh opened 2 years ago

pramitghosh commented 2 years ago

Hi,

The code runs perfectly on my own dataset consisting of principal components of several predictors and a low-resolution LST image.

%Run example_using_SEVIRI_data.py

Downscaling started at:   01/02/2022, 15:52

SETTINGS
========
Residual Correction:           True
R2-threshold:                  0.0
Missing pxls threshold:        40.0%
Train/test size split:         0.7/0.3
Parallel jobs:                 1
Hyperarameter tuning trials:   60

Building the regression models.
  Processing band 0:
    Tuning the random forest hyperparameters...   Done [CV R2 score = 0.54]
    Tuning the ridge hyperparameters...           Done [CV R2 score = 0.48]
    Tuning the svr hyperparameters...             Done [CV R2 score = 0.35]
/home/pramit/.local/lib/python3.9/site-packages/sklearn/linear_model/_coordinate_descent.py:647: ConvergenceWarning: Objective did not converge. You might want to increase the number of iterations, check the scale of the features or consider increasing regularisation. Duality gap: 1.408e-02, tolerance: 1.181e-02
  model = cd_fast.enet_coordinate_descent(
    The R2 score of the ensemble model is: 0.56   PASS

Models that passed the checks: 1/1

Downscaling the corresponding LST bands...
Downscaling LST band 0:   [#########################] 100.00% 

Downscaling completed in: 222.5 sec
Writing to GeoTiff...     Done
Generating report...      Done
LST bands that have been downscaled:
[0]

However, the result exhibits a padding effect on the bottom and right edges only that looks like a frame, as visible in the screenshot below. No such artefacts exist in any of the inputs to the model.

image

The width of this "frame" is different at the two edges. Could it be because of the warning that was raised? I look forward to your opinion on this and a possible solution will, of course, be lovely. Thanks in advance!

pansism commented 2 years ago

Hi!

No, I don't think this is caused by the error you got.

It is difficult to troubleshoot without the data you use. Nevertheless, can you check the following:

1) Do you use the same Fill Value for missing and padding pixels in the fine resolution predictors? 2) Can you apply the processing again without using the residual correction? You can de-activate it as such: DLST = data.ApplyDownscaling(residual_corr=False)

Let me know if the above helped

pramitghosh commented 2 years ago

Hi! Sorry, but I haven't been able to try out your suggestions. Still, I don't think point 1 is true but I have to check. I will try out point 2 once I have some time and let you know if that helped. Thanks, once again. :-)