DuinoDu/mtcnn

Add a few codes to show the face landmarks

JianjinChen opened this issue · 3 comments

In this python-caffe veision of MTCNN, the demo does not draw face landmarks upon the face box. However, this can be done by simply adding a few lines of codes in "demo.py". Here is my fix
demo_py
Thus it'll show the image with annotated face landmarks .
dttest1

Thanks.

wow,you guys are amazing! Thank you so so much

def draw_point(img,p,color):
cv2.circle(img, p, 2, color, 1,8,0)

def drawPoints(im, points):
rows,cols = points.shape
hcols = int(cols/2)
for j in range(rows):
for i in range(hcols):
draw_point(im, (points[j][i], points[j][i+hcols]), (255,204,204) )
return im