Skip to content
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

Questions on Data Preparation #4

Open
YouCaiJun98 opened this issue Aug 2, 2022 · 1 comment
Open

Questions on Data Preparation #4

YouCaiJun98 opened this issue Aug 2, 2022 · 1 comment

Comments

@YouCaiJun98
Copy link

YouCaiJun98 commented Aug 2, 2022

Hello and thanks for your amazing work!
When I try to reproduce the paper results, I met some trouble binarizing the DF2K data:

data/DF2K/bin/DF2K_train_LR_bicubic/X4/3548x4.pt does not exist. Now making binary...
Direct pt file without name or image
data/DF2K/bin/DF2K_train_LR_bicubic/X4/3549x4.pt does not exist. Now making binary...
Direct pt file without name or image
data/DF2K/bin/DF2K_train_LR_bicubic/X4/3550x4.pt does not exist. Now making binary...
Direct pt file without name or image
data/DF2K/bin/DF2K_train_HR/3551.pt does not exist. Now making binary...
Traceback (most recent call last):
...
FileNotFoundError: No such file: '/home/nfs_data/shixiangsheng/projects/ModelCompression/Prune/ASSL/src/data/DF2K/DF2K_train_HR/3551.png'

I created dirs like this:
----data
|__DF2K
|__DF2K_train_HR
|__DF2K_train_LR_bicubic

I put '0001.png' - '0900.png' from ./data/DIV2K/DIV2K_train_HR and '000001.png' - '002650.png' (renamed to '0901.png' - '3550.png') from .data/Flickr2K/Flickr2K_HR to ./DF2K/DF2K_train_HR. As for downsampled images, I created folders named in ['X2', 'X3', 'X4'] under ./DF2K/DF2K_train_LR_bicubic and copied related images from DIV2K_train_LR_bicubic and Flickr2K_LR_bicubic (with images renamed as '0001x_.png' to '3550x_.png').
At the first and second stages of binarization (binarizing HR images and X4 LR images), it seems OK, but then the above error emerged. It's kind of weird since the total training images are 900 + 2650 and I have no idea why it returned to binarize the HR images after binarizing X4 LR images.
I'm new to SR and have tried to look up for data preparation of DF2K in other SR repos, but in vain. I wonder how you actually get DF2K images binarized. Thanks for your help in advance XD

@MingSun-Tse
Copy link
Owner

Hey @YouCaiJun98 , thanks for your interest in our work, and sorry for the late follow-up on this issue.

The code is based on RCAN, where most implementation goes back to EDSR. I did not check the detailed binarization implementation so cannot answer your question here ("I have no idea why it returned to binarize the HR images after binarizing X4 LR images."). This said, an easier way to do it may be just release our training data in the binary format -- you can download it from this google drive.

Preparation:

mkdir -p pt_bin/DF2K/bin
cd pt_bin/DF2K/bin
<under this path, download the dataset zip file from the above Google drive, unzip it>

The file structure should look like this:

pt_bin/
└── DF2K
    └── bin
        ├── DF2K_train_HR
        ├── DF2K_train_LR_bicubic

Use the path of pt_bin folder in the training script -- see README.

Let me know if you have more questions. Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants