basicsr.data.reds_dataset

class basicsr.data.reds_dataset.REDSDataset(opt)[source]

Bases: Dataset

REDS dataset for training.

The keys are generated from a meta info txt file. basicsr/data/meta_info/meta_info_REDS_GT.txt

Each line contains: 1. subfolder (clip) name; 2. frame number; 3. image shape, separated by a white space. Examples: 000 100 (720,1280,3) 001 100 (720,1280,3) …

Key examples: “000/00000000” GT (gt): Ground-Truth; LQ (lq): Low-Quality, e.g., low-resolution/blurry/noisy/compressed frames.

Parameters:
  • opt (dict) – Config for train dataset. It contains the following keys:

  • dataroot_gt (str) – Data root path for gt.

  • dataroot_lq (str) – Data root path for lq.

  • dataroot_flow (str, optional) – Data root path for flow.

  • meta_info_file (str) – Path for meta information file.

  • val_partition (str) – Validation partition types. ‘REDS4’ or ‘official’.

  • io_backend (dict) – IO backend type and other kwarg.

  • num_frame (int) – Window size for input frames.

  • gt_size (int) – Cropped patched size for gt patches.

  • interval_list (list) – Interval list for temporal augmentation.

  • random_reverse (bool) – Random reverse input frames.

  • use_hflip (bool) – Use horizontal flips.

  • use_rot (bool) – Use rotation (use vertical flip and transposing h and w for implementation).

  • scale (bool) – Scale, which will be added automatically.

class basicsr.data.reds_dataset.REDSRecurrentDataset(opt)[source]

Bases: Dataset

REDS dataset for training recurrent networks.

The keys are generated from a meta info txt file. basicsr/data/meta_info/meta_info_REDS_GT.txt

Each line contains: 1. subfolder (clip) name; 2. frame number; 3. image shape, separated by a white space. Examples: 000 100 (720,1280,3) 001 100 (720,1280,3) …

Key examples: “000/00000000” GT (gt): Ground-Truth; LQ (lq): Low-Quality, e.g., low-resolution/blurry/noisy/compressed frames.

Parameters:
  • opt (dict) – Config for train dataset. It contains the following keys:

  • dataroot_gt (str) – Data root path for gt.

  • dataroot_lq (str) – Data root path for lq.

  • dataroot_flow (str, optional) – Data root path for flow.

  • meta_info_file (str) – Path for meta information file.

  • val_partition (str) – Validation partition types. ‘REDS4’ or ‘official’.

  • io_backend (dict) – IO backend type and other kwarg.

  • num_frame (int) – Window size for input frames.

  • gt_size (int) – Cropped patched size for gt patches.

  • interval_list (list) – Interval list for temporal augmentation.

  • random_reverse (bool) – Random reverse input frames.

  • use_hflip (bool) – Use horizontal flips.

  • use_rot (bool) – Use rotation (use vertical flip and transposing h and w for implementation).

  • scale (bool) – Scale, which will be added automatically.