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

Has the Image Classification model been successfully replicated? #3

Open
plo97 opened this issue Jun 25, 2024 · 22 comments
Open

Has the Image Classification model been successfully replicated? #3

plo97 opened this issue Jun 25, 2024 · 22 comments
Assignees

Comments

@plo97
Copy link

plo97 commented Jun 25, 2024

No description provided.

@DotWang
Copy link
Collaborator

DotWang commented Jun 27, 2024

@plo97 do you mean whether the pretrained weight is loaded?

@Maoabear
Copy link

Hi,

I am attempting to run the baseline of the ImageClassification project, and I have loaded the weights from the following sources:

HyperSIGMA spat-vit-base-ultra-checkpoint-1599.pth
HyperSIGMA spec-vit-base-ultra-checkpoint-1599.pth
However, I am observing low test accuracy (around 0.4) for both models. I am wondering if I might be using the wrong weights. Could you please provide a runnable .ipynb notebook to help resolve this issue?

Thank you.

@DotWang
Copy link
Collaborator

DotWang commented Jul 23, 2024

@Maoabear Which dataset do you use? Do you finetuning or direct inference?

@Maoabear
Copy link

Hello,

I am using the notebook you provided at this link. I have replaced the .pth file as mentioned earlier.

The dataset should be the same as the default set in the notebook, the Indian one.

Thanks for your attention on this.

@DotWang
Copy link
Collaborator

DotWang commented Jul 24, 2024

@Maoabear How do you use the model weight, direct inference or training (finetuning)?

@Maoabear
Copy link

Hi, it seems neither direct-inference nor retraining work for me.

I was just following the code from that jupyter notebook, which seems contain a traning cell indeed. I am looking forward to re-train the weight from scratch and achieve the accuracy in reported in the paper.

Please see my code at
https://github.com/Linsonng/HyperSIGMA/blob/main/ImageClassification/demo_cls_hypersigma.ipynb and your suggestion is appreciated.

@DotWang
Copy link
Collaborator

DotWang commented Jul 24, 2024

@Maoabear It seems you run the classification? In our local experiments, classification accuracy is seriously affected by the type of normlization, and has low running efficiency. So we finally implement with segmentaion in the paper. The classification network is only used for the Xiongan dataset, see Table 15 in Section 5.7.

please see the readme of the ImageClassification folder.

@Maoabear
Copy link

Could you please provide the corresponding Xiongan Classification .ipynb for me to run directly and see the accuracy?

@Linsonng
Copy link

Hi @DotWang, would you mind pointing out how to reproduce the 85.54 classification accuracy on Indian Pines (shown on main/readme.md)? Would it be possible to train your classification model from scratch on Indian Pines to reach such results?

Thanks a lot for your help.

@jinyaoWHU
Copy link
Member

@Maoabear We have uploaded the relevant files now, you can download and use them directly.

@jinyaoWHU
Copy link
Member

@Linsonng Are you using demo seg hypersigma or demo cls hypersigma? 85.54 was obtained using demo seg hypersigma.

@Maoabear
Copy link

Thank you for updating the Xiongan Classification .ipynb, but I still need the Xiongan.mat to run this code. I also noticed that the code needs to import split_data2; could you please provide both of them?

@Linsonng
Copy link

@Linsonng Are you using demo seg hypersigma or demo cls hypersigma? 85.54 was obtained using demo seg hypersigma.

I am focusing on classification tasks. I am interested in the performance of your model on Indian Pines classification, can you tell me how to run on this? Thanks a lot!

@jinyaoWHU
Copy link
Member

@Maoabear We have re uploaded the file to ensure that it matches the required files for demo cls hypersigma, and there is no need to import new files separately. And you can download the Xiong'an dataset from the following website http://www.hrs-cas.com/a/share/shujuchanpin/2019/0501/1049.html

@jinyaoWHU
Copy link
Member

@Linsonng In our local experiments, classification accuracy is seriously affected by the type of normlization, and has low running efficiency. So we finally implement with segmentaion in the paper. The classification network is only used for the Xiongan dataset, see Table 15 in Section 5.7. You can directly run the demo seg hypersigma to obtain the results

@DotWang
Copy link
Collaborator

DotWang commented Jul 26, 2024

Hi @DotWang, would you mind pointing out how to reproduce the 85.54 classification accuracy on Indian Pines (shown on main/readme.md)? Would it be possible to train your classification model from scratch on Indian Pines to reach such results?

Thanks a lot for your help.

please see the readme of the ImageClassification folder, we use the segmentation network.

@Linsonng
Copy link

Screenshot 2024-07-26 at 15 40 45

@jinyaoWHU Thanks for your patience, but I am just wondering is it possible and how to make the performance here in this figure reproducible.

@Linsonng
Copy link

@DotWang Yes thanks for the kind suggestion. I can only see one line in the ImageClassification readme file, am I referring to the right file? If that's right, is there any classification model available? Thanks for your great work

@DotWang
Copy link
Collaborator

DotWang commented Jul 26, 2024

@Linsonng of course, we have said we use the segmentaion network to achieve the accuracy of 85.54 on indian pines, What exactly do you want to ask???????

It should be noted that in the hyperspectral community, the training samples are randomly selected, so the accuracy of the results may fluctuate, but the difference is not significant

@DotWang
Copy link
Collaborator

DotWang commented Jul 26, 2024

@Linsonng Up to now, we have not uploaded any finetuned model, so you may finetune it on the Indian Pines by initializing with the provided pretraining weights through demo seg hypersigma.ipynb.

@Linsonng
Copy link

@Linsonng of course, we have said we use the segmentaion network to achieve the accuracy of 85.54 on indian pines, What exactly do you want to ask???????

It should be noted that in the hyperspectral community, the training samples are randomly selected, so the accuracy of the results may fluctuate, but the difference is not significant

My interest is only in running classification task on Indian pines, and I come to this repo because I noticed that there is a figure in your paper saying so. A segmentation model is not my need. Thanks for your suggestion.

@DotWang
Copy link
Collaborator

DotWang commented Jul 26, 2024

@Linsonng Segmentaion can be seen image-level hyperspecral classification, it has the same output with the patch/pixel-level classification:

1722007977450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants