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

A product image search supports image categorization, which uses contextual information extracted from images to find images that exactly belong to the specified category. A product image search caters to online shopping. A generic image search does not support image categorization. You do not have to specify a category ID when you use a generic image search. A generic image search is used for stock photography and photo-sharing websites and forums.

Why do I fail to call the buildPostContent operation by using the SDK?

Make sure that all required fields are assigned values and the body size of the request is less than 8 MB.

If an Image Search instance is located in the China (Shanghai) region, can I use an Object Storage Service (OSS) bucket in a region other than China (Shanghai)?

Image Search instances do not support reading data from OSS buckets across regions. Make sure that your Image Search instance and the OSS bucket are located in the same region.

Do I have to specify a category ID when I search for or add an image?

For product image searches, you do not have to specify a category ID. If you specify a category ID for an image, the specified category ID prevails. If you do not specify a category ID, the system predicts the category for the image, and returns the predicted category ID in the response. For cloth, brand, and generic image searches, the system sets the category ID to 88888888, regardless of whether you specify a category ID for an image.

How do I configure the Crop and Region parameters when I search for or add an image?

If you set Crop to true or leave this parameter unspecified, the system identifies the subject in an image. In this case, if you specify a region, the system uses the specified region as the subject area in the image. If you do not specify a region, the system automatically identifies the subject area in the image. If you set Crop to false, the system does not identify the subject in the image. Instead, the system extracts image features based on the entire image. For cloth image searches, the Crop and Region parameters are ignored. The system searches similar images based on features of the entire image.

How do I interpret the SortExprValues value in the search result?

The SortExprValues value is a pair of two values that are separated by a semicolon (;). The first value is a score that indicates the relevance. The higher the value, the more similar the returned image is to the search image. The relevance value falls in the range of [0, 7.33136443711219e+24]. When the returned image is identical to the search image, the relevance value is the maximum value 7.33136443711219e+24. The second value is the Hamming distance between the search image and the returned image in terms of their characteristic vectors. The higher the value, the less similar the returned image is to the search image. The sorting algorithm is based on the first value. Image Search does not provide a specific threshold for you to determine whether two images are similar.

What may cause an OSS import request failure?

This issue may occur in the following situations:

  • The specified OSS bucket and the Image Search instance are located in different regions. Image Search is available to the China (Shanghai), Singapore (Singapore), China (Hong Kong), Japan (Tokyo), Germany (Frankfurt), and Australia (Sydney) regions.
  • The RAM user does not have permissions to access Image Search or OSS. If you do not attach policies that define required permissions to the RAM user, the RAM user cannot access Image Search or a data path of the OSS bucket. Check whether the following situations exist: The ARN, the bucket, or the data path is invalid, or the increment.meta file does not exist in the specified data path.