docs/Face-services-and-plugins.md
CompreFace supports these face services and plugins:
To use face service you need to create it in an application on UI. The type of service depends on your application needs. Each service has its own REST API context and there is no possibility to change the service type after creation. Here is a short description of each of them:
Face detection service is used to detect all faces in the image. It doesn’t recognize faces, just finds them on the image.
Cases of use
The most useful cases include face plugins for face analysis:
How to test
Output
Below the picture, you can see the Request processed, and the Response to the request. The Response is the output which CompreFace provides via API.
Example:
Face recognition service is used for face identification. This means that you first need to upload known faces to faces collection and then recognize unknown faces among them. When you upload an unknown face, the service returns the most similar faces to it. Also, face recognition service supports verify endpoint to check if this person from face collection is the correct one.
Cases of use
The possible cases include:
How to test
Output
Below the picture, you can see the Request processed, and the Response to the request. The Response is the output which CompreFace provides via API.
Example:
Face verification service is used to check if this person is the correct one. The service compares two faces you send to the rest endpoint and returns their similarity.
Cases of use
The possible cases include:
How to test
Output
Below the picture, you can see the Request processed, and the Response to the request. The Response is the output which CompreFace provides via API.
Example:
Face plugins could be used with any of the face services. By default, face services return only bounding boxes and similarity if
applicable. To add more information in response you can add face plugins in your request. To add a plugin you need to list
comma-separated needed plugins in the query face_plugins parameter. This parameter is supported by all face recognition services.
Example:
curl -X POST "http://localhost:8000/api/v1/recognition/recognize?face_plugins=age,gender,landmarks,mask,pose" \
-H "Content-Type: multipart/form-data" \
-H "x-api-key: <faces_recognition_api_key>" \
-F file=<local_file>
This request will recognize faces on the image and return additional information about age, gender, head pose, face mask, and landmarks.
The list of possible plugins:
{"pitch": 0.0,"roll": 0.0,"yaw": 0.0}without_mask, mask_worn_incorrectly, mask_worn_correctly. Learn more about mask plugin