edit

Face Detection

Overview

Detect human faces in photos and images. We will return information on facial features as coordinates on the image.

API Details

Here are some details about this API.

Endpoint

The following endpoint for this API is

1
https://v.skytells.net

Your request must be sent to this endpoint using the secure protocol.

Node

The Node or (Namespace) for this API is

1
ai/faces

This API associated with the following Edges.

Edge Method Description
ai/faces/detect GET - POST This node represents the (Cloud Classifier) to detect faces on your Image(s)

Requirements

  • Well Knowledge of (ML)
  • Developer Account ( API Key )
  • image URL

Understanding Parameters

When called from the command line or a script we will try to detect faces on submitted images and return a JSON response with all of the your image details.

Parameter Method Description
key GET This is your API key.
image GET - POST This Parameter should contains the URL of your image
Optional Parameters

minHeadScale Defined by you.
Is used to set the ratio of the smallest face we should look for in the photo. Accepts a value between .015 (1:64 scale) and .5 (1:2 scale). By default it is set at .015 (1:64 scale) if not specified.

selector Is used to adjust the face detector. If not specified the default of FRONTAL is used. Note that these optional parameters are not reliable for face recognition, but may be useful for face detection uses.

Detect Faces

To detect faces, all you need to do is submit a JPG or PNG photo. You can submit the photo either as a publicly accessible URL

Keep in Mind

Do not submit the Base64 encoded photo or as a file upload to our AI Classifier.

Finally, we have some advanced options available for your use. We have set these options to sensible defaults, but sometimes there is a need to override them and we have provided that facility for you.

Note

One additional thing to note is that the returned coordinates all begin at the top left of the photo.

REQUEST

Node :

1
https://v.skytells.net/ai/faces/detect

Request Content :

1
2
3
4
5
6
7
POST https://v.skytells.net/ai/faces/detect HTTP/1.1
Content-Type: application/json
key: {YOUR_API_KEY}
  {
      "image":" {IMAGE URL} ",
       "selector":"ROLL"
  }

Via HTTP

1
https://v.skytells.net/ai/faces/train?image={$IMAGE_URL}&selector=ROLL&key={$YOUR_API_KEY}

Tip

You can perform this call also using our SDK.

RESPONSES

When our AI classifier trains your image and the image includes at least 1 face. So, you should get this response.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
200
Content-Type: application/json
{
    "images": [
        {
            "status": "Complete",
            "width": 1536,
            "height": 2048,
            "file": "Hazem.jpg",
            "faces": [
                {
                    "topLeftX": 390,
                    "topLeftY": 706,
                    "chinTipX": 780,
                    "rightEyeCenterX": 587,
                    "yaw": -3,
                    "chinTipY": 1548,
                    "confidence": 0.99997,
                    "height": 780,
                    "rightEyeCenterY": 904,
                    "width": 781,
                    "leftEyeCenterY": 907,
                    "leftEyeCenterX": 955,
                    "pitch": -17,
                    "attributes": {
                        "lips": "Together",
                        "asian": 0.25658,
                        "gender": {
                            "type": "M"
                        },
                        "age": 26,
                        "hispanic": 0.41825,
                        "other": 0.11144,
                        "black": 0.16007,
                        "white": 0.05365,
                        "glasses": "Yes"
                    },
                    "face_id": 1,
                    "quality": 0.79333,
                    "roll": -1
                }
            ]
        }
    ]
}
EXCEPTIONS

In case of no faces.

1
2
3
4
5
6
7
8
9
200
Content-Type: application/json
{
    "Errors": [
    {
        "Message": "no faces found in the image",
        "ErrCode": 5002
    }]
}

In case of too many faces.

1
2
3
4
5
6
7
8
9
200
Content-Type: application/json
{
    "Errors": [
    {
        "Message": "too many faces in image",
        "ErrCode": 5010
    }]
}