-
Notifications
You must be signed in to change notification settings - Fork 42
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
数据提取过程为什么找不到文件夹,我已经创建了但是找不到 #41
Comments
./data/MSRS_train_imgsize_128_stride_200.h5 为什么创建不了这个呢 |
在测试阶段,这个错误不知道该怎么解决 |
在目录下建一个data文件夹就行 |
Here's the code I modified to run without errors! def get_img_file(file_name): def rgb2y(img): def Im2Patch(img, win, stride=1): def is_low_contrast(image, fraction_threshold=0.1, lower_percentile=10, data_name="MSRS_train" IR_files = sorted(get_img_file(r"/MSRS_train/train/ir")) assert len(IR_files) == len(VIS_files) #create the directory if it doesn't exist file_path = os.path.join(output_dir, data_name + 'imgsize' + str(img_size) + "stride" + str(stride) + '.h5') h5f = h5py.File(file_path, 'w') for i in tqdm(range(len(IR_files))):
h5f.close() with h5py.File(file_path,"r") as f: |
Thank you bro! |
还是不行呀 这个下载的大小为0KB有佬来解释下吗 |
创建data文件夹后,然后.\data相对路径改成绝对路径 |
Traceback (most recent call last):
File "dataprocessing.py", line 50, in
h5f = h5py.File(os.path.join('.\data',
File "/root/miniconda3/envs/cddfuse/lib/python3.8/site-packages/h5py/_hl/files.py", line 562, in init
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
File "/root/miniconda3/envs/cddfuse/lib/python3.8/site-packages/h5py/_hl/files.py", line 241, in make_fid
fid = h5f.create(name, h5f.ACC_TRUNC, fapl=fapl, fcpl=fcpl)
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 122, in h5py.h5f.create
FileNotFoundError: [Errno 2] Unable to synchronously create file (unable to open file: name = '.\data/MSRS_train_imgsize_128_stride_200.h5', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 242)
The text was updated successfully, but these errors were encountered: