Shortcuts

PairedImageDataset

class mmedit.datasets.PairedImageDataset(data_root, pipeline, io_backend: Optional[str] = None, test_mode=False, test_dir='test')[source]

General paired image folder dataset for image generation.

It assumes that the training directory is ‘/path/to/data/train’. During test time, the directory is ‘/path/to/data/test’. ‘/path/to/data’ can be initialized by args ‘dataroot’. Each sample contains a pair of images concatenated in the w dimension (A|B).

Parameters
  • dataroot (str | Path) – Path to the folder root of paired images.

  • pipeline (List[dict | callable]) – A sequence of data transformations.

  • test_mode (bool) – Store True when building test dataset. Default: False.

  • test_dir (str) – Subfolder of dataroot which contain test images. Default: ‘test’.

load_data_list()[source]

Load paired image paths.

Returns

List that contains paired image paths.

Return type

list[dict]

scan_folder(path)[source]

Obtain image path list (including sub-folders) from a given folder.

Parameters

path (str | Path) – Folder path.

Returns

Image list obtained from the given folder.

Return type

list[str]

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.