diff --git a/facelib/FANSegmentator.py b/facelib/FANSegmentator.py index 4ec47c4..4bcfe3c 100644 --- a/facelib/FANSegmentator.py +++ b/facelib/FANSegmentator.py @@ -69,6 +69,7 @@ class FANSegmentator(object): input_image = input_image[np.newaxis,...] result = np.clip ( self.model.predict( [input_image] ), 0, 1.0 ) + result[result < 0.1] = 0 #get rid of noise if input_shape_len == 3: result = result[0]