Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3B_tile-based_classification_with_EuroSAT_data: Classification failed #2

Open
AmschlAl opened this issue Feb 9, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@AmschlAl
Copy link

AmschlAl commented Feb 9, 2022

Hi,
I am using the code from "[3B_tile-based_classification_with_EuroSAT_data]" in an own jupyter notebook to classify a sentinel scene.
I've used your Sentinel-Data "S2A_MSIL1C_20210331T100021_N0300_R122_T33TTG_20210331T113321.SAFE/" as input data (and for me as reference to check if its working) and trained a model based on EuroSAT benchmark (all 13 bands) with the script "3B_tile-based_classification_with_EuroSAT_data_training.ipynb".

The same code, but a different result.
Classification_Italy

Something went wrong with the classification and I cannot figure it out why.
There is a difference by loading the data (e. g. 3B_tile-based_classification_with_EuroSAT_data_training.ipynb) with the function glob.glob(). In your case the folder/files load alphabetically. In my case it is kind of random, so I sorted folder_for_training manually. The result changed, but it is still different.

Any idea what is going wrong?

Edit: I have changed some parameters by training the model. For now this is the best result:
220223_V2

220223_V2_curve

The learn curves look fine. The model detects land use areas in a good way, but the classes are missmatched.

When I use your pretrained model "keras_sentinel2_classification_trained_model_e50_9190.h5" everything looks fine.
9190
So the mistake happens somewhere by training the model.

Is it possible to call the parameters of your pretrained model? Not only the architecture (model.summary()), also the parameters of e.g. learning rate, epochs, batch size, ....?

@cfortunylombra cfortunylombra self-assigned this Mar 22, 2022
@cfortunylombra cfortunylombra added the bug Something isn't working label Mar 22, 2022
@cfortunylombra
Copy link
Collaborator

cfortunylombra commented Mar 22, 2022

Hi @AmschlAl,
Thank you for pointing this out. Since you are not using the WEkEO JupyterHub, I think that you will solve the issue by changing the following code from:

for j in range(0,len_data_for_training_tmp):

to:

for j in range(0,len(data_for_training_tmp)):

(I hope your RAM memory is at least 16 GB). If this does not solve the issue, please let me know and we will try to cope with it in a different way.
Greetings, Carlos
P.S.: Sorry for the late reply, I just saw this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants