DLIB:训练194个地标的Shape_predictor(海伦数据集) [英] DLIB : Training Shape_predictor for 194 landmarks (helen dataset)
问题描述
我正在训练 DLIB 的 shape_predictor ,它使用 helen数据集用于194个面部地标,该数据用于通过<$ c $来检测面部地标dlib库的c> face_landmark_detection_ex.cpp 。
现在,它给了我一个 sp.dat
大约 45 MB 的二进制文件,比给定的文件要少(
与从68个地标获得的结果有很大出入
68个地标图像:
为什么?
好吧,看来您还没有阅读代码注释(?):
shape_predictor_trainer培训师;
//此算法具有许多您可以弄乱的参数。
// shape_predictor_trainer的文档说明了所有这些内容。
//您还应该阅读Kazemi的论文,其中详细介绍了
//的所有参数。但是,这里我只是将其中三个
//设置为其默认值。我这样做是因为我们
//具有非常小的数据集。特别是,将过采样
//设置为较高的值(300)可以有效地增加训练集的大小,因此
//可以帮助该示例。
trainer.set_oversampling_amount(300);
//通过显式增加
//正则化(使nu变小)并使用深度小于
//的树,我也在减少模型的容量。
trainer.set_nu(0.05);
trainer.set_tree_depth(2);
看看 Kazemi纸,按ctrl -f字符串'parameter'并已阅读...
I am training DLIB's shape_predictor for 194 face landmarks using helen dataset which is used to detect face landmarks through face_landmark_detection_ex.cpp
of dlib library.
Now it gave me an sp.dat
binary file of around 45 MB which is less compared to file given (http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2) for 68 face landmarks. In training
- Mean training error : 0.0203811
- Mean testing error : 0.0204511
and when I used trained data to get face landmarks position, IN result I got..
which are very deviated from the result got from 68 landmarks
68 landmark image:
Why?
Ok, looks like you haven't read the code comments (?):
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);
Have a look at the Kazemi paper, ctrl-f the string 'parameter' and have a read...
这篇关于DLIB:训练194个地标的Shape_predictor(海伦数据集)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!