1 Star 0 Fork 1

saturos/face-alignment-in-3000fps

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
TrainModel.cpp 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
yulequan 提交于 2015-05-29 14:09 . openMP support
//
// TrainDemo.cpp
// myopencv
//
// Created by lequan on 1/24/15.
// Copyright (c) 2015 lequan. All rights reserved.
//
#include "LBFRegressor.h"
using namespace std;
using namespace cv;
void LoadCofwTrainData(vector<Mat_<uchar> >& images,
vector<Mat_<double> >& ground_truth_shapes,
vector<BoundingBox>& bounding_boxs);
void TrainModel(vector<string> trainDataName){
vector<Mat_<uchar> > images;
vector<Mat_<double> > ground_truth_shapes;
vector<BoundingBox> bounding_boxs;
for(int i=0;i<trainDataName.size();i++){
string path;
if(trainDataName[i]=="helen"||trainDataName[i]=="lfpw")
path = dataPath + trainDataName[i] + "/trainset/Path_Images.txt";
else
path = dataPath + trainDataName[i] + "/Path_Images.txt";
// LoadData(path, images, ground_truth_shapes, bounding_boxs);
LoadOpencvBbxData(path, images, ground_truth_shapes, bounding_boxs);
}
LBFRegressor regressor;
regressor.Train(images,ground_truth_shapes,bounding_boxs);
regressor.Save(modelPath+"LBF.model");
return;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/saturos/face-alignment-in-3000fps.git
git@gitee.com:saturos/face-alignment-in-3000fps.git
saturos
face-alignment-in-3000fps
face-alignment-in-3000fps
master

搜索帮助