Merge pull request #141 from faceshiftlabs/fix/fs-aug

Fix/fs aug
This commit is contained in:
Jeremy Hummel 2021-05-05 11:49:09 -07:00 committed by GitHub
commit 0b5ceff405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,6 +373,7 @@ def color_transfer(ct_mode, img_src, img_trg):
# imported from faceswap
def color_augmentation(img, seed=None):
""" Color adjust RGB image """
img = img.astype(np.float32)
face = img
face = np.clip(face*255.0, 0, 255).astype(np.uint8)
face = random_clahe(face, seed)