From f87ee259b0431a18ee328894ded952f841b9a0ec Mon Sep 17 00:00:00 2001 From: Artem Ivanov <37909402+andenixa@users.noreply.github.com> Date: Fri, 24 Aug 2018 14:16:47 +0300 Subject: [PATCH] Landmarks nose drawing fix Fixes nose landmarks drawing if `image_landmarks` are passes as a `numpy.array` --- facelib/LandmarksProcessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facelib/LandmarksProcessor.py b/facelib/LandmarksProcessor.py index 0baa1e3..4ffa972 100644 --- a/facelib/LandmarksProcessor.py +++ b/facelib/LandmarksProcessor.py @@ -186,7 +186,7 @@ def draw_landmarks (image, image_landmarks, color): nose = image_landmarks[slice(*landmarks_68_pt["nose"])] # open shapes - cv2.polylines(image, tuple(np.array([v]) for v in (right_eyebrow, jaw, left_eyebrow, nose+[nose[-6]])), + cv2.polylines(image, tuple(np.array([v]) for v in ( right_eyebrow, jaw, left_eyebrow, np.concatenate((nose, [nose[-6]])) )), False, color, lineType=cv2.LINE_AA) # closed shapes cv2.polylines(image, tuple(np.array([v]) for v in (right_eye, left_eye, mouth)),