c – DLIB:训练194个地标的Shape_predictor(海伦数据集)
作者:互联网
我正在使用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
当我使用经过训练的数据获得面部地标位置时,结果我得到了……
这与68个地标的结果非常不同
68地标图片:
为什么?
解决方法:
好的,看起来你还没有看过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字符串’参数’并有一个读…
标签:dlib,c,training-data,feature-detection 来源: https://codeday.me/bug/20190727/1555192.html