Color or visual pattern for Vision API Product Search

45 views
Skip to first unread message

A D

unread,
Apr 18, 2021, 10:17:27 AM4/18/21
to cloud-vision-discuss
Hello, I am developing a visual recommendation engine with Vision API Product Search. Is there a way to set the API in order to have the similar products ranked by color or visual pattern?

Best regards,

Alex.

ivanasharma

unread,
Apr 18, 2021, 5:33:43 PM4/18/21
to cloud-vision-discuss
Hello Alex,

In order to have the similar products ranked by color or pattern, You can refer to the documentation[1] which describes how you can use the filter expression[2] to restrict search results based on Product labels. For example, You can use `"filter": "color=red"` to have all the products ranked based on the color red. 


Clayton Mellina

unread,
Apr 19, 2021, 11:22:36 AM4/19/21
to cloud-vision-discuss
Hi Alex,

To add on to the previous answer: any values that you filter by in Vision API Product Search must be added on the products in the index by you — i.e. the example of filtering by color would not work out of the box. You could, for instance, use Image Properties feature in Vision API https://cloud.google.com/vision/docs/detecting-properties to precompute dominant colors for the product images.

In general, Vision API Product Search does take both color and pattern into account when ranking results, but does not provide a way to control the strength of color vs. pattern information in the ranking.

Best,
clayton
Reply all
Reply to author
Forward
0 new messages