加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – DLIB:训练194个地标的Shape_predictor(海伦数据集)

发布时间:2020-12-16 10:02:39 所属栏目:百科 来源:网络整理
导读:我正在使用helen数据集训练DLIB的194个面部地标的shape_predictor,该数据集用于通过dlib库的face_landmark_detection_ex.cpp检测面部地标. 现在它给了我一个大约45 MB的sp.dat二进制文件,与68个面部标志的给定文件(http://sourceforge.net/projects/dclib/fi
我正在使用helen数据集训练DLIB的194个面部地标的shape_predictor,该数据集用于通过dlib库的face_landmark_detection_ex.cpp检测面部地标.

现在它给了我一个大约45 MB的sp.dat二进制文件,与68个面部标志的给定文件(http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2)相比较少.在培训中

>平均训练误差:0.0203811
>平均测试错误:0.0204511

当我使用经过训练的数据获得面部地标位置时,结果我得到了……

enter image description here

这与68个地标的结果非常不同

68地标图片:

enter image description here

为什么?

解决方法

好的,看起来你还没有看过 code评论(?):

shape_predictor_trainer trainer;
// This algorithm has a bunch of parameters you can mess with.  The
// documentation for the shape_predictor_trainer explains all of them.
// You should also read Kazemi's paper which explains all the parameters
// in great detail.  However,here I'm just setting three of them
// differently than their default values.  I'm doing this because we
// have a very small dataset.  In particular,setting the oversampling
// to a high amount (300) effectively boosts the training set size,so
// that helps this example.
trainer.set_oversampling_amount(300);
// I'm also reducing the capacity of the model by explicitly increasing
// the regularization (making nu smaller) and by using trees with
// smaller depths.  
trainer.set_nu(0.05);
trainer.set_tree_depth(2);

看看Kazemi paper,ctrl -f字符串’参数’并有一个读…

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读