Giter VIP home page Giter VIP logo

face_recognition_util's Introduction

基于dlib的人脸识别工具,使用face_recognition构建的人脸识别工具集


pip安装

pip3 install face_recognition_util

Tips:

由于face_recognition模块中人脸比对部分算法问题需要修改

在face_recognition目录中找到api.py

将compare_faces函数替换为以下内容:

match_list = list(face_distance(known_face_encodings, face_encoding_to_check))
for index,value in enumerate(match_list):
    match_list[index] = 1-match_list[index]
    match_list[index] *= 100
return match_list

部分函数说明:

convert_to_image:将base64码转换为openCv格式图片,转换错误返回error

resize_image:将图片转换为指定倍数大小,不指定倍数则默认以基准120大小缩放

get_face_encoding:获取图片中单个人脸特征点向量

contrast_faces:人脸比对,可指定检测参数,越小结果越严格

real_time_comparison:实时人脸比对,将在该函数中启动摄像头进行实时比对


首次安装需要附加依赖环境

numpy,

dlib(安装报错,请自行编译并安装dlib,可能用到的工具:cmake),

gevent(非必须,构建flask web应用),

flask(非必须,构建falsk web应用),

opencv-python,

face_recognition

face_recognition_util's People

Contributors

reventhao avatar

Stargazers

 avatar

Watchers

James Cloos 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.