【发布时间】:2016-11-05 20:47:13
【问题描述】:
我正在做一个面部表情识别项目,使用 dlib 来获取面部并提取描述符,并使用 libsvm 来训练获得的数据。我在 Visual Studio Community 2015 中使用 c++。到目前为止,我已经提取了高维 LBP 描述符,现在想了解使用 libsvm 获得和训练的特征。我被困在这里,因为我无法理解我的“特征”向量中的数据,也无法将其转换为 libsvm 接受的训练格式。
下面是代码sn-p。在此之前,我想几乎所有事情都是不言自明的。
std::vector<std::vector<double>> features;//storing features for all images
std::vector<double> feat;//for a single image
extract_highdim_face_lbp_descriptors(img, shape, feat); //dlib's function, storing extracted info in 'feat'
features.push_back(feat);
//Now all the info for all the images is stored in 'features' vector. I now need to train the data and make a suitable model using libsvm, precisely RBF kernel.
【问题讨论】: