使用Dlib进行面部地标检测

时间:2016-03-22 11:46:51

标签: computer-vision face-detection keypoint dlib

是否可以使用train_shape_predictor_ex.cpp.htmlface_landmark_detection_ex.cpp.html来训练不同的地标号码?默认情况下,两者都在正面检测68个地标。我想仅检测39地标。我可以使用train_shape_predictor_ex进行训练。但是face_landmark_detection_ex输出附加的消息:

抛出异常

Error detected at line 25. 
Error detected in file /Users/Vareto/Documents/Dlib/dlib/../dlib/image_processing/render_face_detections.h.
Error detected in function std::vector dlib::render_face_detections(const std::vector &, const dlib::rgb_pixel).
Failing expression was dets[i].num_parts() == 68.
std::vector render_face_detections()
Invalid inputs were given to this function.
dets[0].num_parts(): 39

1 个答案:

答案 0 :(得分:2)

就错误信息而言,这一点很清楚。

据说,虽然你有39个标记(恭喜训练它!),但演示仍在尝试在68函数中绘制render_face_detections()

39 != 68