Spaces:
Sleeping
Sleeping
Download pytorch_wavelets/tests/datasets.py from TUHs/CN-SambertPersonalTTS: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/spaces/TUHs/CN-SambertPersonalTTS/resolve/main/pytorch_wavelets/tests/datasets.py
- Command line
-
hf download hf://spaces/TUHs/CN-SambertPersonalTTS/pytorch_wavelets/tests/datasets.py
-
curl -L -o datasets.py https://huggingface.co/spaces/TUHs/CN-SambertPersonalTTS/resolve/main/pytorch_wavelets/tests/datasets.py
546 Bytes
| import os | |
| import numpy as np | |
| def regframes(name): | |
| """Load the *name* registration dataset and return source and reference frame.""" | |
| frames = np.load(os.path.join(os.path.dirname(__file__), name + '.npz')) | |
| return frames['f1'], frames['f2'] | |
| def mandrill(): | |
| """Return the "mandrill" test image.""" | |
| return np.load(os.path.join(os.path.dirname(__file__), 'mandrill.npz'))['mandrill'] | |
| def barbara(): | |
| """Return the "barbara" test image.""" | |
| return np.load(os.path.join(os.path.dirname(__file__), 'barbara.npz'))['barbara'] | |