0

I am working on a virtual make-up using Python, openCV, dlib. Currently, I can get the facial landmarks like lips, nose, jaw etc. But I am quite unsure on getting the points of the cheeks.

Are they any recommendations?

1 Answers1

2

If you're using dlib 68 facial landmarks, here are the ROIs of the 2 cheeks:

from imutils import face_utils

#face detection part

#rect is the face detected
shape = predictor(gray_img, rect)
shape = face_utils.shape_to_np(shape)

img[shape[29][1]:shape[33][1], shape[54][0]:shape[12][0]] #right cheeks
img[shape[29][1]:shape[33][1], shape[4][0]:shape[48][0]] #left cheek

enter image description here

Ha Bom
  • 2,787
  • 3
  • 15
  • 29
  • Thank you for the recommendation. It was helpful. May I know how you derived the ROIs of the cheeks? Are there any documentation? – surendhar selvam Jan 23 '19 at 01:41
  • I just look at the figure and choose what coordinates form the 2 cheeks, you can also change it to fit your program. – Ha Bom Jan 23 '19 at 02:41