cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnkitShah55
Advocate III
Advocate III

Azure Face API with HTTP not giving full data

Hi,

 

I am testing Face API with HTTP connector.

The response from HTTP contains only face rectangle data as shown in screenshot.

I need full details like age, gender... face attributes data. 

Kindly help in this regard.

 

Image file mentioned in 'Get file content' contains face of myself.

 

HTTP.PNGResponse.PNG

 

6 REPLIES 6
ChristianAbata
Super User II
Super User II

hi @AnkitShah55  in the HTPP action output you can copy that result and paste it in a parse json to get all response details.

 

see this example about how to do a parse json.

 

json.gif



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi @ChristianAbata 

The problem is that Microsoft Face API server is not sending back face attributes in response to the HTTP request, while actually it should. What is missing in my flow?

Please check this doc: https://docs.microsoft.com/en-in/azure/cognitive-services/face/concepts/face-detection

@AnkitShah55  could you share me and screanshot from your HTTP output response?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

@ChristianAbata 

 

This is HTTP response.

 

Response.PNG

hi @AnkitShah55  as image is dificult to see if your output is giving you diferent data from API. Please could you share the json response?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi @ChristianAbata 

 

This is JSON response

[
  {
    "faceId": "e7d83bc5-3f4b-4c5c-b10a-346b52c0beab",
    "faceRectangle": {
      "top": 1573,
      "left": 690,
      "width": 715,
      "height": 715
    }
  },
  {
    "faceId": "8d65b7e1-aaa7-4eaf-bb67-41207a17d5bd",
    "faceRectangle": {
      "top": 1999,
      "left": 167,
      "width": 93,
      "height": 93
    }
  }
]

 

And this is JSON schema

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "faceId": {
        "type": "string"
      },
      "faceRectangle": {
        "type": "object",
        "properties": {
          "top": {
            "type": "integer"
          },
          "left": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          }
        }
      },
      "faceAttributes": {
        "type": "object",
        "properties": {
          "smile": {
            "type": "integer"
          },
          "headPose": {
            "type": "object",
            "properties": {
              "pitch": {
                "type": "integer"
              },
              "roll": {
                "type": "number"
              },
              "yaw": {
                "type": "number"
              }
            }
          },
          "gender": {
            "type": "string"
          },
          "age": {
            "type": "number"
          },
          "facialHair": {
            "type": "object",
            "properties": {
              "moustache": {
                "type": "integer"
              },
              "beard": {
                "type": "integer"
              },
              "sideburns": {
                "type": "integer"
              }
            }
          },
          "glasses": {
            "type": "string"
          },
          "emotion": {
            "type": "object",
            "properties": {
              "anger": {
                "type": "integer"
              },
              "contempt": {
                "type": "integer"
              },
              "disgust": {
                "type": "integer"
              },
              "fear": {
                "type": "integer"
              },
              "happiness": {
                "type": "integer"
              },
              "neutral": {
                "type": "number"
              },
              "sadness": {
                "type": "number"
              },
              "surprise": {
                "type": "number"
              }
            }
          },
          "blur": {
            "type": "object",
            "properties": {
              "blurLevel": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            }
          },
          "exposure": {
            "type": "object",
            "properties": {
              "exposureLevel": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            }
          },
          "noise": {
            "type": "object",
            "properties": {
              "noiseLevel": {
                "type": "string"
              },
              "value": {
                "type": "integer"
              }
            }
          },
          "makeup": {
            "type": "object",
            "properties": {
              "eyeMakeup": {
                "type": "boolean"
              },
              "lipMakeup": {
                "type": "boolean"
              }
            }
          },
          "accessories": {
            "type": "array"
          },
          "occlusion": {
            "type": "object",
            "properties": {
              "foreheadOccluded": {
                "type": "boolean"
              },
              "eyeOccluded": {
                "type": "boolean"
              },
              "mouthOccluded": {
                "type": "boolean"
              }
            }
          },
          "hair": {
            "type": "object",
            "properties": {
              "bald": {
                "type": "integer"
              },
              "invisible": {
                "type": "boolean"
              },
              "hairColor": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "color": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "color",
                    "confidence"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "required": [
      "faceId",
      "faceRectangle",
      "faceAttributes"
    ]
  }
}

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (12,902)