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

AssertionError #3

Open
ArkZero35 opened this issue Nov 29, 2024 · 3 comments
Open

AssertionError #3

ArkZero35 opened this issue Nov 29, 2024 · 3 comments

Comments

@ArkZero35
Copy link

data_path = "/root/autodl-tmp/HSIMAE/HSIMAE/Finetuning dataset/Envi_standard_format/WHU-Hi-LongKou/WHU-Hi-LongKou" # numpy array, [h, w, Bands]
gt_path = "/root/autodl-tmp/HSIMAE/HSIMAE/Finetuning dataset/Envi_standard_format/WHU-Hi-LongKou/WHU-Hi-LongKou" # numpy array, [h, w]

When I try to use WHU-Hi-LongKou dataset, "assert len(data_cubes) == gt.shape[0]" can not pass.
Becasues data_cubes.shape is (220000, 9, 9, 32), but gt.shape is (59400000,)
Please tell me what should I do, thank you very much.

@Ryan21wy
Copy link
Owner

Ryan21wy commented Dec 2, 2024

The size of WHU-Hi-LongKou dataset was 550×400×270 (h×w×Bands), and 550×400=220,000, 550×400×270=59,400,000. The shape of gt should be (550×400) and reshape to (220,000,). Maybe you treat the HSI data as gt?

@ArkZero35
Copy link
Author

ArkZero35 commented Dec 2, 2024 via email

@Ryan21wy
Copy link
Owner

Ryan21wy commented Dec 3, 2024

那可能是Envi格式的问题,可以试试Matlab格式,在这里下载 http://rsidea.whu.edu.cn/resource_WHUHi_sharing.htm

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

2 participants