![]() You should see a response like below from the Azure Cognitive Services API calls. In the “Body” tab, choose “binary” and click “Choose Files” to select a picture with a human face. the “Key” “Content-Type” with Value “application/octet-stream”.the “Key” “Ocp-Apim-Subscription-Key” with “Value”.Make sure the operation selected in the dropdown is “POST”. Open Postman and the use the End Point in your Azure subscription as the URL. Postman is very popular tool to test the API calls. Now, we can test if our API is working using a tool called Postman. You will need to send an access key with each API call header for authentication. This is the place where you can find your subscription keys and access keys. Open your subscription by clicking on it and go to the “Overview” section. Once you follow these steps, Azure will deploy your services and create subscription keys. select your pricing plan (there is a free plan that you can select for trial purposes).select your geolocation where your user base will mostly reside.You will have to complete a simple form which will ask you to: Go to “” and login with your ID.Ĭlick “Create Resource” and search for “Face”.įrom the search results, select Face (Category : “AI + Machine Learning”). Let’s startįirst, we login to our Microsoft Azure subscription. It will ask you for credit card information but your card is never charged unless paid services are purchased (which is not required for this demo). ![]() If you don’t have one, you can create it for free by going to Microsoft’s Azure website. This exercise assumes that you have a Microsoft Azure subscription. This tutorial will ensure that we are set up with an Azure subscription and we are getting the required results back. Please notice that, along with face detection, Azure also gives us the approximate age and if the person is wearing glasses, features that can be requested in the URL. What will I learn from this tutorial?īy the end of this tutorial, we should be able to achieve the result below. ![]() In this tutorial, we will be learning how to perform face detection using Microsoft Cognitive Services provided by Azure, and simple JavaScript and CSS. This is also a type of machine learning use case. So, as the name suggests, it’s simply detecting a face in an image. Face detection results in faces having rectangles around them. You have probably seen face detection in action many times now, in different applications - for example in your phone, in photos on Facebook. On error - Shows the errors that occurred during the processing of the request and the policies applied to the errors.By Rohit Ramname How you can set up face detection with feature identification in your app Find the faces with Microsoft Cognitive Services, Azure, and JavaScript Photo by Vanessa Serpas on Unsplash What is face detection? Outbound - Shows the policies applied to the response before sending back to the caller. For example, if you added policies in Tutorial: Transform and protect your API, they'll appear here.īackend - Shows the requests API Management sent to the API backend and the response it received. Inbound - Shows the original request API Management received from the caller and the policies applied to the request. You have to pass your subscription key in request headers. You can find the subscription key (Primary/Secondary) in api developer portal on profile screen. You have to pass the subscription key in header key (Ocp-Apim-Subscription-Key). Select any of the following links to jump to detailed trace info: Inbound, Backend, Outbound, On error. You are good to use your API using Postman or your code. You can also choose to send the request without tracing.Īfter the call completes, go to the Trace tab in the HTTP response. If your subscription doesn't already allow tracing, you're prompted to enable it if you want to trace the call. Then, in the test console, select + Add header to add an Ocp-Apim-Subscription-Key header with the new key value. Select Show/hide keys and copy one of the keys. Select Subscriptions, and open the context menu (. ![]() You can override the value of Ocp-Apim-Subscription-Key by retrieving a key for another subscription in the portal. ![]()
0 Comments
Leave a Reply. |