fixed landmark extraction of face with opened mouth

This commit is contained in:
iperov 2019-03-19 00:23:52 +04:00
parent 7c1ea1a617
commit 33606e327b

View file

@ -32,7 +32,7 @@ class LandmarksExtractor(object):
for (left, top, right, bottom) in rects:
try:
center = np.array( [ (left + right) / 2.0, (top + bottom) / 2.0] )
center[1] -= (bottom - top) * 0.12
#center[1] -= (bottom - top) * 0.12
scale = (right - left + bottom - top) / 195.0
image = self.crop(input_image, center, scale).astype(np.float32)