Sign inSign up

angularcase/face-compare

By angularcase

•Updated over 2 years ago

Image
0

261

angularcase/face-compare repository overview

⁠Container to use as a face-recognition microservice

This container runs on port 5000 as a service that you can use for face recognition. Two methods are available. First one is to encode a reference image and obtain its encoding. The second method is to compare faces, so you supply the encoding (eg. from a db or a file) and also an jpg image to test. You got the boolean match response as a return.

⁠First pull and then run with the following:

docker pull angularcase/face-compare:latest

docker run -d -p 5000:5000 angularcase/face-compare:latest

⁠API Documentation

⁠Endpoint 1: Face Encode

⁠URL

http://127.0.0.1:5000/face-encode

⁠Method

POST

⁠Description

This endpoint accepts a JPEG file representing a face image and returns the face encoding vector. You save that encoding in database or file and use it with a http://127.0.0.1:5000/face-compare to compare face.

⁠Headers
  • Content-Type: multipart/form-data
⁠Parameters
  • file: JPEG file with the face image
⁠Response (example)

{ "face_encoding": [0.1576252579689026, 0.07042930275201797, ...] }

⁠Endpoint 2: Face Compare

⁠URL

http://127.0.0.1:5000/face-compare

⁠Method

POST

⁠Description

This endpoint accepts a face encoding vector and a JPEG file with a face image and returns the comparison result (whether the faces match).

⁠Headers
  • Content-Type: multipart/form-data
⁠Parameters
  • face_encoding: Face encoding vector (e.g., [0.1576252579689026, 0.07042930275201797, ...]).
  • file: JPEG file with the face image to compare.
⁠Response (example)

{ "match": false }

Tag summary

Content type

Image

Digest

sha256:6c09e5b24…

Size

483.2 MB

Last updated

over 2 years ago

docker pull angularcase/face-compare