AWS WAF 画像認識
WARNING
createTask を使用してタスクを作成します
このインターフェースは結果を個別に取得する必要はなく、画像認識結果を直接返します!
タスクの type
フィールドは以下の通りです
AwsWafClassification
タスクの作成
createTask を使用してタスクを作成します
タスクオブジェクトの構造
プロパティ | 型 | 必須 | 説明 |
---|---|---|---|
type | String | 必須 | AwsWafClassification |
websiteURL | String | オプション | 精度向上のためのページソースURL |
images | List[string] | 必須 | base64画像文字列、aws:grid は一度に9枚の画像をサポートし、その他のタイプは一度に1枚の画像をサポートします |
question | String | 必須 | 質問の完全な名称については、以下の質問リストを参照してください。 |
質問許可リスト
aws:toycarcity:carcity //Place a dot at the end of the car's path
aws:grid:bed // Choose all the beds
aws:grid:bag
aws:grid:hat
aws:grid:chair
aws:grid:bucket
aws:grid:curtain
aws:grid:mop
aws:grid:clock
aws:grid:suitcase
aws:grid:binocular
aws:grid:cooking pot
サポートされるタイプ
サポートされる画像タイプを持つ質問は以下の通りです:
タイプ | サポート |
---|---|
![]() | はい |
![]() | いいえ |
![]() | はい |
リクエスト例
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AwsWafClassification",
"websiteURL": "https://xxxx.com",
"images": [
"/9j/4AAQSkZJRgABAgAA..."
],
"question": "aws:toycarcity:carcity"
}
}
レスポンス例
{
"errorId": 0,
"status": "ready",
"solution": {
//carcity point
"box": [
116.7,
164.1
],
// grid type, objects means the image index that matches the question
"objects": [0, 1, 3, 4, 6],
//if question include `bifurcatedzoo`
"distance": 500
},
"taskId": "cbb1c730-e569-4ba6-b5fc-e06377694aa7"
}
SDKを使用したリクエスト
#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'
import capsolver
capsolver.api_key = "..."
solution = capsolver.solve({
"type":"AwsWafClassification",
"question":"aws:toycarcity:carcity",
"images" : [
"/9j/2wCEAAoHBwgH...",
]
})
print(solution)