Image Search usage issues

更新时间:
复制 MD 格式

Search behavior

What is the difference between a product image search and a generic image search?

Product image search supports image categorization — it uses contextual information extracted from the image to find results that exactly belong to a specific category. This makes it well-suited for online shopping scenarios where category precision matters.

Generic image search does not support image categorization. No category ID is required, and no category filtering is applied. It is used for stock photography and photo-sharing websites and forums.

Do I have to specify a category ID when searching for or adding an image?

It depends on the search type:

  • Product image searchfabric, trademark, and generic image search: the category ID is optional. If you specify one, it takes precedence. If you don't, the system predicts the category and returns the predicted category ID in the response.

  • Cloth, brand, and generic image searches: the system always sets the category ID to 88888888, regardless of whether you specify one.

How do the Crop and Region parameters work?

System behavior depends on the combination of Crop, Region, and search type:

CropRegionSearch typeSystem behavior
true or not setSpecifiedAnyUses the specified region as the subject area
true or not setNot specifiedAnyAutomatically identifies the subject area
falseAnyAnySkips subject detection; extracts features from the entire image
AnyAnyCloth image searchIgnores both Crop and Region; searches based on the entire image

How do I interpret SortExprValues in the search results?

SortExprValues returns two values separated by a semicolon (;):

  • First value — a relevance score. A higher score means the returned image is more similar to the search image. The range is [0, 7.33136443711219e+24], where 7.33136443711219e+24 indicates an exact match.

  • Second value — the Hamming distance between the characteristic vectors of the two images. A higher value means the images are less similar.

Results are sorted by the first value. Image Search does not provide a similarity threshold for determining whether two images are a match.

SDK and API

Why does calling buildPostContent fail?

Check the following:

  • All required fields have values assigned.

  • The request body is under 8 MB.

OSS integration

Can I use an OSS bucket in a different region from my Image Search instance?

No. Image Search instances cannot read data from OSS buckets in a different region. The Image Search instance and OSS bucket must be in the same region.

What causes an OSS import request to fail?

The two most common causes are a region mismatch and insufficient Resource Access Management (RAM) user permissions.

Region mismatch

The OSS bucket and the Image Search instance are in different regions. Image Search is available in the following regions:

  • China (Shanghai)

  • Singapore (Singapore)

  • China (Hong Kong)

  • Japan (Tokyo)

  • Germany (Frankfurt)

  • Australia (Sydney) (Closing Down)

Insufficient RAM user permissions

The RAM user lacks the permissions needed to access Image Search or Object Storage Service (OSS). Check the following:

  • The RAM user has the required policies attached for both Image Search and OSS access.

  • The ARN, bucket name, and data path are valid.

  • The increment.meta file exists in the specified data path.

Note

For more product details or technical support, click Online Consulting or contact us through our DingTalk group: 35035130.