我正在使用 Microsoft.Azure.CognitiveServices.Vision.ComputerVision
API 来检测图片中的眼镜。
如果检测到眼镜,我会得到像素坐标和置信度值,我注意到它始终高于 0.5
。
因此,即使置信度低于该值,我也会尝试获取返回值(因此,即使 API 没有足够的信心认为图片中有眼镜)。
分析图片的方法如下:
public static async Task AnalyzeImageUrl(ComputerVisionClient client, string imageUrl)
{
// Creating a list that defines the features to be extracted from the image.
var features = new List<VisualFeatureTypes?>
{
VisualFeatureTypes.Objects
};
Console.WriteLine("Analyzing objects in image...");
Console.WriteLine();
// Analyze the URL image
var results = await client.AnalyzeImageAsync(imageUrl, features);
Console.WriteLine("Objects:");
foreach (var obj in results.Objects)
{
Console.WriteLine(@$"{obj.ObjectProperty} with confidence {obj.Confidence} at
location {obj.Rectangle.X}, {obj.Rectangle.X + obj.Rectangle.W}, {obj.Rectangle.Y}, {obj.Rectangle.Y + obj.Rectangle.H}");
}
}
最佳答案
如果您提到 API。很抱歉有一些限制。请务必注意对象检测的局限性,以便您可以避免或减轻漏报(丢失对象)和有限细节的影响。
如果对象很小(小于图像的 5%),通常不会被检测到。 如果物体紧密排列在一起(例如一堆盘子),通常不会被检测到。 对象不通过品牌或产品名称来区分(例如,商店货架上不同类型的苏打水)。但是,您可以使用品牌检测功能从图像中获取品牌信息。
那些低分结果将不会返回。有没有什么场景你需要低分结果?我可以让产品组知道,以便我们可以优化极端情况。谢谢。
关于c# - 有没有办法使用 Microsoft Azure 认知服务 ComputerVision 获取图片中找到的对象的低置信度值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69674729/