|
| 1 | +--- |
| 2 | +title: Quickstart image search |
| 3 | +titleSuffix: Azure AI Search |
| 4 | +description: Index and query images on Azure AI Search using the Azure portal. Run the Import and vectorize data wizard to vectorize images. Use Search Explorer to query images. |
| 5 | + |
| 6 | +author: HeidiSteen |
| 7 | +ms.author: heidist |
| 8 | +ms.service: cognitive-search |
| 9 | +ms.topic: quickstart |
| 10 | +ms.date: 06/14/2024 |
| 11 | +--- |
| 12 | + |
| 13 | +# Quickstart: Image search in Azure portal (preview) |
| 14 | + |
| 15 | +> [!IMPORTANT] |
| 16 | +> **Import and vectorize data** wizard and Azure AI Vision vectorizers are in public preview under [Supplemental Terms of Use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). By default, it targets the [2024-05-01-Preview REST API](/rest/api/searchservice/skillsets/create-or-update?view=rest-searchservice-2024-05-01-preview&preserve-view=true). |
| 17 | +
|
| 18 | +Get started with image search using the **Import and vectorize data** wizard in the Azure portal and image search in **Search explorer**. |
| 19 | + |
| 20 | +You need three Azure resources and sample data to complete this walkthrough: |
| 21 | + |
| 22 | +> [!div class="checklist"] |
| 23 | +> + Azure Storage to store image files as blobs |
| 24 | +> + Azure AI services multiservice account, used for image vectorization and image analysis |
| 25 | +> + Azure AI Search for indexing and queries |
| 26 | +
|
| 27 | +Sample data consists of image files in the azure-search-sample-data repo, but you can use different images and still follow this walkthrough. |
| 28 | + |
| 29 | +## Prerequisites |
| 30 | + |
| 31 | ++ An Azure subscription. [Create one for free](https://azure.microsoft.com/free/). |
| 32 | + |
| 33 | ++ Azure AI services, a multiservice account, in a region that provides Azure AI Vision multimodal embeddings. Currently, those regions are: SwedenCentral, EastUS, NorthEurope, WestEurope, WestUS, SoutheastAsia, KoreaCentral, FranceCentral, AustraliaEast, WestUS2, SwitzerlandNorth, JapanEast. [Check the documentation](/azure/ai-services/computer-vision/how-to/image-retrieval) for an updated list. |
| 34 | + |
| 35 | ++ Azure AI Search, on any tier, but in the same region as Azure AI services. The tier of your search service determines how many blobs you can index. We used the free tier to create this walkthrough and we limited the content to 10 JPG files. |
| 36 | + |
| 37 | ++ Azure Storage, use a standard performance (general-purpose v2) account. Access tiers can be hot, cool, and cold. |
| 38 | + |
| 39 | +All of the above resources must have public access enabled for the portal nodes to be able to access them. Otherwise, the wizard fails. After the wizard runs, firewalls and private endpoints can be enabled on the different integration components for security. |
| 40 | + |
| 41 | +A free search service supports role-based access control on connections to Azure AI Search, but it doesn't support managed identities on outbound connections to Azure Storage or Azure AI Vision. This means you must use key-based authentication on free search service connections to other Azure services. Or, you can use basic or above and [configure a managed identity](search-howto-managed-identities-data-sources.md) and role assignment to admit requests from Azure AI Search. |
| 42 | + |
| 43 | +## Check for space |
| 44 | + |
| 45 | +If you're starting with the free service, you're limited to three indexes, three data sources, three skillsets, and three indexers. Make sure you have room for extra items before you begin. This quickstart creates one of each object. |
| 46 | + |
| 47 | +## Prepare sample data |
| 48 | + |
| 49 | +1. Download the [unsplash-signs image folder](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/unsplash-images/jpg-signs) to a local folder or find some images of your own. On a free search service, keep the image files under 20 to stay under the free quota for enrichment procedssing. |
| 50 | + |
| 51 | +1. Sign in to the [Azure portal](https://portal.azure.com/) with your Azure account, and go to your Azure Storage account. |
| 52 | + |
| 53 | +1. In the navigation pane, under **Data Storage**, select **Containers**. |
| 54 | + |
| 55 | +1. Create a new container and then upload the images. |
| 56 | + |
| 57 | +## Start the wizard |
| 58 | + |
| 59 | +If your Azure AI multiservice account and Azure AI Search are in the same supported region and tenant, and if your Azure Storage blob container is using the default configuration, you're ready to start the wizard. |
| 60 | + |
| 61 | +1. Sign in to the [Azure portal](https://portal.azure.com/) with your Azure account, and go to your Azure AI Search service. |
| 62 | + |
| 63 | +1. On the **Overview** page, select **Import and vectorize data**. |
| 64 | + |
| 65 | + :::image type="content" source="media/search-get-started-portal-import-vectors/command-bar.png" alt-text="Screenshot of the wizard command."::: |
| 66 | + |
| 67 | +## Connect to your data |
| 68 | + |
| 69 | +The next step is to connect to a data source to use for the search index. |
| 70 | + |
| 71 | +1. In the **Import and vectorize data** wizard on the **Connect to your data** tab, expand the **Data Source** dropdown list and select **Azure Blob Storage**. |
| 72 | + |
| 73 | +1. Specify the Azure subscription. |
| 74 | + |
| 75 | +1. For Azure Storage, select the account and container that provides the data. Use the default values for the remaining fields. |
| 76 | + |
| 77 | + :::image type="content" source="media/search-get-started-portal-images/connect-to-your-data.png" alt-text="Screenshot of the connect to your data page in the wizard."::: |
| 78 | + |
| 79 | +1. Select **Next**. |
| 80 | + |
| 81 | +## Vectorize your text |
| 82 | + |
| 83 | +If raw content includes text, this step specifies an embedding model that generates vectors for that content. Azure AI Vision model provides text embeddings, so we'll use that for this step. |
| 84 | + |
| 85 | +1. On the **Vectorize your text** page, select **AI Vision vectorization**. If it's not selectable, make sure Azure AI Search and Azure AI multiservice account are together in a region that [supports AI Vision multimodal APIs](/azure/ai-services/computer-vision/how-to/image-retrieval). |
| 86 | + |
| 87 | + :::image type="content" source="media/search-get-started-portal-images/vectorize-your-text.png" alt-text="Screenshot of the vectorize your text page in the wizard."::: |
| 88 | + |
| 89 | +1. Select **Next**. |
| 90 | + |
| 91 | +## Vectorize your images |
| 92 | + |
| 93 | +Use Azure AI Vision to generate a vector representation of the image files. |
| 94 | + |
| 95 | + |
| 96 | +vectorize-enrich-images.png |
| 97 | + |
| 98 | + |
| 99 | +1. For AI Vision vectorization, select the account. |
| 100 | +1 |
| 101 | +1. Select the checkbox acknowledging the billing impact of using these resources. |
| 102 | + |
| 103 | +1. Select **Next**. |
| 104 | + |
| 105 | +## Vectorize and enrich your images |
| 106 | + |
| 107 | +If your content includes images, you can apply AI in two ways: |
| 108 | + |
| 109 | ++ Use a supported image embedding model from the catalog, or choose the Azure AI Vision multimodal embeddings API to vectorize images. |
| 110 | ++ Use OCR to recognize text in images. |
| 111 | + |
| 112 | +Azure AI Search and your Azure AI resource must be in the same region. |
| 113 | + |
| 114 | +1. Specify the kind of connection the wizard should make. For image vectorization, it can connect to embedding models in Azure AI Studio or Azure AI Vision. |
| 115 | + |
| 116 | +1. Specify the subscription. |
| 117 | + |
| 118 | +1. For Azure AI Studio model catalog, specify the project and deployment. See [Setting up an embedding model](#set-up-embedding-models) for details. |
| 119 | + |
| 120 | +1. Optionally, you can crack binary images (for example, scanned document files) and [use OCR](cognitive-search-skill-ocr.md) to recognize text. |
| 121 | + |
| 122 | +1. Select the checkbox acknowledging the billing impact of using these resources. |
| 123 | + |
| 124 | +1. Select **Next**. |
| 125 | + |
| 126 | +## Advanced settings |
| 127 | + |
| 128 | +1. Optionally, specify a [run time schedule](search-howto-schedule-indexers.md) for the indexer. |
| 129 | + |
| 130 | +1. Select **Next**. |
| 131 | + |
| 132 | +## Run the wizard |
| 133 | + |
| 134 | +1. On Review and create, specify a prefix for the objects created when the wizard runs. A common prefix helps you stay organized. |
| 135 | + |
| 136 | +1. Select **Create** to run the wizard. This step creates the following objects: |
| 137 | + |
| 138 | + + Data source connection. |
| 139 | + |
| 140 | + + Index with vector fields, vectorizers, vector profiles, vector algorithms. You aren't prompted to design or modify the default index during the wizard workflow. Indexes conform to the [2024-05-01-preview REST API](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2024-05-01-preview&preserve-view=true). |
| 141 | + |
| 142 | + + Skillset with [Text Split skill](cognitive-search-skill-textsplit.md) for chunking and an embedding skill for vectorization. The embedding skill is either the [AzureOpenAIEmbeddingModel skill](cognitive-search-skill-azure-openai-embedding.md) for Azure OpenAI or [AML skill](cognitive-search-aml-skill.md) for Azure AI Studio model catalog. |
| 143 | + |
| 144 | + + Indexer with field mappings and output field mappings (if applicable). |
| 145 | + |
| 146 | +If you can't select Azure AI Vision vectorizer, make sure you have an Azure AI Vision resource in a supported region, and that your search service managed identity has **Cognitive Services OpenAI User** permissions. |
| 147 | + |
| 148 | +If you can't progress through the wizard because other options aren't available (for example, you can't select a data source or an embedding model), revisit the role assignments. Error messages indicate that models or deployments don't exist, when in fact the real issue is that the search service doesn't have permission to access them. |
| 149 | + |
| 150 | +## Check results |
| 151 | + |
| 152 | +Search explorer accepts text strings as input and then vectorizes the text for vector query execution. |
| 153 | + |
| 154 | +1. In the Azure portal, under **Search Management** and **Indexes**, select the index your created. |
| 155 | + |
| 156 | +1. Optionally, select **Query options** and hide vector values in search results. This step makes your search results easier to read. |
| 157 | + |
| 158 | + :::image type="content" source="media/search-get-started-portal-import-vectors/query-options.png" alt-text="Screenshot of the query options button."::: |
| 159 | + |
| 160 | +1. Select **JSON view** so that you can enter text for your vector query in the **text** vector query parameter. |
| 161 | + |
| 162 | + |
| 163 | +1. Replace the text `"*"` with a question related to health plans, such as *"which plan has the lowest deductible"*. |
| 164 | + |
| 165 | +1. Select **Search** to run the query. |
| 166 | + |
| 167 | + :::image type="content" source="media/search-get-started-portal-import-vectors/search-results.png" alt-text="Screenshot of search results."::: |
| 168 | + |
| 169 | + You should see 5 matches, where each document is a chunk of the original PDF. The title field shows which PDF the chunk comes from. |
| 170 | + |
| 171 | +## Clean up |
| 172 | + |
| 173 | +This demo uses billable Azure resources. If the resources are no longer needed, delete them from your subscription to avoid charges. |
| 174 | + |
| 175 | +## Next steps |
| 176 | + |
| 177 | +This quickstart introduced you to the **Import and vectorize data** wizard that creates all of the objects necessary for image search. If you want to explore each step in detail, try an [integrated vectorization sample](https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb). |
0 commit comments