Spaces:
Sleeping
Sleeping
Download gfpgan/data/__init__.py from Nav27/image-blitz: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/spaces/Nav27/image-blitz/resolve/main/gfpgan/data/__init__.py
- Command line
-
hf download hf://spaces/Nav27/image-blitz/gfpgan/data/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Nav27/image-blitz/resolve/main/gfpgan/data/__init__.py
525 Bytes
| import importlib | |
| from basicsr.utils import scandir | |
| from os import path as osp | |
| # automatically scan and import dataset modules for registry | |
| # scan all the files that end with '_dataset.py' under the data folder | |
| data_folder = osp.dirname(osp.abspath(__file__)) | |
| dataset_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(data_folder) if v.endswith('_dataset.py')] | |
| # import all the dataset modules | |
| _dataset_modules = [importlib.import_module(f'gfpgan.data.{file_name}') for file_name in dataset_filenames] | |