|
| 1 | +--- |
| 2 | +title: Image Retrieval concepts - Image Analysis 4.0 |
| 3 | +titleSuffix: Azure Cognitive Services |
| 4 | +description: Concepts related to image vectorization using the Image Analysis 4.0 API. |
| 5 | +services: cognitive-services |
| 6 | +author: PatrickFarley |
| 7 | +manager: nitinme |
| 8 | + |
| 9 | +ms.service: cognitive-services |
| 10 | +ms.subservice: computer-vision |
| 11 | +ms.topic: conceptual |
| 12 | +ms.date: 03/06/2023 |
| 13 | +ms.author: pafarley |
| 14 | +--- |
| 15 | + |
| 16 | +# Image retrieval (version 4.0 preview) |
| 17 | + |
| 18 | +Image retrieval is the process of searching a large collection of images to find those that are most similar to a given query image. Image retrieval systems have traditionally used features extracted from the images, such as content labels, tags, and image descriptors, to compare images and rank them by similarity. However, vector similarity search is gaining more popularity due to a number of benefits over traditional keyword-based search and is becoming a vital component in popular content search services. |
| 19 | + |
| 20 | +## What's the difference between vector search and keyword-based search? |
| 21 | + |
| 22 | +Keyword search is the most basic and traditional method of information retrieval. In this approach, the search engine looks for the exact match of the keywords or phrases entered by the user in the search query and compares with labels and tags provided for the images. The search engine then returns images that contain those exact keywords as content tags and image labels. Keyword search relies heavily on the user's ability to input relevant and specific search terms. |
| 23 | + |
| 24 | +Vector search, on the other hand, searches large collections of vectors in high-dimensional space to find vectors that are similar to a given query. Vector search looks for semantic similarities by capturing the context and meaning of the search query. This approach is often more efficient than traditional image retrieval techniques, as it can reduce search space and improve the accuracy of the results. |
| 25 | + |
| 26 | +## Business Applications |
| 27 | + |
| 28 | +Image retrieval has a variety of applications in different fields, including: |
| 29 | + |
| 30 | +- Digital asset management: Image retrieval can be used to manage large collections of digital images, such as in museums, archives, or online galleries. Users can search for images based on visual features and retrieve the images that match their criteria. |
| 31 | +- Medical image retrieval: Image retrieval can be used in medical imaging to search for images based on their diagnostic features or disease patterns. This can help doctors or researchers to identify similar cases or track disease progression. |
| 32 | +- Security and surveillance: Image retrieval can be used in security and surveillance systems to search for images based on specific features or patterns, such as in, people & object tracking, or threat detection. |
| 33 | +- Forensic image retrieval: Image retrieval can be used in forensic investigations to search for images based on their visual content or metadata, such as in cases of cyber-crime. |
| 34 | +- E-commerce: Image retrieval can be used in online shopping applications to search for similar products based on their features or descriptions or provide recommendations based on previous purchases. |
| 35 | +- Fashion and design: Image retrieval can be used in fashion and design to search for images based on their visual features, such as color, pattern, or texture. This can help designers or retailers to identify similar products or trends. |
| 36 | + |
| 37 | +## What are vector embeddings? |
| 38 | + |
| 39 | +Vector embeddings are a way of representing content—text or images—as vectors of real numbers in a high-dimensional space. Vector embeddings are often learned from large amounts of textual and visual data using machine learning algorithms, such as neural networks. Each dimension of the vector corresponds to a different feature or attribute of the content, such as its semantic meaning, syntactic role, or context in which it commonly appears. |
| 40 | + |
| 41 | +> [!NOTE] |
| 42 | +> Vector embeddings can only be meaningfully compared if they are from the same model type. |
| 43 | +
|
| 44 | +## How does it work? |
| 45 | + |
| 46 | +1. Vectorize Images and Text: the Image Retrieval APIs, **VectorizeImage** and **VectorizeText**, can be used to extract feature vectors out of an image or text respectively. The APIs return a single feature vector representing the entire input. |
| 47 | +- Measure similarity: Vector search systems typically use distance metrics, such as cosine distance or Euclidean distance, to compare vectors and rank them by similarity. The [Vision studio](https://portal.vision.cognitive.azure.com/) demo uses [cosine distance](./how-to/image-retrieval.md#calculate-vector-similarity) to measure similarity. |
| 48 | +- Retrieve Images: Use the top _N_ vectors similar to the search query and retrieve images corresponding to those vectors from your photo library to provide as the final result. |
| 49 | + |
| 50 | +## Next steps |
| 51 | + |
| 52 | +Enable image retrieval for your search service and follow the steps to generate vector embeddings for text and images. |
| 53 | +* [Call the Image retrieval APIs](./how-to/image-retrieval.md) |
| 54 | + |
0 commit comments