Community Blog What You See Is What You Get: Implementing Image Search - Friday Blog, Week 55

What You See Is What You Get: Implementing Image Search - Friday Blog, Week 55

This week, I show you how to go from 0 to working image search engine in 20 minutes! Read on to learn more.

By: Jeremy Pedersen

Seek, And Ye Shall Find?

So you're on your favorite E-commerce site, searching around, when suddenly you remember that you need to replace....that thing.

You know the one. That thing you can never remember the name of. You can sort of describe it. It's...curved? It has...holes in it? Something.

Slowly, it dawns on you that you can't describe the thing well enough to find it online.

What now?

Image Search To The Rescue

This is exactly the sort of scenario Image Search was designed for.

E-Commerce makes it possible for anybody to buy almost anything, but it doesn't always make it easy. After all, how would you search for this?


...and how would you describe which one of these wedding dresses fits your style?


Not so easy, right?

Image search gets around this problem, allowing you to incorporate a powerful image search engine into your existing website or mobile app, without the need to train sophisticated computer vision models on your own.

Upload some photos, give them unique ID numbers, set up an API endpoint, and boom, you're done!

Fun fact: the images above all come from Alibaba Group's Taobao. See if you can use Taobao's built-in image search to find them!

Setting It Up Ourselves

Today, I'm going to try out Image Search step-by-step right here in this blog post.

I've found a well lit spot in the office, and I have photographed a couple of items to upload to the Image Search web console.

But before I can do that, I need to set up a new Image Search instance. I can do this from the Alibaba Cloud web console. I am setting up my instance in Singapore, which is the region I typically use for tests and demos. There are several other regions in Asia and Europe you could choose from, though:



Click on "Image Search", which will take you to the Image Search console homepage:


We now need to click "Create Instance", choose our specifications, and make a purchase:


Unfortunately the Image Search API is only available as a monthly subscription service right now, meaning I need to spend about 300 USD up-front if I want to test it out. Luckily I have a company test account, so the cost here gets reduced to $0.01!

If you are interested in testing Image Search out but don't want to drop $300 on it, you can contact Alibaba Cloud to discuss, here.

We can now see our instance showing up in the Image Search console:


Clicking on the instance name, we will see an instance overview page, and from there we can switch to one of several tabs that allow us to upload and modify images, as well as perform test searches:


Now it's time to upload some test images!

Generating And Uploading Test Images

I'm going to test with just three images: an AirPod case, a small bag, and a thermos bottle:




Let's start by uploading the AirPod case image:



If everything works, an API response like the one in the image below should appear in the web console:


I repeat the process twice more, once for the thermos bottle and again for the small bag.

The "Overview" page now shows 3 images have been uploaded:


Taking Some New Images And Testing Out The Search Function

We can now take a couple of "rough" images, similar to what we expect users might upload, and see whether or not they are recognized correctly.

I have taken these three:




Let's try finding these items, by uploading them to the "Search By Image" tab in the Image Search web console:




Nice! The next step would be to upload more images, then read the documentation to learn how to integrate the API into your own applications.

That's it for this week! Pretty easy, right?

I've Got A Question!

Great! Reach out to me at jierui.pjr@alibabacloud.com and I'll do my best to answer in a future Friday Q&A blog.

You can also follow the Alibaba Cloud Academy LinkedIn Page. We'll re-post these blogs there each Friday.

Not a LinkedIn person? We're also on Twitter and YouTube.

0 0 0
Share on


71 posts | 155 followers

You may also like



71 posts | 155 followers

Related Products