Giter Site home page Giter Site logo

lzh711 / facerecognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iarray/facerecognition

0.0 2.0 0.0 9.66 MB

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

C++ 10.70% C# 52.73% HTML 36.57%

facerecognition's Introduction

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

facerecognition's People

Contributors

element-bot avatar

Watchers

James Cloos avatar  avatar

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.