EnMAP-Box / enmap-box

EnMAP-Box source code repository. See https://enmap-box.readthedocs.io for documentation
GNU General Public License v3.0
35 stars 16 forks source link

"An error occurred during inversion" #540

Closed Danro77 closed 1 year ago

Danro77 commented 1 year ago

Hey,

i am currently doing the EO-College course "Beyond the Visible – Imaging Spectroscopy for Agricultural Applications". In chapter 5 it is explained how to create a synthetic training data set and an ANN. The Workflow is to create a look-up table and train the ANN with this table. Last I want to apply my ANN to my image with the ANN Vegetation processor and get the following error message:

"An error occurred during inversion: X has 184 features, but StandardScaler is expecting 202 features as input."

I work with a downloaded EnMAP Dataset from the EnMAP Data Access Portal and also chose EnMAP as my Sensor while creating the look-up table. I have no idea where i can find the root of this message and hope that someone else also faced and maybe solved this problem.

janzandr commented 1 year ago

@Maesiu, can you help?

Maesiu commented 1 year ago

There might be an old spectral response function implemented. Can you tell me how many bands there are when you create the LUT and the number of bands of your EnMAP imagery?

janzandr commented 1 year ago

...the number of bands of your EnMAP imagery?

Ah, maybe I have an idea, where the problem arises. The EnMAP L2A product import has several options for handling bands inside the detector overlap region. The default is to only use SWIR bands. image

Danro77 commented 1 year ago

As overlap region I chose "order by detector". When I tried the other options the number of features changed but I still get the same error message. If i choose "moving average filter" my QGIS crashes..

My EnMAP image has 224 bands and when I create the LUT it says 242 bands.

Maesiu commented 1 year ago

You can create a spectral response function via "add new sensor" in the create look up table tool and extract it from your EnMAP images .hdr file. But the image must be available (exported) as .bsq

Danro77 commented 1 year ago

Creating an own spectral response function worked!

Thank you very much! 👍