mmagic.datasets.paired_image_dataset
¶
Module Contents¶
Classes¶
General paired image folder dataset for image generation. |
Attributes¶
- mmagic.datasets.paired_image_dataset.IMG_EXTENSIONS = ('.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tif',...[source]¶
- class mmagic.datasets.paired_image_dataset.PairedImageDataset(data_root, pipeline, io_backend: Optional[str] = None, test_mode=False, test_dir='test')[source]¶
Bases:
mmengine.dataset.BaseDataset
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’.