Image recognizability difficulty rating | POST /grade/detection
Scores image recognition difficulty from 0 to 4, where higher values indicate greater difficulty. -1 indicates non-compliant images causing recognition errors (e.g., damaged or blank images).
Best practice is to call this interface before creating new target images.
| Grade | Description |
|---|---|
| 0 or 1 | Target easily detected |
| 2 | Average |
| 3 or 4 | Target difficult to detect |
Action
Divided into three interfaces. For image search, only the comprehensive recognizability rating is typically needed.
POST
/grade/detection- Provides comprehensive recognizability rating only
POST
/grade/tracking- Provides comprehensive trackability rating only
POST
/grade/detail- Provides multi-dimensional detailed algorithm ratings
Authentication
Http header
Content-Type=application/json
HTTP Header: Authorization (when using API Key Token authentication)
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| image | String(base64) | Yes | Base64-encoded string of image content. Supports JPG and PNG formats. Maximum image size 2MB. |
Return fields
| Field | Description |
|---|---|
| statusCode | Status code 0 indicates authentication success. See status codes |
| result | Error message or grade |
| timestamp | Server-side time when response is returned. Unix timestamp format in milliseconds |
| result.grade | [-1, 0, 1, 2, 3, 4] where 0 and 1 indicate easy recognition. 4 is most difficult. -1 indicates non-compliant image. |
Error codes
See Status codes and error codes
Request example
POST /grade/detection/ HTTP/1.1
Host:
Date: Mon, 1 Jan 2018 00:00:00 GMT
Content-Type: application/json
{
"image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM...",
"timestamp": 1514736000000,
"appKey": "test_app_key",
"signature": "89985e2420899196db5bdf16b3c2ed0922c0c221"
}
Response example
HTTP/1.1 200 OK
Content-Type: application/json
{
"statusCode": 0,
"result": {
"grade": 1
},
"timestamp": 1514736000000
}