Spaces:
Running
Running
Update face_enhancement.py
Browse files- face_enhancement.py +2 -2
face_enhancement.py
CHANGED
@@ -15,11 +15,11 @@ from sr_model.real_esrnet import RealESRNet
|
|
15 |
from align_faces import warp_and_crop_face, get_reference_facial_points
|
16 |
|
17 |
class FaceEnhancement(object):
|
18 |
-
def __init__(self, base_dir='./', size=512, out_size=None, model=None, channel_multiplier=2, narrow=1, key=None, device='cpu'):
|
19 |
self.facedetector = RetinaFaceDetection(base_dir, device)
|
20 |
self.facegan = FaceGAN(base_dir, size, out_size, model, channel_multiplier, narrow, key, device=device)
|
21 |
self.srmodel = RealESRNet(base_dir, 'realesrnet', 2, 0, device=device)
|
22 |
-
self.use_sr =
|
23 |
self.size = size
|
24 |
self.out_size = size if out_size==None else out_size
|
25 |
self.threshold = 0.9
|
|
|
15 |
from align_faces import warp_and_crop_face, get_reference_facial_points
|
16 |
|
17 |
class FaceEnhancement(object):
|
18 |
+
def __init__(self, base_dir='./', size=512, out_size=None, model=None, channel_multiplier=2, narrow=1, key=None, device='cpu', u=False):
|
19 |
self.facedetector = RetinaFaceDetection(base_dir, device)
|
20 |
self.facegan = FaceGAN(base_dir, size, out_size, model, channel_multiplier, narrow, key, device=device)
|
21 |
self.srmodel = RealESRNet(base_dir, 'realesrnet', 2, 0, device=device)
|
22 |
+
self.use_sr = u
|
23 |
self.size = size
|
24 |
self.out_size = size if out_size==None else out_size
|
25 |
self.threshold = 0.9
|