This is my small script to test s2cloudmask, I don't know if I understood the input right:
import rasterio as rio
import matplotlib.pyplot as plt
import s2cloudmask as s2cm
Data = rio.open("data/T26SMH_20181207T124031_TCI_10m.jp2")
DataArray = Data.read(1)
Mask = s2cm.cloud_mask(DataArray, model='spectral')
plt.imshow(Mask)
plt.show()
you have to install the packages, hdmedians and pcm.
Depending on your python version you should type
"pip install pcm" and "pip install hdmedians" or
"pip3 install pcm" and "pip install hdmedians"
This is my small script to test s2cloudmask, I don't know if I understood the input right:
I get these errors: