描述映包含人類可讀語言的影像
電腦視覺可以分析影像,並產生人類可讀的片語,以描述其內容。 此演算法會根據不同的視覺特徵傳回數個描述,而且每個描述都會獲得信賴分數。 最後的輸出是從最高到最低信賴分數排序的描述清單。
目前,英文是唯一支援影像描述的語言。
使用 Vision Studio 快速且輕鬆地在瀏覽器中試用影像輔助字幕功能。
影像描述範例
下列 JSON 回應說明分析 API 根據其視覺特徵描述範例影像時所傳回的內容。
{
"description": {
"tags": ["outdoor", "building", "photo", "city", "white", "black", "large", "sitting", "old", "water", "skyscraper", "many", "boat", "river", "group", "street", "people", "field", "tall", "bird", "standing"],
"captions": [
{
"text": "a black and white photo of a city",
"confidence": 0.95301952483304808
},
{
"text": "a black and white photo of a large city",
"confidence": 0.94085190563213816
},
{
"text": "a large white building in a city",
"confidence": 0.93108362931954824
}
]
},
"requestId": "b20bfc83-fb25-4b8d-a3f8-b2a1f084b159",
"metadata": {
"height": 300,
"width": 239,
"format": "Jpeg"
}
}
使用 API
影像描述功能是分析影像 \(英文\) API 的一部分。 您可以透過原生 SDK 或 REST 呼叫來呼叫此 API。 在 visualFeatures 查詢參數中包含 Description
。 然後,當您取得完整的 JSON 回應時,只需要對於 "description"
一節的內容剖析字串。