GithubHelp home page GithubHelp logo

joint_bayesian's Introduction

#Joint_Bayesian Face Verification/联合贝叶斯人脸验证 C++实现joint bayesian人脸验证算法

##Platform and Dependency/平台及依赖项

  • Visual Studio 2013(Windows)
  • eigen3

##Introduction/介绍 ###joingbayesian_cli

joint bayesian算法的C++实现以及C++/CLI封装

###jointbayesian_Csharp

C#测试示例工程,调用C++/CLI封装的dll文件进行训练,测试

###data_normalizationCsharp 原始数据归一化

###thrid_featureCsharp 归一化数据转换为三值特征

##Usage/使用

实现了JointbBayesian_CLI类,提供了2个接口函数供C#调用

  • 构造函数:JointbBayesian_CLI(bool flag,String^ A_path,String^ G_path)
    输入:flag:是否读取A,G矩阵
    A_path:A矩阵路径
    G_path:G矩阵路径
  • 训练:
double train_jointbayesian(array<double,2>^ train_dataset, 
array<int>^ train_label, 
int trainM,
int trainN,
array<double, 2>^ test_dataset, 
array<int>^test_label, 
int testM, 
int testN,
double threshold_start, 
double threshold_end, 
double step)

输入:训练集,测试集,起始阈值及步长
输出:计算出模型矩阵A,G,并存储为dat文件,返回测试集最佳阈值true
* 批量测试: ``` double test_jointbayesian(array^ test_dataset, array^test_label, int testM, int testN, double threshold_start, double threshold_end, double step)) ```
  • 单对图片测试:bool testpair_jointbayesian((array<double, 2>^ test_pair, double threshold, int M, int N)
    输入:test_pair:一对测试图片
    threshold:由 performance_jointbayesian()计算出的最佳阈值
    输出:判定两张图片属于同一人,返回true;否则,返回false
    训练阶段,调用train_jointbayesian函数
    测试阶段,调用testpair_jointbayesian函数

##更新日志 ###2016.9.22: 1.改进了Su,Sw协方差矩阵计算方法,加快了训练速度。 2.提供了独立的批量测试函数test_jointbayesian;

##Training Dataset/训练集 训练集和标签的dat文件:训练集

##Test Results/测试结果 正确率:88.6%
单对图片检测时间:<1ms

##Contributor/贡献者

  • Chao Ma

joint_bayesian's People

Contributors

inlmouse avatar xiaoma340 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

joint_bayesian's Issues

你好,能给个使用示例么?

我是直接使用您代码中的C++部分, 并没有看到从哪里读入训练集和标签文件,没有找到相关的输入路径?最好,可以稍微写个示例,放到这里。谢谢~~

training time

How long is the training process? When I use the lbp_lfw, calculating Su Sw for once takes more than one day. The code is followed:
//初始化Su,Sw Su=cov(u), Sw=cov(e)
for (int i = 0; i < u.rows(); i++)
for (int j = 0; j < u.rows(); j++){
Matrix<double, Dynamic, Dynamic>xi, xj;
xi = u.row(i);
xj = u.row(j);
Su(i, j) = cov(xi, xj);
xi = e.row(i);
xj = e.row(j);
Sw(i, j) = cov(xi, xj);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.