Skip to content

Commit 4aaa0e7

Browse files
author
Jill Grant
authored
Merge pull request #239057 from PatrickFarley/comvis-updates
[cog svcs] Comvis updates
2 parents c241660 + 4ff078f commit 4aaa0e7

24 files changed

+178
-185
lines changed

articles/cognitive-services/Computer-vision/includes/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In this example, you'll write your credentials to environment variables on the l
1414
[!INCLUDE [find key and endpoint](./find-key.md)]
1515

1616
> [!TIP]
17-
> Don't include the key directly in your code, and never post it publicly. See the Cognitive Services [security](/azure/cognitive-services/security-features) article for more authentication options like [Azure Key Vault](/azure/cognitive-services/use-key-vault).
17+
> Don't include the key directly in your code, and never post it publicly. See the Cognitive Services [security](/azure/cognitive-services/security-features) article for more authentication options like [Azure Key Vault](/azure/cognitive-services/use-key-vault).
1818
1919
To set the environment variable for your key and endpoint, open a console window and follow the instructions for your operating system and development environment.
2020

articles/cognitive-services/Computer-vision/includes/find-key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ ms.date: 03/23/2022
1212
ms.author: pafarley
1313
---
1414

15-
Go to the Azure portal. If the Computer Vision resource you created in the **Prerequisites** section deployed successfully, click the **Go to Resource** button under **Next Steps**. You can find your key and endpoint in the resource's **key and endpoint** page, under **resource management**. Your resource key is not the same as your Azure subscription ID.
15+
Go to the Azure portal. If the resource you created in the **Prerequisites** section deployed successfully, click the **Go to Resource** button under **Next Steps**. You can find your key and endpoint in the resource's **key and endpoint** page, under **resource management**. Your resource key is not the same as your Azure subscription ID.

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/csharp-sdk.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Use the OCR client library to read printed and handwritten text from a remote im
3333
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Vision&Product=OCR&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
3434
3535

36+
[!INCLUDE [create environment variables](../environment-variables.md)]
37+
38+
3639
## Read printed and handwritten text
3740

3841
1. Create a new C# application.
@@ -79,18 +82,10 @@ Use the OCR client library to read printed and handwritten text from a remote im
7982

8083
---
8184

82-
1. Find the key and endpoint.
83-
84-
[!INCLUDE [find key and endpoint](../find-key.md)]
85-
8685
1. From the project directory, open the *Program.cs* file in your preferred editor or IDE. Replace the contents of *Program.cs* with the following code.
8786

8887
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/ComputerVision/ComputerVisionQuickstart-single.cs?name=snippet_single)]
8988

90-
1. Paste your key and endpoint into the code where indicated. Your Computer Vision endpoint has the form `https://<your_computer_vision_resource_name>.cognitiveservices.azure.com/`.
91-
92-
> [!IMPORTANT]
93-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
9489

9590
1. As an optional step, see [How to specify the model version](../../how-to/call-read-api.md#determine-how-to-process-the-data-optional). For example, to explicitly specify the latest GA model, edit the `ReadAsync` call as shown. Skipping the parameter or using `"latest"` automatically uses the most recent GA model.
9691

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/identity-csharp-sdk.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ Get started with facial recognition using the Face client library for .NET. The
2121
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
2222
* [!INCLUDE [contributor-requirement](../../../includes/quickstarts/contributor-requirement.md)]
2323
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesFace" title="Create a Face resource" target="_blank">create a Face resource </a> in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
24-
* You will need the key and endpoint from the resource you create to connect your application to the Face API. You'll paste your key and endpoint into the code below later in the quickstart.
24+
* You will need the key and endpoint from the resource you create to connect your application to the Face API.
2525
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2626

2727
> [!div class="nextstepaction"]
2828
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Vision&Product=Face&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
2929
30+
[!INCLUDE [create environment variables](../environment-variables.md)]
31+
3032
## Identify and verify faces
3133

3234
1. Create a new C# application
@@ -80,14 +82,6 @@ Get started with facial recognition using the Face client library for .NET. The
8082
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart-single.cs?name=snippet_single)]
8183

8284

83-
1. Enter your key and endpoint in the corresponding fields.
84-
85-
> [!IMPORTANT]
86-
> Go to the Azure portal. If the Face resource you created in the **Prerequisites** section deployed successfully, click the **Go to Resource** button under **Next Steps**. You can find your key and endpoint in the resource's **key and endpoint** page, under **resource management**.
87-
88-
> [!IMPORTANT]
89-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
90-
9185
1. Run the application
9286

9387
#### [Visual Studio IDE](#tab/visual-studio)

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/identity-javascript-sdk.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ Get started with facial recognition using the Face client library for JavaScript
2121
* The latest version of [Node.js](https://nodejs.org/en/)
2222
* [!INCLUDE [contributor-requirement](../../../includes/quickstarts/contributor-requirement.md)]
2323
* Once you have your Azure subscription, [Create a Face resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesFace) in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
24-
* You will need the key and endpoint from the resource you create to connect your application to the Face API. You'll paste your key and endpoint into the code below later in the quickstart.
24+
* You will need the key and endpoint from the resource you create to connect your application to the Face API.
2525
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2626

2727
> [!div class="nextstepaction"]
2828
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=Vision&Product=Face&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
2929
30+
[!INCLUDE [create environment variables](../environment-variables.md)]
31+
32+
3033
## Identify and verify faces
3134

3235
1. Create a new Node.js application
@@ -58,15 +61,6 @@ Get started with facial recognition using the Face client library for JavaScript
5861

5962
:::code language="js" source="~/cognitive-services-quickstart-code/javascript/Face/sdk_quickstart-single.js" id="snippet_single":::
6063

61-
62-
1. Enter your key and endpoint into the corresponding fields.
63-
64-
> [!IMPORTANT]
65-
> Go to the Azure portal. If the Face resource you created in the **Prerequisites** section deployed successfully, click the **Go to Resource** button under **Next Steps**. You can find your key and endpoint in the resource's **key and endpoint** page, under **resource management**.
66-
67-
> [!IMPORTANT]
68-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
69-
7064
1. Run the application with the `node` command on your quickstart file.
7165

7266
```console

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/identity-python-sdk.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ Get started with facial recognition using the Face client library for Python. Fo
2222
* Your Python installation should include [pip](https://pip.pypa.io/en/stable/). You can check if you have pip installed by running `pip --version` on the command line. Get pip by installing the latest version of Python.
2323
* [!INCLUDE [contributor-requirement](../../../includes/quickstarts/contributor-requirement.md)]
2424
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesFace" title="Create a Face resource" target="_blank">create a Face resource</a> in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
25-
* You will need the key and endpoint from the resource you create to connect your application to the Face API. You'll paste your key and endpoint into the code below later in the quickstart.
25+
* You will need the key and endpoint from the resource you create to connect your application to the Face API.
2626
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2727

2828
> [!div class="nextstepaction"]
2929
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=Vision&Product=Face&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
3030
31+
[!INCLUDE [create environment variables](../environment-variables.md)]
32+
3133
## Identify and verify faces
3234

3335
1. Install the client library
@@ -47,13 +49,6 @@ Get started with facial recognition using the Face client library for Python. Fo
4749

4850
[!code-python[](~/cognitive-services-quickstart-code/python/Face/FaceQuickstart-single.py?name=snippet_single)]
4951

50-
1. Enter your key and endpoint into the corresponding fields.
51-
52-
> [!IMPORTANT]
53-
> Go to the Azure portal. If the Face resource you created in the **Prerequisites** section deployed successfully, click the **Go to Resource** button under **Next Steps**. You can find your key and endpoint in the resource's **key and endpoint** page, under **resource management**.
54-
55-
> [!IMPORTANT]
56-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
5752

5853
1. Run your face recognition app from the application directory with the `python` command.
5954

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-csharp-sdk.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ Use the Image Analysis client library for C# to analyze an image for content tag
2929
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
3030
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
3131
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="Create a Computer Vision resource" target="_blank">create a Computer Vision resource </a> in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
32-
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service. You'll paste your key and endpoint into the code below later in the quickstart.
32+
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service.
3333
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
3434

3535
> [!div class="nextstepaction"]
3636
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Vision&Product=Image-analysis&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
3737
38+
[!INCLUDE [create environment variables](../environment-variables.md)]
39+
3840
## Analyze image
3941

4042
1. Create a new C# application.
@@ -81,15 +83,10 @@ Use the Image Analysis client library for C# to analyze an image for content tag
8183

8284
---
8385

84-
1. Find the key and endpoint.
85-
86-
[!INCLUDE [find key and endpoint](../find-key.md)]
87-
8886
1. From the project directory, open the *Program.cs* file in your preferred editor or IDE. Paste in the following code:
8987

9088
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/ComputerVision/ImageAnalysisQuickstart-single.cs?name=snippet_single)]
9189

92-
1. Paste your key and endpoint into the code where indicated. Your Computer Vision endpoint has the form `https://<your_computer_vision_resource_name>.cognitiveservices.azure.com/`.
9390

9491
> [!IMPORTANT]
9592
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-java-sdk.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ Use the Image Analysis client library to analyze a remote image for tags, text d
3030
* The current version of the [Java Development Kit (JDK)](https://www.microsoft.com/openjdk)
3131
* The [Gradle build tool](https://gradle.org/install/), or another dependency manager.
3232
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="Create a Computer Vision resource" target="_blank">create a Computer Vision resource </a> in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
33-
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service. You'll paste your key and endpoint into the code below later in the quickstart.
33+
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service.
3434
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
3535

3636
> [!div class="nextstepaction"]
3737
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=Vision&Product=Image-analysis&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
3838
39+
[!INCLUDE [create environment variables](../environment-variables.md)]
40+
3941

4042
## Analyze image
4143

@@ -87,20 +89,12 @@ Use the Image Analysis client library to analyze a remote image for tags, text d
8789

8890
Navigate to the new folder and create a file called *ImageAnalysisQuickstart.java*.
8991

90-
1. Find the key and endpoint.
91-
92-
[!INCLUDE [find key and endpoint](../find-key.md)]
9392

9493
1. Open *ImageAnalysisQuickstart.java* in your preferred editor or IDE and paste in the following code.
9594

9695
[!code-java[](~/cognitive-services-quickstart-code/java/ComputerVision/src/main/java/ImageAnalysisQuickstart-single.java?name=snippet_single)]
9796

9897

99-
1. Paste your key and endpoint into the code where indicated. Your Computer Vision endpoint has the form `https://<your_computer_vision_resource_name>.cognitiveservices.azure.com/`.
100-
101-
> [!IMPORTANT]
102-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
103-
10498
1. Navigate back to the project root folder, and build the app with:
10599

106100
```console

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-node-sdk.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ Use the Image Analysis client library for JavaScript to analyze a remote image f
3030
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
3131
* The current version of [Node.js](https://nodejs.org/)
3232
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="Create a Computer Vision resource" target="_blank">create a Computer Vision resource </a> in the Azure portal to get your key and endpoint. After it deploys, click **Go to resource**.
33-
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service. You'll paste your key and endpoint into the code below later in the quickstart.
33+
* You need the key and endpoint from the resource you create to connect your application to the Computer Vision service.
3434
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
3535

3636
> [!div class="nextstepaction"]
3737
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=Vision&Product=Image-analysis&Page=quickstart&Section=Prerequisites" target="_target">I ran into an issue</a>
3838
39+
[!INCLUDE [create environment variables](../environment-variables.md)]
40+
41+
3942
## Analyze image
4043

4144
1. Create a new Node.js application
@@ -70,20 +73,11 @@ Use the Image Analysis client library for JavaScript to analyze a remote image f
7073

7174
Create a new file, *index.js*.
7275

73-
1. Find the key and endpoint.
74-
75-
[!INCLUDE [find key and endpoint](../find-key.md)]
76-
7776
1. Open *index.js* in a text editor and paste in the following code.
7877

7978
[!code-javascript[](~/cognitive-services-quickstart-code/javascript/ComputerVision/ImageAnalysisQuickstart-single.js?name=snippet_single)]
8079

8180

82-
1. Paste your key and endpoint into the code where indicated. Your Computer Vision endpoint has the form `https://<your_computer_vision_resource_name>.cognitiveservices.azure.com/`.
83-
84-
> [!IMPORTANT]
85-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../key-vault/general/overview.md). See the Cognitive Services [security](../../../cognitive-services-security.md) article for more information.
86-
8781
1. Run the application with the `node` command on your quickstart file.
8882

8983
```console

0 commit comments

Comments
 (0)