Download clean/video/lipfd/utils.py from deepsafe/model-code: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/deepsafe/model-code/resolve/main/clean/video/lipfd/utils.py
- Command line
-
hf download hf://deepsafe/model-code/clean/video/lipfd/utils.py
-
curl -L -o utils.py https://huggingface.co/deepsafe/model-code/resolve/main/clean/video/lipfd/utils.py
318 Bytes
| import os | |
| def get_list(path) -> list: | |
| r"""Recursively read all files in root path""" | |
| image_list = list() | |
| for root, dirs, files in os.walk(path): | |
| for f in files: | |
| if f.split('.')[1] in ['png', 'jpg', 'jpeg']: | |
| image_list.append(os.path.join(root, f)) | |
| return image_list |