Evoland-Land-Monitoring-Evolution / sentinel2_superresolution

Super-resolution of 10 Sentinel-2 bands to 5-meter resolution, starting from L1C or L2A (Theia format) products.
Apache License 2.0
52 stars 7 forks source link

FileNotFoundError: Could not find root XML file in product directory #6

Closed mirzawaqar closed 2 months ago

mirzawaqar commented 2 months ago

Kindly guide me to fix this issue/.

sentinel2_superesolution -i data/S2B_MSIL2A_20240424T054639_N0510_R048_T43SCS_20240424T080948.SAFE/ -roip 0 0 512 512 --l1c -o SR_data/ Traceback (most recent call last): File "/home/contec/Softwares/anaconda3/bin/sentinel2_superesolution", line 8, in sys.exit(run()) ^^^^^ File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/run.py", line 424, in run main(sys.argv[1:]) File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/run.py", line 231, in main s2_ds = Sentinel2L1C(args.input) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sensorsio/sentinel2_l1c.py", line 67, in init self.xml_file = self.build_xml_path() ^^^^^^^^^^^^^^^^^^^^^ File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sensorsio/sentinel2_l1c.py", line 222, in build_xml_path raise FileNotFoundError( FileNotFoundError: Could not find root XML file in product directory data/S2B_MSIL2A_20240424T054639_N0510_R048_T43SCS_20240424T080948.SAFE****

jmichel-otb commented 2 months ago

L2A format from ESA (sen2corr) is not supported as said in the doc. Either use L2A from Theia (theia.cnes.fr) or L1C.

mirzawaqar commented 2 months ago

Thank you for your prompt response. When I tried with L1C I got the following error.

sentinel2_superesolution -i data/S2B_MSIL1C_20240424T054639_N0510_R048_T43SCS_20240424T074017.SAFE/ -roip 0 0 512 512 --l1c -o SR_data/ Traceback (most recent call last): File "/home/contec/Softwares/anaconda3/bin/sentinel2_superesolution", line 8, in sys.exit(run()) ^^^^^ File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/run.py", line 424, in run main(sys.argv[1:]) File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/run.py", line 281, in main ort_session = ort.InferenceSession(args.model, sess_options=so, providers=ep_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "/home/contec/Softwares/anaconda3/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 472, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from /home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/../../models/carn_3x3x64g4sw_bootstrap.onnx failed:Load model /home/contec/Softwares/anaconda3/lib/python3.11/site-packages/sentinel2_superresolution/../../models/carn_3x3x64g4sw_bootstrap.onnx failed. File doesn't exist

jmichel-otb commented 2 months ago

Please have a look at this thread: https://github.com/Evoland-Land-Monitoring-Evolution/sentinel2_superresolution/issues/2#issuecomment-2084488465

jmichel-otb commented 2 months ago

A FAQ section has been added in README with this information.