MCPcopy Create free account
hub / github.com/pytorch/executorch / get_Div2K

Function get_Div2K

examples/qualcomm/scripts/edsr.py:78–85  ·  view source on GitHub ↗
(
    dataset_dir: str,
)

Source from the content-addressed store, hash-verified

76
77
78def get_Div2K(
79 dataset_dir: str,
80):
81 hr_dir = f"{dataset_dir}/sr_bm_dataset/DIV2K/DIV2K_valid_HR"
82 lr_dir = f"{dataset_dir}/sr_bm_dataset/DIV2K/DIV2K_valid_LR_bicubic/X2"
83 if not os.path.exists(hr_dir) or not os.path.exists(lr_dir):
84 Div2K(root=f"{dataset_dir}/sr_bm_dataset", scale=2, download=True)
85 return SrDataset(hr_dir, lr_dir)
86
87
88def get_dataset(hr_dir: str, lr_dir: str, default_dataset: str, dataset_dir: str):

Callers 1

get_datasetFunction · 0.85

Calls 1

SrDatasetClass · 0.70

Tested by

no test coverage detected