Appearance
图标检测
检测图片中的图标位置,返回坐标结果。
接口信息
| 项目 | 值 |
|---|---|
| 地址 | /api/detection/icon |
| 方法 | POST |
| Content-Type | application/json |
| 认证 | 需要 Bearer Token |
| 扣点 | 普通用户扣点,管理员不扣点 |
请求体
json
{
"img_base64": "base64-image"
}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
img_base64 | string | 是 | 待检测图片的 Base64 字符串 |
curl 示例
bash
curl -X POST "$BASE_URL/api/detection/icon" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"img_base64\": \"$IMG_BASE64\"
}"返回示例
json
{
"result": [[120, 86]]
}result 的具体结构由 AntiCAP 模型返回,通常表示检测到的坐标。
错误码
| 状态码 | 说明 |
|---|---|
401 | Token 无效或过期 |
402 | 余额不足 |
后端调用
python
Atc.Detection_Icon(data.img_base64)