C# 是否可以使用Google.Cloud.Vision检测性别
我发现了一些检测人脸的代码示例:C# 是否可以使用Google.Cloud.Vision检测性别,c#,google-cloud-platform,C#,Google Cloud Platform,我发现了一些检测人脸的代码示例: var image = Image.FromFile(filePath); var client = ImageAnnotatorClient.Create(); var response = client.DetectFaces(image); int count = 1; foreach (var faceAnnotation in response) {
var image = Image.FromFile(filePath);
var client = ImageAnnotatorClient.Create();
var response = client.DetectFaces(image);
int count = 1;
foreach (var faceAnnotation in response)
{
Console.WriteLine("Face {0}:", count++);
Console.WriteLine(" Joy: {0}", faceAnnotation.JoyLikelihood);
Console.WriteLine(" Anger: {0}", faceAnnotation.AngerLikelihood);
Console.WriteLine(" Sorrow: {0}", faceAnnotation.SorrowLikelihood);
Console.WriteLine(" Surprise: {0}", faceAnnotation.SurpriseLikelihood);
}
但是我在faceAnnotation中找不到'IsMale'或'Gender'属性。如何使用Google.Cloud.Vision检测性别?我认为AWS Rekognion可以提供性别: 问:我可以从亚马逊Rekognion获得哪些面部特征 Amazon Rekognion为检测到的每个人脸返回以下人脸属性,以及每个属性的边界框和置信度分数:
请参阅:据我所知,云视觉不支持性别。@JonSkeet,嗯,明白了!你能推荐一些API来检测.Net中的性别吗?恐怕我还没有看过其他的vision API。(我维护谷歌云客户端库,但我没有看过很多其他库。)谷歌视觉API目前不支持它。它是免费API吗?可能不是,大多数机器学习API都是付费的。有些可能会提供一些免费的层,但像这样的事情一直在变化,所以最好查看账单部分以获取最新信息。