SMSR
SMSR copied to clipboard
HI,I have confirmed "main.py" and "dataset path". But there is a bug happening.
Can you help me? or showing more detailing configs file.
Traceback (most recent call last):
File "main.py", line 15, in
Hi @Jackyinuo, sorry for the late response.
It seems the reason is that len(self.images_hr)
equals 0. Please re-check the training images are correctly organized and confirm dir_data
(the parent path to the folder DIV2K
) is updated in option.py
.
Have you slove this problem? I also have this problem.
我也遇到了上面的问题,文件目录没有放错。
已解决: 1.首先将下载下载的数据集进入DIV2K文件夹内将DIV2K_train_HR和DIV2K_train_LR_bicubic文件名改为HR和LR_bicubic 2.其次将LR_bicubic/X2,X3,X4内部的文件全部命名为与HR文件内部一样的名字,也就是说将图片名称中的x2,x3,x4全部去掉,下面我放了重命名的代码,你们可以用,注意修改路径。 3.最后将--dir_data改成你DIV2K文件前一个目录的绝对路径,就可以了
import os import glob from PIL import Image file_root = r'E:\SMSR\SMSR-master\trainset\DIV2K\LR_bicubic\X2' for root, dirs, files in os.walk(file_root): for file in files: srcFile = os.path.join(file_root, file) dstFile = os.path.join(file_root, file.replace('x2', '')) os.rename(srcFile, dstFile)