private static async Task DetectFaceAttributesAsync(string option) { var imageFilePath = GetImageFullPath($"Face-{option}.jpg"); var byteData = GetImageAsByteArray(imageFilePath); Console.WriteLine($"{Environment.NewLine}>> Calling Face API, please wait a moment for the results..."); var client = new FaceAPIClient(); var results = await client.DetectAsync(byteData, "age,gender,headPose,smile,facialHair,glasses,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise"); ShowResults(results); }
private static async Task DetectFaceEmotionAsync(string option) { var imageFilePath = GetImageFullPath($"Face-{option}.jpg"); var byteData = GetImageAsByteArray(imageFilePath); Console.WriteLine($"{Environment.NewLine}>> Calling Face API, please wait a moment for the results..."); var client = new FaceAPIClient(); var results = await client.DetectAsync(byteData, "emotion"); ShowResults(results); }