Sign inSign up

johnmakridis/openface-api

By johnmakridis

•Updated about 5 years ago

Openface is a web API that compares faces on two pictures and gives back a measure of unsimilarity.

Image
0

290

johnmakridis/openface-api repository overview

⁠Openface-API

Openface-API is a web API that compares faces on 2 given pictures, and gives back their distance (measure of unsimilarity). This is useful to check if both pictures belong to the same person.

Based on Openface-API by Platanus⁠

⁠Implementation

Openface-api is a Python Flask⁠ application, with a face-comparing script based on Openface⁠ face recognition library.

⁠Installing

docker pull johnmakridis/openface-api
⁠Running in detached mode
docker run -d --name openface-api -p 8080:5001 johnmakridis/openface-api:latest 

Now you can access your notebook at http://<docker host IP address>:8080

⁠Usage

A route is provided to check if the server is up: HTTP GET /status/

The API route is /compare/. Expects HTTP POST with the params img1 and img2 as the urls of both pictures with faces to compare. Returns a json object with the computed distance: {distance: 0.1752}

Then you can define your own distance threshold in order to evaluate if both pictures belong to the same person. Reasonable values are around 0 - 0.005. So any value higher than that means both faces are not from the same person.

Additionaly, it is possible to run the distance comparer locally in the server, executing in the terminal python local_exe.py <img1> <img2>

Tag summary

Content type

Image

Digest

Size

2.1 GB

Last updated

about 5 years ago

docker pull johnmakridis/openface-api