DETECT_FACES#

Detects one or more human faces in an image and gets back age and gender attributes which contain machine learning-based predictions of facial features. Returns JSON encoded value.

Syntax#

DETECT_FACES( image, api_url, face_api_key)

Arguments#

image

It’s an image URL (nvarchar) or binary data (binary).

api_url

Azure face recognition API URL.

face_api_key

A subscription key which is related to Azure subscription.

Return types#

nvarchar(128)

Examples#

SELECT JSON_PATH(
    DETECT_FACES(
        LOAD_FILE('http://local-content.local/img09.jpg'),
        'https://westus.api.cognitive.microsoft.com/face/v1.0/detect',
        'cf23df2207d99a74fbe169e3eba035e6'),
    '$[0].faceAttributes.age') as age

See Also#