mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-20 05:23:22 -07:00
convert float32
This commit is contained in:
parent
de00810871
commit
00841ab8c0
1 changed files with 3 additions and 2 deletions
|
@ -373,8 +373,9 @@ def color_transfer(ct_mode, img_src, img_trg):
|
||||||
# imported from faceswap
|
# imported from faceswap
|
||||||
def color_augmentation(img, seed=None):
|
def color_augmentation(img, seed=None):
|
||||||
""" Color adjust RGB image """
|
""" Color adjust RGB image """
|
||||||
face = img.astype(np.float32)
|
img = img.astype(np.float32)
|
||||||
face = np.clip(face*255.0, 0, 255)
|
face = img
|
||||||
|
face = np.clip(face*255.0, 0, 255).astype(np.uint8)
|
||||||
face = random_clahe(face, seed)
|
face = random_clahe(face, seed)
|
||||||
face = random_lab(face, seed)
|
face = random_lab(face, seed)
|
||||||
img[:, :, :3] = face
|
img[:, :, :3] = face
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue