Skip to content

Latest commit

 

History

History

data

Dataloader

  • use opencv (cv2) to read and process images.

How To Prepare Data

  1. Training: Download DIV2K dataset from DIV2K offical page, or from Baidu Drive.

  2. Testing: Download LIVE1 dataset and CBSD68 dataset from Google Drive.

  3. We use DIV2K dataset for training.

    1. since DIV2K images are large, we first crop them to sub images using codes/data_scripts/extract_subimages.py.
    2. generate LQ images using matlab with codes/data_scripts/generate_2groups.m and codes/data_scripts/generate_3groups.m for CResMD, codes/data_scripts/generate_deg.m for base network.
    3. modify configurations in options/train/xxx.yml when training, e.g., dataroot_GT, dataroot_LQ.
  4. For validation and test folder.

    1. Generate different combinations of degradations using matlab with codes/data_scripts/generate_2D_val.m, codes/data_scripts/generate_3D_val.m.
    2. modify configurations on test dataset in options/train/xxx.yml or options/test/xxx.yml when training or testing, e.g., dataroot_GT, dataroot_LQ.

General Data Process

data augmentation

We use random crop, random flip/rotation, (random scale) for data augmentation.