Cross-Scale-Non-Local-Attention icon indicating copy to clipboard operation
Cross-Scale-Non-Local-Attention copied to clipboard

Location for models and datasets

Open surfingnirvana opened this issue 4 years ago • 4 comments

Where do i have to put the models and the dataset folders?

surfingnirvana avatar Jun 12 '20 08:06 surfingnirvana

Where do i have to put the models and the dataset folders?

Hi, you can put the datasets to anywhere you like and then specify the data_dir in the options.py to that directory, e.g., create a folder “data” and then put DIV2K and benchmark datasets into that folder and set the data_dir argument as the path to “data”. Similarly, you can also put the models to anywhere you like and set the pre_trained as the path to the models.

HarukiYqM avatar Jun 12 '20 15:06 HarukiYqM

Hi Thanks for your work

New to this area, And wonder ask why I have copied 800 images to ../../DIV2K/bin/DIV2K_train/ ,but the training codes returns got no samples as follows, can you tell me what should I do , Thanks Traceback (most recent call last): File "main.py", line 39, in <module> main() File "main.py", line 27, in main loader = data.Data(args) File "/mnt/data0/home/***/SR/csnln/Cross-Scale-Non-Local-Attention-master/src/data/__init__.py", line 35, in __init__ num_workers=args.n_threads, File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 224, in __init__ sampler = RandomSampler(dataset, generator=generator) File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 96, in __init__ "value, but got num_samples={}".format(self.num_samples)) ValueError: num_samples should be a positive integer value, but got num_samples=0

And by the way, Can you explain how you generate your LR dataset, using matlab or np.imresize?

Thanks

JustinAsdz avatar Nov 22 '20 06:11 JustinAsdz

Hi Thanks for your work

New to this area, And wonder ask why I have copied 800 images to ../../DIV2K/bin/DIV2K_train/ ,but the training codes returns got no samples as follows, can you tell me what should I do , Thanks Traceback (most recent call last): File "main.py", line 39, in <module> main() File "main.py", line 27, in main loader = data.Data(args) File "/mnt/data0/home/***/SR/csnln/Cross-Scale-Non-Local-Attention-master/src/data/__init__.py", line 35, in __init__ num_workers=args.n_threads, File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 224, in __init__ sampler = RandomSampler(dataset, generator=generator) File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 96, in __init__ "value, but got num_samples={}".format(self.num_samples)) ValueError: num_samples should be a positive integer value, but got num_samples=0

And by the way, Can you explain how you generate your LR dataset, using matlab or np.imresize?

Thanks

Solved by move the original file out of directory ../../bin/ According to the following codes image

And the program will automatically generate binary file based on the jpeg or png file .

But Encounter the Error: FileNotFoundError: No such file: '/mnt/data0/home/***/SR/csnln/DIV2K/DIV2K_train_LR_bicubic/X2/0001x2.png' For I've not generate the LR imgs. Can you tell How you prepare the LR imgs?

JustinAsdz avatar Nov 22 '20 08:11 JustinAsdz

嗨谢谢你的工作 这个领域的新手,想知道为什么我将800张图像复制到../../DIV2K/bin/DIV2K_train/,但是训练代码返回没有样本如下,你能告诉我我该怎么办,谢谢 Traceback (most recent call last): File "main.py", line 39, in <module> main() File "main.py", line 27, in main loader = data.Data(args) File "/mnt/data0/home/***/SR/csnln/Cross-Scale-Non-Local-Attention-master/src/data/__init__.py", line 35, in __init__ num_workers=args.n_threads, File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 224, in __init__ sampler = RandomSampler(dataset, generator=generator) File "/mnt/data0/home/***/miniconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 96, in __init__ "value, but got num_samples={}".format(self.num_samples)) ValueError: num_samples should be a positive integer value, but got num_samples=0 顺便说一下,你能解释一下如何使用 matlab 或 np.imresize生成 LR 数据集吗? 谢谢

将原文件移出目录 ../../bin/ 解决 根据以下代码 图片

并且程序会根据jpeg或png文件自动生成二进制文件。

但是遇到错误: FileNotFoundError: No such file: '/mnt/data0/home/***/SR/csnln/DIV2K/DIV2K_train_LR_bicubic/X2/0001x2.png' 因为我没有生成 LR imgs。 你能告诉你如何准备LR imgs吗?

me too! you can down the X2 LR

Ralapfranco avatar Apr 01 '22 09:04 Ralapfranco