Skip to content

Commit b0d47a7

Browse files
authored
Merge pull request #264707 from PatrickFarley/gh-issues-address
Gh issues address
2 parents dd5b4fc + fa66423 commit b0d47a7

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

articles/ai-services/computer-vision/how-to/blob-storage-search.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Configure your blob storage container for image retrieval and video search
2+
title: Configure your blob storage container for image retrieval
33
titleSuffix: Azure AI services
44
description: Configure your Azure storage account to get started with the **Search photos image retrieval** experience in Vision Studio.
55
#services: cognitive-services
@@ -13,14 +13,14 @@ ms.author: pafarley
1313

1414
---
1515

16-
# Configure your blob storage for image retrieval and video search in Vision Studio
16+
# Configure your blob storage for image retrieval in Vision Studio
1717

18-
To get started with the **Search photos image retrieval** scenario in Vision Studio, you need to select or create a new Azure storage account. Your storage account can be in any region, but creating it in the same region as your Vision resource is more efficient and reduces cost.
18+
To get started with the **Search photos with image retrieval** scenario in Vision Studio, you need to select or create a new Azure storage account. Your storage account can be in any region, but creating it in the same region as your Vision resource is more efficient and reduces cost.
1919

2020
> [!IMPORTANT]
21-
> You need to create your storage account on the same Azure subscription as the Vision resource you're using in the **Search photos image retrieval** scenario as shown below.
22-
23-
:::image type="content" source="../media/storage-instructions/subscription.png" alt-text="Screenshot of resource selection.":::
21+
> You need to create your storage account on the same Azure subscription as the Vision resource you're using in the **Search photos with image retrieval** scenario.
22+
>
23+
> :::image type="content" source="../media/storage-instructions/subscription.png" alt-text="Screenshot of resource selection.":::
2424
2525
## Create a new storage account
2626

@@ -53,13 +53,9 @@ In the Allowed Methods field, select the `GET` checkbox to allow an authenticate
5353
:::image type="content" source="../media/storage-instructions/cors-rule.png" alt-text="Screenshot of completed CORS screen.":::
5454

5555

56-
This allows Vision Studio to access images and videos in your blob storage container to extract insights on your data.
57-
58-
## Upload images and videos in Vision Studio
59-
60-
In the **Try with your own video** or **Try with your own image** section in Vision Studio, select the storage account that you configured with the CORS rule. Select the container in which your images or videos are stored. If you don't have a container, you can create one and upload the images or videos from your local device. If you have updated the CORS rules on the storage account, refresh the Blob container or Video files on container sections.
61-
56+
This allows Vision Studio to access images in your blob storage container to extract insights on your data.
6257

63-
:::image type="content" source="../media/storage-instructions/video-selection.png" alt-text="Screenshot of image upload in Vision Studio.":::
58+
## Upload images in Vision Studio
6459

60+
In the **Search photos with image retrieval** section in Vision Studio, select the storage account that you configured with the CORS rule. Select the container in which your images are stored. If you don't have a container, you can create one and upload the images from your local device. If you have updated the CORS rules on the storage account, refresh the Blob container or Video files on container sections.
6561

articles/ai-services/computer-vision/how-to/image-retrieval.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88

99
ms.service: azure-ai-vision
1010
ms.topic: how-to
11-
ms.date: 01/19/2024
11+
ms.date: 01/30/2024
1212
ms.author: pafarley
1313
ms.custom: references_regions
1414
---
@@ -90,7 +90,9 @@ The API call returns a **vector** JSON object, which defines the text string's c
9090

9191
Cosine similarity is a method for measuring the similarity of two vectors. In an image retrieval scenario, you'll compare the search query vector with each image's vector. Images that are above a certain threshold of similarity can then be returned as search results.
9292

93-
The following example C# code calculates the cosine similarity between two vectors. It's up to you to decide what similarity threshold to use for returning images as search results.
93+
The following example code calculates the cosine similarity between two vectors. It's up to you to decide what similarity threshold to use for returning images as search results.
94+
95+
#### [C#](#tab/csharp)
9496

9597
```csharp
9698
public static float GetCosineSimilarity(float[] vector1, float[] vector2)
@@ -108,6 +110,17 @@ public static float GetCosineSimilarity(float[] vector1, float[] vector2)
108110
}
109111
```
110112

113+
#### [Python](#tab/python)
114+
115+
```python
116+
import numpy as np
117+
118+
def cosine_similarity(vector1, vector2):
119+
return np.dot(vector1, vector2) / (np.linalg.norm(vector1) * np.linalg.norm(vector2))
120+
```
121+
122+
---
123+
111124
## Next steps
112125

113126
[Image retrieval concepts](../concept-image-retrieval.md)

articles/ai-services/computer-vision/includes/identity-curl-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Get started with facial recognition using the Face REST API. The Face service pr
5252

5353
Save the IDs of each **Person** created; it's important to keep track of which person name has which ID.
5454

55-
1. Next you'll need to detect new faces and associate them with the **Person** objects that exist. The following command detects a face from the image *Family1-Dad.jpg* and adds it to the corresponding person. You need to specify the `personId` as the ID that was returned when you created the "Family1-Dad" **Person** object. The image name corresponds to the name of the created **Person**. Also enter the **LargePersonGroup** ID and your key in the appropriate fields.
55+
1. Next you'll need to detect new faces and associate them with the **Person** objects that exist. The following command detects a face from the image *Family1-Dad1.jpg* and adds it to the corresponding person. You need to specify the `personId` as the ID that was returned when you created the "Family1-Dad" **Person** object. The image name corresponds to the name of the created **Person**. Also enter the **LargePersonGroup** ID and your key in the appropriate fields.
5656

5757
:::code source="~/cognitive-services-quickstart-code/curl/face/detect.sh" ID="identify_add_face":::
5858

articles/ai-services/openai/includes/dall-e-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.date: 11/06/2023
1313

1414
Use this guide to get started generating images with the Azure OpenAI SDK for Python.
1515

16-
[Library source code](https://github.com/openai/openai-python/tree/main/openai) | [Package](https://github.com/openai/openai-python) | [Samples](https://github.com/openai/openai-python/tree/main/examples)
16+
[Library source code](https://github.com/openai/openai-python/tree/main/src/openai) | [Package](https://github.com/openai/openai-python) | [Samples](https://github.com/openai/openai-python/tree/main/examples)
1717

1818
## Prerequisites
1919

0 commit comments

Comments
 (0)