=> As already explained in a previous post, we obtained some Sentinel-2 hand made cloud masks from GEOSYS company. We used those to validate the cloud masks from MACCS/MAJA. But we wanted to use them further to make a quantitative comparison with Sen2Cor cloud masks.But this comparison required solving a little issue : GEOSYS cloud masks are generously dilated to avoid any risk to let a cloud pass through the operational processing. Those of MACCS:MAJA are also dilated while those of Sentinel-2 are not at all. In the following paragraphs, we’ll explain how we solved that issue. Sen2cor (v2.3.0) has also three levels of cloud mask (High Medium and Low probability). We used here the Medium Probability mask. But let’s start with the final result comparing the performances of Sen2Cor and MACCS:MAJA. 

Overall accuracies for MACCS/MAJA, in red and Sen2cor, in blue for 11 images compared to GEOSYS cloud masks.

Direct comparison of Sen2Cor et GEOSYS masks :

SEN2COR/GEOSYS
20161231 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 14.68 9.67
clear_geosys 3.36 72.29 86.97
20170103 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 0.71 4.99
clear_geosys 3.33 90.98 91.69
20170113 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 15.74 20.26
clear_geosys 2.3 61.69 77.43
20170202 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 60.63 26.31
clear_geosys 0.99 12.07 72.7
20160209 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 81.89 11.36
clear_geosys 0.13 6.62 88.51

The overall accuracy (OA), which is the percentage of well classified pixel, is not very good,  85%. We noted that when there are many small clouds in the image, there were many pixels classified as cloud free by Sen2Cor, which are classified as clouds by GEOSYS. Some part of teh difference might be due to the difference in dilation.

Comparison of SEN2COR dilated cloud mask with GEOSYS cloud mask

To solve this issue, I dilated the Sen2Cor cloud mask by the same buffer as MACCS cloud mask (480m).The results are shown hereafter :

SEN2COR dilaté /GEOSYS
20161231 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 22.91 1.43
clear_geosys 38.6 37.06 59.97
20170103 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 3.52 2.17
clear_geosys 43.97 52.51 56.03
20170113 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 31.47 4.53
clear_geosys 29.38 34.62 66.09
20170202 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 80.58 6.36
clear_geosys 8.11 4.95 85.53
20160209 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 88.74 4.51
clear_geosys 2.37 4.38 93.12

 We see that results improve for the mos cloudy images, but decrease a lot for the most cloud free images. This is due to the fact that Sen2Cor often wrongly detects buildings as clouds. Once dilates, these small clouds cover a large surface, as in the image below, and degrade the comparison.

Comparison of Sen2cor cloud mask, before dilation, with MACCS cloud mask, over Orléans tile (31UDP). Clouds are circled in green and shadows in yellow.

Comparison of Sen2Cor et GEOSYS eroded cloud mask

To miitigate this issue again, instead of dilating Sen2Cor cloud mask, I eroded GEOSYS cloud mask, before comparing it to Sen2Cor. Here are the results for the same images over Orléans :

SEN2COR/GEOSYS Erodé
20161231 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 14.54 8.29
clear_geosys 3.51 73.67 88.21
20170103 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 0.65 3.87
clear_geosys 3.39 92.09 92.74
20170113 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 15.04 14.8
clear_geosys 3 67.16 82.2
20170202 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 59.84 24.62
clear_geosys 1.78 13.76 73.6
20160209 confusion % cloud_sen2cor clear_sen2cor OA
cloud_geosys 81.32 10.54
clear_geosys 0.7 7.44 88.76

 In tha case, we get some improvement comparerd the the direct comparison. The large number of false detection covers only a little percentage of the image, and the agreement with GEOSYS reference is correct for the least cloudy images. But large discrepancies are still observed for the very cloudy images. Anyway, you know how kind I am, i selected the result most favorable to Sen2Cor to make the comparison with MACCS/MAJA, which I extended to the three available sites in France (Arles, Orleans et Toulouse); 

Comparison with MACCS/MAJA

If we summarize, the overall accuracy of SEN2COR or MACCS / MAJA cloud masks using GEOSYS (eroded in the case of SEN2COR) as reference, the results already presented above are obtained. It can be seen that MACCS / MAJA prevails in all but one case (Orléans 20170215), with a very low difference on that case. In general, the two codes are more or less in agreement when the images are clear, but diverge when the images are cloudy. The average overall accuracy for all cases is 94.2 % for MACCS/MAJA and 86.1 % for SEN2CORAs a side result, this study confirms that it is also rather complicated to dilate Sen2Cor cloud because of the scattered wrong clouds. The fact that the reference cloud masks include some dilatation might be a cause of the difference, but anyway, the results are a clear demonstration that over France, MACCS/MAJA cloud masks are fit for an operational use.  Encore un grand merci à GEOSYS pour avoir fourni ses masques de référence, et à l’ESA pour la distribution du logiciel Sen2Cor (sans oublier les données Sentinel-2A)  

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.