Git Product home page Git Product logo

fr-compare's Introduction

fr-compare

封装face_recognition制作成Docker,提供裁剪人像与人像比对相似度两个接口

Usage

# 构建镜像
sudo docker build -t fr-compare:2.0.0 .

# 启动容器
sudo docker run --restart=always --name fr-compare -d -p 8726:8726 fr-compare:2.0.0

访问http://0.0.0.0:8726, 页面输出

{"code":200,"message":"face_recognition server 2.0"}

裁剪

http://0.0.0.0:8726/detect (POST)

请求头

'Content-Type': 'application/json'

请求体

{
    "b64_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQEC..."
}

回复内容

{
    "b64_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQEC...", "message": "success" 
}          

返回的 b64_image 为裁剪后的头像数据, message 为 "succcess" 时为截取头像成功, 否则为报错信息并且b64_image 为空字符串

比对

http://0.0.0.0:8722/detect (POST)

请求头

'Content-Type': 'application/json'

请求体

{
    "b64_image_01": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQEC...",
    "b64_image_02": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQEC..."
}

回复内容

{
    "message": "ok",
    "distance": 56.84
}

distance 值越高,两张照片为一个人的概率越大

fr-compare's People

Contributors

sincerefly avatar xdxycx 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.