您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

将内容标记应用于图像Applying content tags to images

计算机视觉在上千个可识别对象、生物、风景和操作的基础上返回标记。Computer Vision returns tags based on thousands of recognizable objects, living beings, scenery, and actions. 如果标记含混不清或者不常见,API 响应会提供“提示”,明确已知设置上下文中的标记的含义。When tags are ambiguous or not common knowledge, the API response provides 'hints' to clarify the meaning of the tag in context of a known setting. 标记未组织为分类,并且不存在继承层次结构。Tags are not organized as a taxonomy and no inheritance hierarchies exist. 内容标记的集合构成在完整句子中显示为用户可读语言的图像“说明”的基础。A collection of content tags forms the foundation for an image 'description' displayed as human readable language formatted in complete sentences. 请注意,此时图像说明仅支持英语。Note, that at this point English is the only supported language for image description.

上传图像或指定图像 URL 后,计算机视觉算法在对象、生物和图像中标识的操作的基础上输出标记。After uploading an image or specifying an image URL, Computer Vision algorithms output tags based on the objects, living beings, and actions identified in the image. 标记并不局限于主体(如前景中的人员),还包括设置(室内或室外)、家具、工具、工厂、动物、附件、小工具等。Tagging is not limited to the main subject, such as a person in the foreground, but also includes the setting (indoor or outdoor), furniture, tools, plants, animals, accessories, gadgets etc.

图像标记示例Image tagging example

以下 JSON 响应表明计算机视觉在示例图像中检测到标记可视功能时所返回的内容。The following JSON response illustrates what Computer Vision returns when tagging visual features detected in the example image.

一座蓝色的房子和前院..

{
    "tags": [
        {
            "name": "grass",
            "confidence": 0.9999995231628418
        },
        {
            "name": "outdoor",
            "confidence": 0.99992108345031738
        },
        {
            "name": "house",
            "confidence": 0.99685388803482056
        },
        {
            "name": "sky",
            "confidence": 0.99532157182693481
        },
        {
            "name": "building",
            "confidence": 0.99436837434768677
        },
        {
            "name": "tree",
            "confidence": 0.98880356550216675
        },
        {
            "name": "lawn",
            "confidence": 0.788884699344635
        },
        {
            "name": "green",
            "confidence": 0.71250593662261963
        },
        {
            "name": "residential",
            "confidence": 0.70859086513519287
        },
        {
            "name": "grassy",
            "confidence": 0.46624681353569031
        }
    ],
    "requestId": "06f39352-e445-42dc-96fb-0a1288ad9cf1",
    "metadata": {
        "height": 200,
        "width": 300,
        "format": "Jpeg"
    }
}

后续步骤Next steps

了解对图像进行分类描述图像的概念。Learn concepts about categorizing images and describing images.