Skip to content

A c# Offline face recognition Demo. 离线人脸检测,人脸对齐,人脸识别Demo, 基于seetaface库

Notifications You must be signed in to change notification settings

glinojop/FaceRecognition

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSeetaface

Library

Download the face models

Use

Code Sample:

Init 初始化

string path = @"d:\model\";	//face models directory path
SeetafaceHelper.SetModelDirectory(Encoding.Default.GetBytes(path));
SeetafaceHelper.Init();

FaceDetect 人脸检测

SeetafaceHelper.DetectFaces(
    string imagePath,
    StringBuilder detectJsonResult
);

FaceAlignment 人脸对齐

SeetafaceHelper.Alignment(
    string imagePath,
    StringBuilder alignmentResult
);

ExtractFeature 提取特征

SeetafaceHelper.ExtractFeature(string imagePath, AlignmentResult alignmentResult, float[] feats);

Calculating Similarity 计算相似度

float[] feat1 = new floar[2048];
float[] feat2 = new floar[2048];

SeetafaceHelper.ExtractFeature(@"d:\1.jpg", alignmentResult, feat1);
SeetafaceHelper.ExtractFeature(@"d:\2.jpg", alignmentResult, feat2);

double sim = SeetafaceHelper.CalcSimilarity(feat1, feat2)
if(sim > 0.6){
	//.....
}

running result 运行结果

Screenshot

About

A c# Offline face recognition Demo. 离线人脸检测,人脸对齐,人脸识别Demo, 基于seetaface库

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 52.7%
  • HTML 36.6%
  • C++ 10.7%