sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.43k stars 670 forks source link

How to train EDSR on own dataset #328

Open Techzist16 opened 2 years ago

Techzist16 commented 2 years ago

I have tried to train the EDSR network on other dataset. For that I have made folder named "dataset". In dataset folder, two sub-folders named "DIV2K_train_HR" and "DIV2K_train_LR_bicubic" are created under DIV2K folder and HR and LR images are stored in the respective folders. In option.py code, I have changed the path: parser.add_argument('--dir_data', type=str, default='dataset/DIV2K/', help='dataset directory')

But, while compiling the train code using this following command: python main.py --model EDSR --scale 2 --patch_size 96 --save edsr_baseline_x2 --reset I got this error:

this name DIV2K Traceback (most recent call last): File "main.py", line 14, in <module> loader = data.Data(args) File "E:\Deep_learning\EDSR\src\data\__init__.py", line 11, in __init__ trainset = getattr(module_train, args.data_train)(args) File "E:\Deep_learning\EDSR\src\data\div2k.py", line 7, in __init__ args, name=name, train=train, benchmark=benchmark File "E:\Deep_learning\EDSR\src\data\srdata.py", line 24, in __init__ data_range = [r.split('-') for r in args.data_range.split('/')] AttributeError: 'Namespace' object has no attribute 'data_range'

Please help me to solve this issue. Thank you.

1632325673 commented 1 year ago

Hello, have you solved this problem