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

Issue with cloud detector pickle file #9

Closed jgomezdans closed 2 years ago

jgomezdans commented 3 years ago

I have sklearn 0.24.1 installed, but it appears that the cloud detector pickle file is incompatible with this:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-3016c41f79c7> in <module>
----> 1 import SIAC

~/SIAC/SIAC/__init__.py in <module>
----> 1 from .SIAC_S2 import SIAC_S2
      2 from .SIAC_L8 import SIAC_L8
      3 from .the_aerosol import solve_aerosol
      4 from .the_correction import atmospheric_correction
      5 from .atmo_solver import solving_atmo_paras

~/SIAC/SIAC/SIAC_S2.py in <module>
     11 from datetime import datetime
     12 from SIAC.create_logger import create_logger
---> 13 from SIAC.s2_preprocessing import s2_pre_processing
     14 from SIAC.the_aerosol import solve_aerosol
     15 from SIAC.the_correction import atmospheric_correction

~/SIAC/SIAC/s2_preprocessing.py in <module>
     30 file_path = os.path.dirname(os.path.realpath(__file__))
     31 gc.disable()
---> 32 cl = pkl.load(open(file_path + '/data/sen2cloud_detector.pkl', 'rb'))
     33 gc.enable()
     34 cl.n_jobs = multiprocessing.cpu_count()

ModuleNotFoundError: No module named 'sklearn.preprocessing.label'

This might just need "re-pickling" the cloud detector again.

jgomezdans commented 3 years ago

I solved this by installing an older version of scikit-learn (0.23.1), but worth noting.

MarcYin commented 3 years ago

Thanks for reporting this! There is a new version of CNN cloud and shadow mask trained by myself, which will be used in next version of the code and I think this issue should be resolved after I commit it...

MarcYin commented 2 years ago

This has been fixed.