From 296488be6cf197e8838e7ff9b3679013be3582c0 Mon Sep 17 00:00:00 2001 From: sinofis Date: Thu, 15 Oct 2020 16:15:14 +0200 Subject: [PATCH] removed fs aug artifacts --- core/imagelib/color_transfer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/imagelib/color_transfer.py b/core/imagelib/color_transfer.py index a1cb29a..c605920 100644 --- a/core/imagelib/color_transfer.py +++ b/core/imagelib/color_transfer.py @@ -374,11 +374,11 @@ def color_transfer(ct_mode, img_src, img_trg): def color_augmentation(img): """ Color adjust RGB image """ face = img - face = (face * 255.0).astype("uint8") + face = np.clip(face*255.0, 0, 255).astype(np.uint8) face = random_clahe(face) face = random_lab(face) img[:, :, :3] = face - return np.clip(img.astype('float32') / 255.0, 0, 1) + return (face / 255.0).astype(np.float32) def random_lab(image):