preprocess_dataset#
from pssr.data import preprocess_dataset
- pssr.data.preprocess_dataset(dataset: Dataset, preprocess_hr: bool = False, out_dir: str = 'preprocess')#
Saves processed frame slices from a given dataset, including processes such as crappification or cropping/padding.
- Parameters:
dataset (Dataset) – Dataset to load images from. Preprocessing is determined by the dataloading procedure as specified in dataset arguments. Rotation is disabled.
preprocess_hr (bool) – Whether to save preprocessed high-resolution images in addition to preprocessed low-resolution images. Default is False.
out_dir (str) – Directory to save preprocessed images. Default is “preprocess”.