With version 1.0.341 of Microsoft.ProjectOxford.Emotion, the Scores property is null, although I can see scores when inspecting the request with Fiddler.
My code is
async void RecognizeEmotion(string imageFilePath)
{
var client =new Microsoft.ProjectOxford.Emotion.EmotionServiceClient(EmotionKey);
using (var imageStream = File.OpenRead(imageFilePath))
{
var emotions = await client.RecognizeAsync(imageStream);
foreach (var emotion in emotions)
{
Console.WriteLine($@"Scores are {(emotion.Scores == null ? "" : "not ")}null");
}
}
}
The response from the service is:
[{"faceRectangle":{"height":606,"left":2642,"top":1268,"width":606},"scores":{"anger":0.00768282,"contempt":0.00425829645,"disgust":0.02712952,"fear":0.00047837582,"happiness":0.0009950536,"neutral":0.798720837,"sadness":0.152901679,"surprise":0.007833431}}]
Am I missing something, or is there something wrong in the Emotion code?