scripts.data_preparation.create_lmdb

scripts.data_preparation.create_lmdb.create_lmdb_for_div2k()[source]

Create lmdb files for DIV2K dataset.

Usage:

Before run this script, please run extract_subimages.py. Typically, there are four folders to be processed for DIV2K dataset.

  • DIV2K_train_HR_sub

  • DIV2K_train_LR_bicubic/X2_sub

  • DIV2K_train_LR_bicubic/X3_sub

  • DIV2K_train_LR_bicubic/X4_sub

Remember to modify opt configurations according to your settings.

scripts.data_preparation.create_lmdb.create_lmdb_for_reds()[source]

Create lmdb files for REDS dataset.

Usage:

Before run this script, please run merge_reds_train_val.py. We take two folders for example:

  • train_sharp

  • train_sharp_bicubic

Remember to modify opt configurations according to your settings.

scripts.data_preparation.create_lmdb.create_lmdb_for_vimeo90k()[source]

Create lmdb files for Vimeo90K dataset.

Usage:

Remember to modify opt configurations according to your settings.

scripts.data_preparation.create_lmdb.prepare_keys_div2k(folder_path)[source]

Prepare image path list and keys for DIV2K dataset.

Parameters:

folder_path (str) – Folder path.

Returns:

Image path list. list[str]: Key list.

Return type:

list[str]

scripts.data_preparation.create_lmdb.prepare_keys_reds(folder_path)[source]

Prepare image path list and keys for REDS dataset.

Parameters:

folder_path (str) – Folder path.

Returns:

Image path list. list[str]: Key list.

Return type:

list[str]

scripts.data_preparation.create_lmdb.prepare_keys_vimeo90k(folder_path, train_list_path, mode)[source]

Prepare image path list and keys for Vimeo90K dataset.

Parameters:
  • folder_path (str) – Folder path.

  • train_list_path (str) – Path to the official train list.

  • mode (str) – One of ‘gt’ or ‘lq’.

Returns:

Image path list. list[str]: Key list.

Return type:

list[str]