Dlib: How to change the d or dets (rectangle) in python for getting landmarks without face detector?

Created on 2 Nov 2015  路  1Comment  路  Source: davisking/dlib

Hi, Davisking,

Now I use dlib with python wrapper to get facial landmarks.

But I have a problem that if the detector don't find the face, we can't get the landmark points.

dets = detector(img, 1)
for k, d in enumerate(dets):
shape = predictor(img, d)

But in fact, I know the rectangle of face in image.

So I want to ask you how I can change the d or dets in python for getting landmarks without face detector?

Thank you so much.

Most helpful comment

Oh, I find this method is okay.

d = dlib.rectangle(78, 78, 185, 185)

Thank you again.

>All comments

Oh, I find this method is okay.

d = dlib.rectangle(78, 78, 185, 185)

Thank you again.

Was this page helpful?
0 / 5 - 0 ratings