YuxiangZhang-BIT / IEEE_TIP_SDEnet

Single-source Domain Expansion Network for Cross-Scene Hyperspectral Image Classification, IEEE TIP, 2023.
MIT License
34 stars 8 forks source link

Pavia数据集OSError: Unable to synchronously open file (file signature not found) #4

Open xcxcever opened 9 months ago

xcxcever commented 9 months ago

作者您好 我用Houston做实验的时候是可以运行的,用Pavia数据集出现以下错误,请问有什么解决的办法吗 Traceback (most recent call last): File "D:\code\IEEE_TIP_SDEnet-morphFormer\IEEE_TIP_SDEnet-main\train.py", line 266, in experiment() File "D:\code\IEEE_TIP_SDEnet-morphFormer\IEEE_TIP_SDEnet-main\train.py", line 114, in experiment img_src, gt_src, LABEL_VALUES_src, IGNORED_LABELS, RGB_BANDS, palette = get_dataset(args.source_name, File "D:\code\IEEE_TIP_SDEnet-morphFormer\IEEE_TIP_SDEnet-main\datasets.py", line 131, in get_dataset img = np.asarray(open_file(folder + 'paviaU.mat')['ori_data']).transpose(1, 2, 0) File "D:\code\IEEE_TIP_SDEnet-morphFormer\IEEE_TIP_SDEnet-main\utils_HSI.py", line 47, in open_file return h5py.File(dataset) File "D:\anaconda3\envs\SDE\lib\site-packages\h5py_hl\files.py", line 562, in init fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) File "D:\anaconda3\envs\SDE\lib\site-packages\h5py_hl\files.py", line 235, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 102, in h5py.h5f.open OSError: Unable to synchronously open file (file signature not found)

num-doc commented 8 months ago

datasets.py 中 修改如下 from scipy import io elif dataset_name == 'paviaU': img = io.loadmat(folder + 'paviaU.mat')['ori_data'] gt = io.loadmat(folder + 'paviaU_7gt.mat')['map']

其他数据集同理修改