Spaces:
Runtime error
Runtime error
add gdown in requirements.
Browse files- README.md +6 -2
- facelib/utils/misc.py +3 -0
- requirements.txt +1 -1
README.md
CHANGED
@@ -22,11 +22,15 @@ S-Lab, Nanyang Technological University
|
|
22 |
|
23 |
- **2022.08.23**: Some modifications on face detection and fusion for better AI-created face enhancement.
|
24 |
- **2022.08.07**: Integrate Real-ESRGAN to support background image enhancement.
|
25 |
-
- **2022.07.29**:
|
26 |
-
- **2022.07.17**:
|
27 |
- **2022.07.16**: Test code for face restoration is released. :blush:
|
28 |
- **2022.06.21**: This repo is created.
|
29 |
|
|
|
|
|
|
|
|
|
30 |
|
31 |
#### Face Restoration
|
32 |
|
|
|
22 |
|
23 |
- **2022.08.23**: Some modifications on face detection and fusion for better AI-created face enhancement.
|
24 |
- **2022.08.07**: Integrate Real-ESRGAN to support background image enhancement.
|
25 |
+
- **2022.07.29**: Integrate new face detectors of `['RetinaFace'(default), 'YOLOv5']`.
|
26 |
+
- **2022.07.17**: Colab demo of CodeFormer is available now. <a href="https://colab.research.google.com/drive/1m52PNveE4PBhYrecj34cnpEeiHcC5LTb?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>
|
27 |
- **2022.07.16**: Test code for face restoration is released. :blush:
|
28 |
- **2022.06.21**: This repo is created.
|
29 |
|
30 |
+
## TODO
|
31 |
+
- [ ] Add checkpoint for face inpainting
|
32 |
+
- [ ] Add training code and config files
|
33 |
+
- [x] ~~Add background image enhancement~~
|
34 |
|
35 |
#### Face Restoration
|
36 |
|
facelib/utils/misc.py
CHANGED
@@ -4,6 +4,7 @@ import os.path as osp
|
|
4 |
import torch
|
5 |
from torch.hub import download_url_to_file, get_dir
|
6 |
from urllib.parse import urlparse
|
|
|
7 |
import gdown
|
8 |
|
9 |
|
@@ -21,6 +22,7 @@ def download_pretrained_models(file_ids, save_path_root):
|
|
21 |
if user_response.lower() == 'y':
|
22 |
print(f'Covering {file_name} to {save_path}')
|
23 |
gdown.download(file_url, save_path, quiet=False)
|
|
|
24 |
elif user_response.lower() == 'n':
|
25 |
print(f'Skipping {file_name}')
|
26 |
else:
|
@@ -28,6 +30,7 @@ def download_pretrained_models(file_ids, save_path_root):
|
|
28 |
else:
|
29 |
print(f'Downloading {file_name} to {save_path}')
|
30 |
gdown.download(file_url, save_path, quiet=False)
|
|
|
31 |
|
32 |
|
33 |
def imwrite(img, file_path, params=None, auto_mkdir=True):
|
|
|
4 |
import torch
|
5 |
from torch.hub import download_url_to_file, get_dir
|
6 |
from urllib.parse import urlparse
|
7 |
+
# from basicsr.utils.download_util import download_file_from_google_drive
|
8 |
import gdown
|
9 |
|
10 |
|
|
|
22 |
if user_response.lower() == 'y':
|
23 |
print(f'Covering {file_name} to {save_path}')
|
24 |
gdown.download(file_url, save_path, quiet=False)
|
25 |
+
# download_file_from_google_drive(file_id, save_path)
|
26 |
elif user_response.lower() == 'n':
|
27 |
print(f'Skipping {file_name}')
|
28 |
else:
|
|
|
30 |
else:
|
31 |
print(f'Downloading {file_name} to {save_path}')
|
32 |
gdown.download(file_url, save_path, quiet=False)
|
33 |
+
# download_file_from_google_drive(file_id, save_path)
|
34 |
|
35 |
|
36 |
def imwrite(img, file_path, params=None, auto_mkdir=True):
|
requirements.txt
CHANGED
@@ -14,7 +14,7 @@ torchvision
|
|
14 |
tqdm
|
15 |
yapf
|
16 |
lpips
|
17 |
-
|
18 |
# cmake
|
19 |
# dlib
|
20 |
# conda install -c conda-forge dlib
|
|
|
14 |
tqdm
|
15 |
yapf
|
16 |
lpips
|
17 |
+
gdown # supports downloading the large file from Google Drive
|
18 |
# cmake
|
19 |
# dlib
|
20 |
# conda install -c conda-forge dlib
|