ricardoborsoi / Unmixing_with_Deep_Generative_Models

Spectral unmixing using deep generative models
27 stars 6 forks source link

missing vae_EM_idx4 for data_ex4.mat #4

Open khalidcoding opened 1 year ago

khalidcoding commented 1 year ago

Hello, hope you're doing well. it seems that I have a problem with running vae_EM_idx4 for example 4 data cube because I'm having a problem with training it automatically by python so I'm using colab.research.google to train it, so if I'm. not mistaken I think I must be missing a latent_ref_EM_idx4.mat MAT-file.

Screenshot 2023-05-13 at 04 10 32

if you could help me I would really appreciate it. thank you and have a good day

ricardoborsoi commented 1 year ago

Hello @khalidcoding, I don't know exactly how the Matlab and Python integration is being managed in Colab, but there is one thing to be mindful about how the VAEs are trained. In file train_DeepGen_EM_model.m, there is a for loop in line 72 which, for each endmember, saves the training samples in file python/training_EM_data.mat (line 83) and then runs the python script in line 86. If you want to train the VAEs outside of matlab, you will need to save those files separately (using different file names), since the command python python/vae_keras_ems_train.py' must be executed for each of them separately. The alternative is to edit the python code vae_keras_ems_train.py so you can specify which filename is being loaded as an additional parameter.

khalidcoding commented 1 year ago

hello @ricardoborsoi , thank you but I managed to solve it

ricardoborsoi commented 1 year ago

Glad to hear that you were able to solve the issue!

khalidcoding commented 1 year ago

Hello @ricardoborsoi, One last thing if you could help me with, I don't know what happened now, I didn't change anything in the code but when I use data_ex1 this error appear

Screenshot 2023-05-30 at 13 36 44

and it works fine with data_ex4

ricardoborsoi commented 1 year ago

Hi @khalidcoding , the error message does not give much information, but I guess it is being caused by the autoencoders/generative models trained from example 4 being loaded in the code and used with the data from example 1, instead of the autoencoders trained from the example 1 data itself. These examples have different amounts of spectral bands. I'd recommend checking it.