sentinel-hub / sentinel2-cloud-detector

Sentinel Hub Cloud Detector for Sentinel-2 images in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does the size of image matter?

daisy12321 opened this issue · comments

I am making predictions on a collection of cropped small parts of sentinel-2 image (20x20 pixels at original resolution) for computational reasons.

Does the size of the image matter? My understanding is that the model is applied on a pixel-by-pixel basis. Suppose if I set the dilation_size and average_over to zero, does that mean I will get the same result compared to if I make prediction on the entire jp2 image, and crop the prediction to the 20x20 pixel area of interest?

Hi @daisy12321,

s2cloudless model returns predictions for each pixel, but later post-processing includes morphological operations to dilate (controlled with dilation_size) and smooth predictions (controlled with average_over). If these are set to 0, no post-processing step will be done, and the results will be direct outputs from the model.

From that perspective, running model on 20x20 AOI or full jp2 image without post-processing steps will return the same predictions over your 20x20 AOI. On the other hand, if you use post-processing, the results might differ, as some morphological operations from surrounding of your 20x20 AOI might influence the results within the AOI.

Hope that helps. Please close the issue if it does :)

👋

Super helpful! Thank you and that exactly answered my question