【Azure】Custom Vision Service をPythonで叩く
http://qiita.com/chooyan_eng/items/af4e4c422b37eb718a81
を参考にしました。
手順どおり、、、
「AzureCognitive ServicesCustom Vision Service」
https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/home
で
左メニュー “Reference” > “Custom Vision Prediction API Reference”
を試します。
****************
テスト(PredictimageUrlで)
****************
私の表記URLは、
https://southcentralus.dev.cognitive.microsoft.com/docs/services/eb68250e””””””””””””””””””653/operations/58acd3c1ef062f0344a42814/console
です、、、、
①ProjectID
コンソール画面自体のURLの “projects/” より後ろの部分
https://www.customvision.ai/projects/3a5ebacf-1534″”””””””””””””””””#/performance
ただし・・・#/performanceは除く、、で、
3a5ebac””””””””””””””””””c8b08aad
のみ書く
②iterationId
コンソールの “PERFORMANCE” 画面内、左上の “Prediction URL” をクリックして表示されるURLの末尾、 “iterationId” パラメータの後ろの文字列
242e1c24″”””””””””””””””””cde99ada30
を書く
③Prediction-key
Custom Vision Service コンソールの設定画面内の “Prediction Key:” 欄
5e68fe””””””””””””””””””223d8
を書く
④Request body
{
“Url”: “http://153.12″”””””””””””””””””170901/files/D5.jpg”
}
を書く
****************
結果
****************
apim-request-id: da580c92-7efd-435a-a357-acd788c520de
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Fri, 01 Sep 2017 20:10:05 GMT
Content-Length: 418
Content-Type: application/json; charset=utf-8
{
“Id”: “473af1b””””””””””””””””””ea4a96”,
“Project”: “3a5ebacf””””””””””””””””””c8b08aad”,
“Iteration”: “242””””””””””””””””””e99ada30″,
“Created”: “2017-09″”””””””””””””””””.8350017Z”,
“Predictions”: [
{
“TagId”: “f393186″”””””””””””””””””e453dda23”,
“Tag”: “レトリーバー”,
“Probability”: 0.50478065
},
{
“TagId”: “11d26″”””””””””””””””””23b6ba51”,
“Tag”: “ミニチュアシュナウザー”,
“Probability”: 0.4952194
}
]
}