为什么Azure计算机视觉服务对为图像生成的字幕的可信度较低



这是我正在使用的代码:

from azure.cognitiveservices.vision.computervision import ComputerVisionClient
from msrest.authentication import CognitiveServicesCredentials
computervision_client = ComputerVisionClient(
computer_vision_endpoint, 
CognitiveServicesCredentials(computer_vision_key)
)
image_url = "https://cdn.pixabay.com/photo/2020/05/20/07/10/architecture-5195171_960_720.jpg"
description_results = computervision_client.describe_image(image_url )
if len(description_results.captions) == 0:
print("Computer Vision cannot detect the caption for this image.")
else:
print("The tags identified are: ", description_results.tags)
for caption in description_results.captions:
print("The caption is: ", caption.text)
print("The confidence score is: {:.2f}%".format(caption.confidence * 100))

它给出了37%的置信度分数。尽管生成的图像描述很好。其他图像也会出现这种情况。

当图像中没有某些元素时,系统会返回低分,比如如果图像是黑白的,那么用黑白的描述将是高分。图像的质量也会影响分数。但对于你提到的图像,我同意你的观点,即";岩石峭壁上的灯塔;

我已将此图片转发给产品组进行更多调查。再次感谢您的反馈。

最新更新