Table of Contents

Image recognition difficulty rating

Before officially adding an image to the cloud recognition (CRS) image library, the best practice is to evaluate its quality in advance.

If the recognizable area of the target image is too small, such as a white wall or solid color block, or if the texture is too simple, its recognition success rate will be greatly reduced. This chapter describes the CRS rating mechanism in detail to help you select high-quality AR recognition materials.

Rating mechanism and score meaning

Score Evaluation Suggestion
0 - 1 Excellent Extremely rich texture, fast recognition, and very stable tracking.
2 Good Has enough feature points and can support normal AR business.
3 Average Recognition rate may be affected by lighting or angle. Texture optimization is recommended.
4 Poor Extremely difficult to recognize. Not recommended as a recognition image in production environments.
-1 Error Unsupported image format or corrupted file.
Important

Actual testing principle: if the total number of targets in the image library is small, even a target with a slightly higher rating score may still be usable in a specific environment. We recommend using the actual test results on real devices as the final reference.

Core comprehensive metrics

We mainly focus on the following two comprehensive metrics. Each has a separate API endpoint that provides a comprehensive rating:

  • Comprehensive recognition difficulty level (detectableRate):

    • The most core metric. It determines the success rate of cloud-side "image search by image".
    • The comprehensive rating given by the /grade/detection API endpoint
  • Comprehensive tracking difficulty level (trackableRate):

    • If you use EasyAR Sense SDK for local tracking in Unity/App, this metric determines the stability of AR content overlay.
    • The comprehensive rating given by the /grade/tracking API endpoint

Other detailed metrics

  • detectableDistinctiveness
  • detectableFeatureCount
  • trackableDistinctiveness
  • trackableFeatureCount
  • trackableFeatureDistribution
  • trackablePatchContrast
  • trackablePatchAmbiguity

These metrics rate the image from the perspective of image algorithms, and each metric is still given from 0 to 4 according to difficulty.

How to view rating results

Each target image in the database has detailed rating information in its details. You can obtain target image properties through the API to view them. You can also view them through EasyAR cloud recognition management.

View through EasyAR Web

  • Log in to EasyAR Web and enter Developer Center
  • Cloud recognition management
  • Select the enabled image library
  • Click Manage to enter image library management
  • Select the target image
  • Click Manage to view the target image details.

As shown in the figure, the details page contains two core comprehensive metrics, and a pentagon displays five detailed metrics.

  • Recognizability: corresponds the original comprehensive recognition difficulty score (detectableRate) to a five-star recognizability level. The smaller the original difficulty score, the more stars and the easier it is to recognize
  • Trackability: corresponds the original comprehensive tracking difficulty score (trackableRate) to a five-star trackability level. The smaller the original difficulty score, the more stars and the easier it is to recognize

detail

API obtains rating results - target image list endpoint

Through the target image list endpoint or by obtaining details, you can get all detailed algorithm metrics for each target image, including detectableRate, such as texture distribution and feature point count.

Best practice: API pre-rating

When building an automated upload backend, we recommend calling the rating endpoint before the official upload.

Reference document: Image recognition difficulty rating API endpoint

Rating endpoint categories

  1. Recognition rating (/grade/detection): returns only recognition difficulty. (Most commonly used)
  2. Tracking rating (/grade/tracking): returns only tracking difficulty.
  3. Detailed rating (/grade/detail): returns multi-dimensional metrics for reference by professional algorithm engineers.

Call preparation

  • The preparation checklist is as follows. For how to prepare, see Call preparation checklist

    • CRS AppId
    • Authentication credential: API Key / API Secret or Token
    • Server-end URL: target image management URL address, HTTPS uses port 443
    • Test image: JPEG/PNG format, size must not exceed 2 MB
  • First convert the local target image to Base64 (macOS / Linux), and save the result to image_base64.txt.
base64 -i ./target.jpg | tr -d '\n' > image_base64.txt
  • Replace the placeholders with actual parameters and run the curl script.
    • Your-Server-side-URL -> actual API host
    • Your-Token -> actual API Key Authorization Token
    • Your-CRS-AppId -> your appId
curl -X POST "https://<Your-Server-side-URL>/grade/detail" \
  -H "Content-Type: application/json" \
  -H "Authorization: <YOUR-TOKEN>" \
  -d '{
    "appId": "<Your-CRS-AppId>",
    "image": "'"$(cat image_base64.txt)"'"
  }'

Related topics:

Next topic: