mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 13:32:09 -07:00
fix
This commit is contained in:
parent
d1676dea06
commit
63c9be3d1f
1 changed files with 6 additions and 2 deletions
|
@ -86,8 +86,12 @@ class MTCExtractor(object):
|
||||||
def __exit__(self, exc_type=None, exc_value=None, traceback=None):
|
def __exit__(self, exc_type=None, exc_value=None, traceback=None):
|
||||||
return False #pass exception between __enter__ and __exit__ to outter level
|
return False #pass exception between __enter__ and __exit__ to outter level
|
||||||
|
|
||||||
def extract_from_bgr (self, input_image):
|
def extract (self, input_image, is_bgr=True):
|
||||||
input_image = input_image[:,:,::-1].copy()
|
|
||||||
|
if is_bgr:
|
||||||
|
input_image = input_image[:,:,::-1].copy()
|
||||||
|
is_bgr = False
|
||||||
|
|
||||||
(h, w, ch) = input_image.shape
|
(h, w, ch) = input_image.shape
|
||||||
|
|
||||||
input_scale = self.scale_to / max(w,h)
|
input_scale = self.scale_to / max(w,h)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue