ZhaohuiXue / A-SPN-release

A DEMO for "Attention-Based Second-Order Pooling Network for Hyperspectral Image Classification" (Xue et al., TGRS, 2021)
28 stars 5 forks source link

the question about two files--Indian_pines_mirror_pca.npy and Indian_pines_rgb.npy #2

Open lu77777777 opened 3 years ago

lu77777777 commented 3 years ago

Thank you so much for your coding sharing. I have few questions in this code, if available, could you please answer me?

  1. The question for Indian_pines_mirror_pca.npy. Is this file already down the PCA processing but didn't decrease the dimension?
  2. I don't understand the function of Indian_pines_rgb.npy.
  3. And why the size of these two files is 215215200, and 2152153 respectively?

Thank you so much.

mengxue-rs commented 3 years ago

Hi lu, welcome you ask these three questions. Corresponding explanations are listed as follows.

  1. the /temp_vars folder records temporary results of PCA preprocessing, i.e., the Indian_pines_mirror_pca.npy stores the PCA processing result for the Indian_pines data set. More details see the def PCAMirrowCut(dataID, X, hw, num_PC=0, type='HSI'):.
  2. The Indian_pines_rgb.npy could be useful to track the original HSI patch for visualization if needed.
  3. Both these two files have not only run PCA but also run def mirror_concatenate(x, max_hw=default_max_hw):, which pre-borders the PCA processing result convenient for dynamically generating input patches.
HK-1T commented 11 months ago

Thank you so much for your coding sharing. I have a questions in this code, if available, could you please answer me? 1.Will directly modifying the spectral dimension value in the image_size_dict reduce the dimensionality? Or how do I set up dimensionality reduction?

HK-1T commented 11 months ago

Thank you so much for your coding sharing. I have a questions in this code, if available, could you please answer me? 1.Will directly modifying the spectral dimension value in the image_size_dict reduce the dimensionality? Or how do I set up dimensionality reduction?

mengxue-rs commented 11 months ago

Thank you so much for your coding sharing. I have a questions in this code, if available, could you please answer me? 1.Will directly modifying the spectral dimension value in the image_size_dict reduce the dimensionality? Or how do I set up dimensionality reduction?

Thanks for your question, please tune the 'pc' of main.py for modifying the spectral dimension. About DR, try to implement your DR algorithms in the dimension Reduction 2d of data.py.

HK-1T commented 11 months ago

Thank you so much for your coding sharing. I have a questions in this code, if available, could you please answer me? 1.Will directly modifying the spectral dimension value in the image_size_dict reduce the dimensionality? Or how do I set up dimensionality reduction?

Thanks for your question, please tune the 'pc' of main.py for modifying the spectral dimension. About DR, try to implement your DR algorithms in the dimension Reduction 2d of data.py. Thanks for the reply!Depending on the method you provide: Is it normal for accuracy to decrease accuracy after PCA dimensionality reduction? For example, if 10% of IP data is used, the accuracy reaches 99% without dimensionality reduction, and after the dimensionality is reduced to 30, the accuracy reaches 90%