图像说明

Azure AI 视觉可以分析图像并生成描述其内容的人工可读短语。 该算法返回基于不同视觉功能的多个描述,且每个描述都有一个置信度分数。 最终输出是按可信度从高到低排列的描述的列表。

图像说明目前只能使用英语。

图像说明示例

以下 JSON 响应表明分析 API 在基于视觉特征对示例图像进行描述时返回的内容。

A black and white picture of buildings in Manhattan

{
   "description":{
      "tags":[
         "outdoor",
         "city",
         "white"
      ],
      "captions":[
         {
            "text":"a city with tall buildings",
            "confidence":0.48468858003616333
         }
      ]
   },
   "requestId":"7e5e5cac-ef16-43ca-a0c4-02bd49d379e9",
   "metadata":{
      "height":300,
      "width":239,
      "format":"Png"
   },
   "modelVersion":"2021-05-01"
}

使用 API

图像说明功能属于分析图像 API。 可以通过本机 SDK 或 REST 调用来调用此 API。 将 Description 包括在 visualFeatures 查询参数中。 然后,在获取完整 JSON 响应时,请分析 "description" 部分内容的字符串。

后续步骤

了解标记图像对图像进行分类的相关概念。