daleroberts / s2cloudmask

Sentinel-2 Cloud and Shadow Detection using Machine Learning
14 stars 2 forks source link

Problem during execution #1

Closed EmanuelCastanho closed 8 months ago

EmanuelCastanho commented 2 years ago

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()

I get these errors:

Screenshot 2022-02-02 at 17 10 09

DiarmuidMalanaphy commented 8 months ago

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"