pyiqa.data

Submodules

Package Contents

Functions

build_dataset(dataset_opt)

Build dataset from options.

build_dataloader(dataset, dataset_opt[, num_gpu, ...])

Build dataloader.

pyiqa.data.build_dataset(dataset_opt)[source]

Build dataset from options.

Args:
dataset_opt (dict): Configuration for dataset. It must contain:

name (str): Dataset name. type (str): Dataset type.

pyiqa.data.build_dataloader(dataset, dataset_opt, num_gpu=1, dist=False, sampler=None, seed=None)[source]

Build dataloader.

Args:

dataset (torch.utils.data.Dataset): Dataset. dataset_opt (dict): Dataset options. It contains the following keys:

phase (str): ‘train’ or ‘val’. num_worker_per_gpu (int): Number of workers for each GPU. batch_size_per_gpu (int): Training batch size for each GPU.

num_gpu (int): Number of GPUs. Used only in the train phase.

Default: 1.

dist (bool): Whether in distributed training. Used only in the train

phase. Default: False.

sampler (torch.utils.data.sampler): Data sampler. Default: None. seed (int | None): Seed. Default: None