×
Community Blog Empowering Businesses: Simplifying SKU Checks with Alibaba Cloud Image Search

Empowering Businesses: Simplifying SKU Checks with Alibaba Cloud Image Search

Are you tired of endlessly scrolling through pages of search results, trying to find that similar or identical images within your database? Have you e.

By Sunny Jovita, Solution Architect Intern

Introduction

image_1

Are you tired of endlessly scrolling through pages of search results, trying to find that similar or identical images within your database? Have you ever wished for a more efficient way to discover visually similar pictures? Look no further than Alibaba Cloud Image Search, a cutting-edge platform that harnesses the power of deep learning and computer vision to revolutionize your image search experience!

Alibaba Cloud Image Search is not your ordinary search engine. It goes beyond simple keyword queries and brings you a whole new level of search precision. With Image Search, you can build your own personalized image search engine. It’s like having your own curated gallery of visually similar images at your fingertips. But how does Image Search work? By leveraging the advanced deep learning algorithms, Image Search analyzes the unique features of your uploaded image and swiftly scours to the database to retrieve the most relevant matches. No more sifting through countless irrelevant results, Alibaba Cloud Image Search takes you straight to the heart of what you are looking for.

What’s the difference between Image Search and others search engine?

What sets Alibaba Cloud Image Search apart from other image search platform is its adaptability. It can be seamlessly integrated into a wide range of scenarios: such as API integration, utilizing SDK with various programming languages available, upload data using batch operation, etc. This makes it an indispensable tool for various applications. Are you an avid online shopper? Imagine using Image Search for snap shopping, where you can find the exact product you desire by just uploading an image. Looking for a product recommendations? Image Search can effortlessly provide suggestions based on visually similar images. And when it comes to copyright protection, Alibaba Cloud Image Search helps safeguard your valuable assets by identifying potential infringements.

One of the Benefits: Copyright Infringement detection

One of the most interesting benefits of Image Search, it can be used for copyright protection by enabling users to track and identify potential infringements of their copyright images. Here’s how it works:

  • Image Database: with Alibaba Cloud Image Search, you can create and maintain a database of your copyright images. This database serves as a reference for comparing and searching for visually similar images.
  • Similarity Score: when someone tries to search for an image using Alibaba Cloud Image Search platform, it compares the uploaded image against your indexed database. By analyzing the similarities between the uploaded image in your database, Image Search generates a similarity score for each match.
  • Copyright Infringement Detection: The generated similarity scores, helps identify potential copyright infringements. If an uploaded image closely matches or exceeds a specified threshold with a copyrighted image form your database, it indicates a possible violation. This allows you to detect unauthorized use of your copyrighted content.

Now, let’s delve into an exciting application of Image Search: identifying jewelry for SKU checks. In this blog, we will guide you through a step-by-step tutorial on harnessing the power of Alibaba Cloud Image Search to effortlessly search and match the jewelry items.

Example 1: Data collection

image_2

Before we dive into the utilization of Alibaba Cloud Image Search for jewelry SKU checks, let’s take a moment to familiarize ourselves with the data collection process and the jewelry samples we will be working with.

Within this exploration, we provide such amount of jewelry samples as we can see in the pictures above. The images provided showcase different patterns and designs of jewelries. To ensure accurate and reliable search results, we have collected the following jewelry sample:

- Pendants: we have chosen 20 pendant samples, consisting of 10 gold pendants and 10 silver pendants. Each pendant possesses its own unique pattern that make it a perfect candidate for our image search.
- Rings: our collection includes 12 gold rings.
- Necklaces: we have handpicked 20 necklaces (gold and silver) to add to our dataset. Each necklace exhibits its own distinct style, ranging from chains which offers a diverse array of options to explore.

Clean the raw data

With this raw dataset in hand, our next crucial step was to preprocess the data, ensuring optimal search performance. We cleaned each image by removing distracting backgrounds and adjusting the light conditions to create a clear and standardized dataset. This process allows for more accurate image analysis and comparison, enhancing the effectiveness of Alibaba Cloud Image Search.

image_3

Now that we have refined out data, we are ready to leverage Alibaba Cloud Image Search to unlock the full potential of identifying the jewelry collection.

Implementation

image_4

Let’s start to explore how’s the implementation of Image Search in real world case. It begins with a user searches an image in the web server. It will send an api request into Alibaba cloud image search engine. The image search the similar / identical products by using image index. After that it will give the product id list into the web server, the original images folder and database will be retrieved to the web server also. Then it will give back the similar or identical list of products to the user.

Let’s start to explore how’s the implementation process of Image Search in a real-world scenario.

  1. It all begins when a user initiates an image search on a web server.
  2. As the user uploads an image, an API request is sent to the Alibaba Cloud Image Search engine, triggering the search process.
  3. Behind the scenes, the powerful algorithms of Image Search go to work. The engine utilizes image indexing capabilities to scour its extensive database for similar or identical products. This image index serves as a reference point for accurate and efficient search results.
  4. Once the search process is complete, the Alibaba Cloud Image Search engine generates a list of product IDs that closely match the uploaded image. This list is then transmitted back to the web server, where it acts as a bridge between the user and the search results.
  5. To provide a seamless user experience, the web server retrieves the original images and relevant data from the database, making them readily available for further processing. By accessing the original images folder and leveraging the information stored in the database, the web server ensures that the retrieved data is up-to-date ad accurate.
  6. Equipped with the retrieved product IDs, the web server then assembles the final output: a comprehensive list of similar or identical products that closely match the user’s uploaded image. This list is presented to the user, enabling them to explore visually related products with ease and efficiency.

By seamlessly integrating Alibaba Cloud Image Search, businesses, whether it’s e-commerce platforms, product recommendations, or copyright protection can provide their users with an intuitive and visually driven search experience, enhancing engagement, satisfaction, and ultimately driving conversions.

Utilizing Alibaba Cloud Search Images

- Create an instance

image_5

Before we begin utilizing Alibaba Cloud Image Search, let’s create an instance for it. To activate Image Search, please follow the instructions provided at https://www.alibabacloud.com/help/en/image-search/latest/activate-image-search. By following those steps, you will successfully create an instance for Alibaba Cloud Image Search. With your instance up and running, you can proceed to explore the features and functionalities of Image Search, such as uploading and indexing your image database.

- Add images into instance

image_6
image_7

After activating the instance, we can proceed to upload images into the database. There are multiple ways to add images:

  1. Calling API operations: You can send HTTP or HTTPS requests to access Image Search.
  2. Using SDKs: this method is recommended for a small number of images in real time. Image Search provides SDKs of multiple version.
  3. Performing batch operations: if you need to add millions of images using a task, you can connect Image Search to Alibaba Cloud Object Storage Service (OSS) and import images in batches.
    d. Using the console: If you want to experience adding images to the image gallery in Image Search, you can use the console.

For this tutorial, we will be using batch operations. We have already uploaded the clean data into OSS. Now, we can start inputting the test image to find similar or identical results.

- Instance details

After completing the image instance upload process, we can navigate to the instance details page to input the image.

instance_details

If the image input is successful, it will return a JSON response similar to the following:

image_9_jpeg

However, if there is an error during the process, an error output will be returned, indicating the need to reconfigure the length or width of the image. An example of an error response is as follows:

image_10

This responses provide valuable information about the status of the image input operation, allowing you to troubleshoot and make necessary adjustments if needed.

[Accurate] Results

After uploading all the testing images to the Alibaba Cloud Image Search platform, we obtained the following results:

  • Despite the presence of background noise, high brightness quality, and a finger holding a ring, the image still accurately detected the identical result.

image_11

  • Moving the ring slightly farther from the camera did not hinder the accurate detection aof the image. It still has high similarity score.

Annotation_2023_06_08_114028

  • Even with increased noise and a smooth ring pattern, Image Search successfully detected it with identical results.

image_12

  • The image successfully detected when used as input.

image_13

  • Despite adjusting the brightness and saturation to darken the pendant, Image Search still accurately detected the pendant.

image_14

[Less Accurate] Results

However, there were some less accurate results during the testing:

  • When the input image was further away from the camera, it resulted in less accurate detection.

image_15_jpeg

Rings and pendants were detected well, however, difficulties arose when detecting necklaces due to their similar chain or necklace patterns. To address this, we implemented a new approach to enhance necklace detection.

Among these various necklaces, we modified the method by focusing solely on the necklace patterns to optimize the dataset.

image_16

image_17

Despite our efforts, accurately detecting necklaces proved challenging due to their wide shape, lower resolution images, and small pattern details. However, Image Search still identified the product as a necklace jewelry, distinguishing it from rings or pendants.

Our exploration didn’t stop there. To achieve optimal results, we expanded our sample size and continued optimizing the identification of jewelries.

Example 2: Data Collection

Regarding the second dataset, we have a sample dataset called “foto_dataset”. Within this dataset, there are a total of 305 items, each featuring different angles and lightning conditions. For this dataset, the background was not removed, and it serves as the reference dataset for our analysis.

image_18

Approach 1: All the images were put in the database as bulk image (not organized the image based on their product name).

In this first approach, we try to put all the images into 1 dataset without using any additional folder within it. In other words, within the OSS bucket, it will have 1 folder called jewelry_demo, and all the images will be stored within it without organizing it according to their name.

image_19

image_20

After using the same procedure (batch operation) to store the jewelries images, we start to use ‘test_dataset’ for the input images. The ‘test_dataset’ looks like this with 119 items in total with different distance and lighting:

image_21

[Accurate] Results:

  • The image search accurately detects similar images, focusing on the front angle of the “M” pendant. The results show high similarity scores.

image_22

  • Similar to the pendant, the Image Search provides similar results with high similarity scores.

image_23

  • When trying different angles as input for the Image Search, it still yields desired results.

image_24

  • Even with an input image of a ring captured from a considerable distance, the Image Search accurately detects it.

image_25

  • Image Search successfully identifies three different-colored bracelets, providing desired results.

image_26

Although the results already return accurate and identical values, we decided to implement a new approach to optimize the usage of Image Search.

Approach 2: Augmentation

We applied augmentation techniques such as flip, rotate, brightness adjustment, and blurring to increase the similarity scores.

image_27

As a result, utilizing augmentation significantly improved accuracy and average confidence levels in terms of similarity scores.

image_28

Conclusions:
After conducting these explorations, we conclude that implementing a standard procedure for input images is crucial to obtain desired outputs. Additionally, having a clean dataset serves as a necessary requirement for establishing a reliable reference dataset.

image_29

  • Blur image

image_30

  • Different angles

image_31

  • Items that are not fully captured

image_32

  • Curved bracelets

image_33

0 1 0
Share on

Alibaba Cloud Indonesia

91 posts | 12 followers

You may also like

Comments