是否可以使用train_shape_predictor_ex.cpp.html和face_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
答案 0 :(得分:2)
就错误信息而言,这一点很清楚。
据说,虽然你有39
个标记(恭喜训练它!),但演示仍在尝试在68
函数中绘制render_face_detections()
。
39 != 68