【问题标题】:Facial Landmark Detection using Dlib使用 Dlib 进行面部地标检测
【发布时间】:2016-07-09 06:59:24
【问题描述】:

是否可以使用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

【问题讨论】:

  • 你是如何训练 train_shape_predictor_ex.cpp 的。你能详细说明一下吗?我也在找这个。
  • @VIctor,我使用了一个名为 Dlib 的计算机视觉库:dlib.net。您必须编译他们提供的示例。为此,您必须下载它并按照网站说明进行操作。
  • 你是如何获得你正在使用的数据集的 training_with_face_landmarks.xml 的。
  • 您可以自己对其进行注释,但由于我使用的是 68 个地标,因此需要很长时间。所以,我使用了 TCDCN (mmlab.ie.cuhk.edu.hk/projects/TCDCN.html)。希望对你有帮助

标签: computer-vision face-detection keypoint dlib


【解决方案1】:

就错误消息而言,这一点非常清楚。

它的意思是,虽然你有 39 标记(恭喜你训练它!),但该演示仍在尝试在 render_face_detections() 函数中绘制 68

39 != 68

【讨论】:

  • 你是对的!在你的建议下,我成功了。谢谢
  • @RafaelHenrique,很棒的东西,我做了同样的事情:D。玩得开心!
  • @LamarLatrell 可以向我提供有关training_with_face_landmarks.xml 如何创建它的详细信息。我已经使用 imglab 创建了 xml 文件,但我不知道在其中为每个图像插入地标点。
  • @VIctor,在 SO 网站上提出一个经过充分研究且连贯的问题,我不仅可以帮助您,其他人也可以。
  • @LamarLatrell 如果你回答这个问题可能会很有帮助question
猜你喜欢
  • 2016-10-27
  • 2016-07-18
  • 2021-03-22
  • 2016-12-25
  • 2019-04-20
  • 2021-03-20
  • 2019-06-10
  • 2017-07-31
  • 2017-10-02
相关资源
最近更新 更多