MarcYin / SIAC

A sensor invariant Atmospheric Correction (SIAC)
http://www2.geog.ucl.ac.uk/~ucfafyi/Atmo_Cor/
GNU Affero General Public License v3.0
61 stars 17 forks source link

do cloud Error #12

Closed SOEDLI closed 1 year ago

SOEDLI commented 2 years ago

I want to use the method to deal the Sentinel-2A data.. begin to run SIAC_S2.py,a mistake in s2_preprocessing.py: cloud_proba = cl.predict_proba(toas[:, mask].T)

raise LGBMNotFittedError("Estimator not fitted, call fit before exploiting the model.") NotFittedError: Estimator not fitted, call fit before exploiting the model.

I'm not good at Python,can y tell me why?

SOEDLI commented 2 years ago

I want to use the method to deal the Sentinel-2A data.. begin to run SIAC_S2.py,a mistake in s2_preprocessing.py: cloud_proba = cl.predict_proba(toas[:, mask].T)

raise LGBMNotFittedError("Estimator not fitted, call fit before exploiting the model.") NotFittedError: Estimator not fitted, call fit before exploiting the model.

I'm not good at Python,can y tell me why?

2022-05-15 11:41:49,682 - SIAC-V2.3.5 - INFO - Preprocessing for S2A_OPER_MSI_L1C_TL_SGS__20190422T062206_A020006_T51STD_N02.07 2022-05-15 11:41:49,683 - SIAC-V2.3.5 - INFO - Doing per pixel angle resampling. 2022-05-15 11:44:30,872 - SIAC-V2.3.5 - INFO - Getting cloud mask.

NotFittedError: Estimator not fitted, call fit before exploiting the model.

MarcYin commented 2 years ago

Hi, what version of sklearn are you using? Is this related to Issues #9 ?

SOEDLI commented 2 years ago

my scikit-learn version:0.22.1,I know the procedure need scikit-learn version<=0.23.1 this seems to be a new problem,not Issues https://github.com/MarcYin/SIAC/issues/9, and I dont know the meaning of "raise LGBMNotFittedError("Estimator not fitted, call fit before exploiting the model.")"

MarcYin commented 2 years ago

I have not experienced with that issue before, but it seems to be that the sk-learn not being able to open the trained cloud lgb model properly. So, could you please try to download the cloud detector sen2cloud_detector.pkl and put it into SIAC/SIAC/data/ under where you install the SIAC package. Or, maybe just try to reinstall it with: pip install https://github.com/MarcYin/SIAC/archive/master.zip

MarcYin commented 2 years ago

This should have been fixed with the new version.