How to detect cheeks using openCV?

Question:

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?

Asked By: surendhar selvam

||

Answers:

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

Answered By: Ha Bom
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.