a-PyTorch-Tutorial-to-Super-Resolution icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Super-Resolution copied to clipboard

FileNotFound?

Open ArtScanner opened this issue 5 years ago • 3 comments

File "C:\Users\The Computer\PycharmProjects\a-PyTorch-Tutorial-to-Super-Resolution-master\datasets.py", line 49, in init with open(os.path.join(data_folder, self.test_data_name + '_test_images.json'), 'r') as j: FileNotFoundError: [Errno 2] No such file or directory: './Set5_test_images.json'

ArtScanner avatar May 17 '20 09:05 ArtScanner

I have the same issue :( Some succeded to solve it ? Thanks

JauB1981 avatar Jul 13 '20 19:07 JauB1981

I am currently also trying to set this up. I'm not fully finished, but I think I can answer this issue.

Have a look at create_data_lists.py and set it up correctly with the path to the datasets that you will use. Then run python create_data_lists.py, from the folder where you want the json files to be generated.

Now that you have these json files, you see that they are called something_test_images.json. For running eval.py, you have to edit them in there as well.

I have not yet got it to work fully / tested it fully, but this is how I'm doing it:

create_data_lists.py:

from utils import create_data_lists

if __name__ == '__main__':
    create_data_lists(train_folders=[
                                    '/cluster/home/minker/mf6/train/'
                                    ],
                      test_folders=[
                                    '/cluster/home/minker/mf6/eval'
                                    ],
                      min_size=100,
                      output_folder='./')

eval.py (begin):

from datasets import SRDataset

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# Data
data_folder = "./"
test_data_names = ["eval"]

lucidBrot avatar May 17 '21 17:05 lucidBrot

from utils import create_data_lists

if name == 'main': create_data_lists(train_folders=[ '/cluster/home/minker/mf6/train/' ], test_folders=[ '/cluster/home/minker/mf6/eval' ], min_size=100, output_folder='./')

对应的test下,不应该是包括低分辩和高分辨两组图像吗?

ZhilingGuo avatar Nov 07 '21 09:11 ZhilingGuo