mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 22:34:25 -07:00
Merge pull request #78 from faceshiftlabs/fix/mask-editor-bugs
Fix mask editor bugs
This commit is contained in:
commit
265fc9fafb
1 changed files with 5 additions and 5 deletions
|
@ -25,9 +25,9 @@ class MaskEditor:
|
|||
self.img = imagelib.normalize_channels (img,3)
|
||||
h, w, c = img.shape
|
||||
|
||||
if h != w or w != 256:
|
||||
self.img = cv2.resize(img, (256,256))
|
||||
raise Exception ("MaskEditor does not support image size != 256x256")
|
||||
# if h != w or w != 256:
|
||||
# self.img = cv2.resize(img, (256,256))
|
||||
# raise Exception ("MaskEditor does not support image size != 256x256")
|
||||
|
||||
ph, pw = h // 4, w // 4 #pad wh
|
||||
|
||||
|
@ -257,7 +257,7 @@ class MaskEditor:
|
|||
preview_images += [ np.concatenate (prev_images, axis=1) ]
|
||||
|
||||
img = np.full ( (prh,prw, sc), (0,0,1), dtype=np.float )
|
||||
img[border:-border,border:-border] = cv2.resize( self.img, 256 )
|
||||
img[border:-border,border:-border] = cv2.resize(self.img, (self.prwh - 2*border, self.prwh - 2*border))
|
||||
|
||||
preview_images += [ img ]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue