I would like to use the Google Vision API for label detection. For this I am using a .NET library. This is my code:
var client = ImageAnnotatorClient.Create();
// Load the image file into memory
var image = Image.FromFile("trui3.jpg");
// Performs label detection on the image file
var response = client.DetectLabels(image);
foreach (var annotation in response)
{
if (annotation.Description != null)
Console.WriteLine(annotation.Description);
}
Console.ReadKey();
It works very well. It displays all the labels. But on the Google website it also displays the percentages of the labels. See the image for an example.
How can I achieve this by using the .NET library?
Annotations have a
Score
(see further down the C# example page), which falls in the [0,1] range.