Public
Documentation Settings

CompreFace

Quick reference

What is CompreFace

Exadel CompreFace is a free and open-source face recognition service that can be easily integrated into any system without prior machine learning skills. CompreFace provides REST API for face recognition, face verification, face detection, landmark detection, age, and gender recognition and is easily deployed with docker.

Rest API description

This is an official Postman collection for CompreFace face recognition system. To know more about face services and face plugins visit this page.

Face Recognition

Managing Subjects

These endpoints allow you to work with subjects.

The most popular case of subject usage is to assign a subject to one person. So, to upload several images of one person, you need to upload them to one subject. As a result, when you perform face recognition, you find a person who is on the image.

Another case of subject usage is assigning a photo of several people as a subject. In this case, you need to detect all faces on the image and then save them to one subject. As a result, when you perform face recognition, you find all photos on which there is the person who is on the image. You don’t need to work with subjects explicitly. You can just upload a new example of the subject and the subject will be created automatically. Or if you delete all the examples of the subject, it will be deleted automatically.

POSTAdd a Subject

{{compreface_base_url}}/api/v1/recognition/subjects

since 0.6 version

Create a new subject in Face Collection. Creating a subject is an optional step, you can upload an example without an existing subject, and a subject will be created automatically.

ElementDescriptionTypeRequiredNotes
Content-Typeheaderstringrequiredapplication/json
x-api-keyheaderstringrequiredapi key of the Face recognition service, created by the user
subjectbody paramstringrequiredis the name of the subject. It can be a person name, but it can be any string

Response body on success:

json
{
  "subject": "<subject_name>"
}
ElementTypeDescription
subjectstringis the name of the subject
HEADERS
Content-Type

application/json

x-api-key

{{recognition_api_key}}

Bodyraw (json)
json
{
    "subject": 3
}
Example Request
curl
curl --location -g '{{compreface_base_url}}/api/v1/recognition/subjects' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{recognition_api_key}}' \
--data '{
    "subject": "<subject_name>"
}'
201 Created
Example Response
json
{
  "subject": "<subject_name>"
}
Server

nginx

Date

Mon, 30 Aug 2021 12:24:13 GMT

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

PUTRename a Subject

{{compreface_base_url}}/api/v1/recognition/subjects/{{subject_name}}

since 0.6 version

Rename existing subject. If a new subject name already exists, subjects are merged - all faces from the old subject name are reassigned to the subject with the new name, old subject removed.

ElementDescriptionTypeRequiredNotes
Content-Typeheaderstringrequiredapplication/json
x-api-keyheaderstringrequiredapi key of the Face recognition service, created by the user
subjectbody paramstringrequiredis the name of the subject. It can be a person name, but it can be any string

Response body on success:

json
{
  "updated": "true|false"
}
ElementTypeDescription
updatedbooleanfailed or success
HEADERS
Content-Type

application/json

x-api-key

{{recognition_api_key}}

Bodyraw (json)
json
{
    "subject": 0
}
Example Request
curl
curl --location -g --request PUT '{{compreface_base_url}}/api/v1/recognition/subjects/{{subject_name}}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{recognition_api_key}}' \
--data '{
    "subject": "3"
}'
200 OK
Example Response
json
{
  "updated": true
}
Server

nginx

Date

Mon, 30 Aug 2021 12:27:36 GMT

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

Vary

Accept-Encoding

Content-Encoding

gzip