YuxiangZhang-BIT / IEEE_TGRS_LDGnet

Language-aware Domain Generalization Network for Cross-Scene Hyperspectral Image Classification, IEEE TGRS, 2023.
MIT License
43 stars 6 forks source link

matlab v7.3 #2

Open woshiwangzihao opened 1 year ago

woshiwangzihao commented 1 year ago

NotImplementedError: Please use HDF reader for matlab v7.3 files?本人小白,请问运行train时,这种错误如何解决?

lemyx commented 1 year ago

same

woshiwangzihao commented 1 year ago

hi,can i have you wechat or phone? 我是本科生,

woshiwangzihao commented 1 year ago

same hi,can i have you wechat or phone? 我是本科生,

lemyx commented 1 year ago

pip install h5py==2.9

import h5py

hsi = h5py.File('data/metadata/HSI-Language/Houston18/Houston18.mat')['ori_data'].value

data.shape # (48, 954, 210)

可以读取出.mat中的数据了, 但数据维度与原文中所声明的有差异:

We extract 48 spectral bands (wavelength range 0.38–1.05 um) from the Houston 2013 scene corresponding to the Houston 2018 scene and select the overlapping area of 209 × 955.

YuxiangZhang-BIT commented 1 year ago

pip install h5py==2.9

import h5py

hsi = h5py.File('data/metadata/HSI-Language/Houston18/Houston18.mat')['ori_data'].value

data.shape # (48, 954, 210)

可以读取出.mat中的数据了, 但数据维度与原文中所声明的有差异:

We extract 48 spectral bands (wavelength range 0.38–1.05 um) from the Houston 2013 scene corresponding to the Houston 2018 scene and select the overlapping area of 209 × 955.

The following changes have been made to utils HSl.py return io.loadmat(dataset) changed to return h5py.File(dataset).transpose(1, 2, 0)