Created
August 26, 2020 20:34
-
-
Save chadmichel/edc583bff53cea9093838fcfc44de01d to your computer and use it in GitHub Desktop.
Find faces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static async Task Main(string[] args) | |
{ | |
// create a client | |
var client = new FaceClient(new ApiKeyServiceClientCredentials(subKey)) | |
{ | |
Endpoint = endpoint | |
}; | |
// image with 3 faces | |
var url = "https://dontpaniclabs.com/wp-content/uploads/2020/01/hero_layer.jpg"; | |
// detect faces | |
var faces = await client.Face.DetectWithUrlWithHttpMessagesAsync(url, true, true); | |
// log # of detected faces. It should find 3 images. | |
Console.WriteLine(faces.Body.Count); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment