Skip to main content

Hi !

I’m trying to reproduce GitHub s2cloudless examples, but my result isn’t as good. However, I copied example.



Somebody can explain to me why?

Nobody can help me? 😥


Hi,

We are looking into it. Could you please let us know which version of s2cloudless are you using?

 


Hi batic !


I’m using 1.2.1


Have you modified perhaps the threshold in cell 17?


We have run the example and it shows the correct results.


I used exactly the same parameters as example, the threshold is 0.4


Could you check the following:


  • The package has a simple built-in test to check if classifier is working correctly. Could you try running the test (described in Readme)?

  • If I understand correctly you copied the content of the notebook somewhere else? Could you try running the original notebook just to make sure you get the same result? available here

  • What Python version are you using?

  • What versions of packages scikit-learn, scikit-image, scipy and lightgbm are you using?

I hope this gives us some idea what went wrong.


  • I tried s2cloudless test and it returns the good message INFO:s2cloudless.test_cloud_detector:Test OK. Cloud probabilities and cloud masks match templates.

  • I tried running the original notebook and I got the same bad result

  • I’m using python 3.6.6

  • Modules version: scikit-learn 0.20.0, scikit-image 0.14.1, scipy 1.1.0, lightgbm 2.2.1


Good news - we managed to find the reason, why you are getting different results.


The problem is that you are using a Sentinel Hub layer which has atmospheric correction set to FULL. This layer is used to download Sentinel-2 bands and use them for cloud classification. Even though the layer default output is overridden by a custom script the atmospheric correction is still applied. Therefore service returns atmospherically processed band values which s2cloudless can’t classify correctly.


Hence setting atmospheric correction of your layer to None in Configurator should solve the problem.


Thanks for raising this issue. It is something we all have to be careful about. Therefore we plan to add a warning about this in the example notebook and some adjustments to the code.


Awesome ! I just tested and effectively that was it.

I’m writing a script for a temporal analysis on NDVI layer in specifics agricultural blocks.

I have some other questions and the best way is to write a new post for each of them, isn’t it?


Great to see it worked. 🙂


Yes, feel free to start a new topic for each of your questions.


Hi, I am having the same issue, and i think I could not deactivate atmosphgeric correction: how can i disable it in the configurator?


Reply