Skip to content

Commit 8b8c2c9

Browse files
authored
Merge pull request #112610 from msebolt/1705921-adding-zone-pivots-cognitive-services-face
zone-pivots
2 parents 4b39389 + cad3105 commit 8b8c2c9

File tree

8 files changed

+88
-43
lines changed

8 files changed

+88
-43
lines changed

.openpublishing.redirection.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,6 +1922,21 @@
19221922
"redirect_url": "/azure/cognitive-services/bing-autosuggest/quickstarts/client-libraries?pivots=programming-language-go",
19231923
"redirect_document_id": false
19241924
},
1925+
{
1926+
"source_path": "articles/cognitive-services/Face/Quickstarts/csharp-sdk.md",
1927+
"redirect_url": "/azure/cognitive-services/Face/Quickstarts/client-libraries?pivots=programming-language-csharp",
1928+
"redirect_document_id": false
1929+
},
1930+
{
1931+
"source_path": "articles/cognitive-services/Face/Quickstarts/python-sdk.md",
1932+
"redirect_url": "/azure/cognitive-services/Face/Quickstarts/client-libraries?pivots=programming-language-python",
1933+
"redirect_document_id": false
1934+
},
1935+
{
1936+
"source_path": "articles/cognitive-services/Face/Quickstarts/go-sdk.md",
1937+
"redirect_url": "/azure/cognitive-services/Face/Quickstarts/client-libraries?pivots=programming-language-go",
1938+
"redirect_document_id": false
1939+
},
19251940
{
19261941
"source_path": "articles/virtual-machines/linux/classic/rdma-cluster.md",
19271942
"redirect_url": "/azure/virtual-machines/linux/sizes-hpc#rdma-capable-instances",
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: 'Quickstart: Use the Face client library'
3+
titleSuffix: Azure Cognitive Services
4+
description: The Face API offers client libraries that makes it easy to detect, find similar, identify, verify and more.
5+
services: cognitive-services
6+
author: PatrickFarley
7+
manager: nitinme
8+
zone_pivot_groups: programming-languages-set-eighteen
9+
10+
ms.service: cognitive-services
11+
ms.subservice: face-api
12+
ms.topic: quickstart
13+
ms.date: 04/24/2020
14+
ms.author: pafarley
15+
---
16+
# Quickstart: Use the Face client library
17+
18+
::: zone pivot="programming-language-csharp"
19+
20+
[!INCLUDE [C# quickstart](../includes/quickstarts/face-client-library-csharp.md)]
21+
22+
::: zone-end
23+
24+
::: zone pivot="programming-language-python"
25+
26+
[!INCLUDE [Python quickstart](../includes/quickstarts/face-client-library-python.md)]
27+
28+
::: zone-end
29+
30+
::: zone pivot="programming-language-go"
31+
32+
[!INCLUDE [Go quickstart](../includes/quickstarts/face-client-library-go.md)]
33+
34+
::: zone-end

articles/cognitive-services/Face/QuickStarts/csharp-sdk.md renamed to articles/cognitive-services/Face/includes/quickstarts/face-client-library-csharp.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
---
2-
title: "Quickstart: Face client library for .NET"
2+
title: "Face .NET client library quickstart"
33
description: Get started with the Face client library for .NET with this quickstart.
44
services: cognitive-services
55
author: PatrickFarley
66
manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: face-api
9-
ms.topic: quickstart
9+
ms.topic: include
1010
ms.date: 04/14/2020
1111
ms.author: pafarley
1212
---
13-
# Quickstart: Face client library for .NET
14-
1513
Get started with the Face client library for .NET. Follow these steps to install the package and try out the example code for basic tasks. The Face service provides you with access to advanced algorithms for detecting and recognizing human faces in images.
1614

1715
Use the Face client library for .NET to:
@@ -83,7 +81,7 @@ If you're using the Visual Studio IDE, the client library is available as a down
8381

8482
## Object model
8583

86-
The following classes and interfaces handle some of the major features of the Face .NET SDK:
84+
The following classes and interfaces handle some of the major features of the Face .NET client library:
8785

8886
|Name|Description|
8987
|---|---|
@@ -126,7 +124,7 @@ The following fields are needed for several of the Face operations you'll add la
126124

127125
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_image_url)]
128126

129-
Define strings to point to the different recognition model types. Later on, you'll be able to specify which recognition model you want to use for face detection. See [Specify a recognition model](../Face-API-How-to-Topics/specify-recognition-model.md) for information on these options.
127+
Define strings to point to the different recognition model types. Later on, you'll be able to specify which recognition model you want to use for face detection. See [Specify a recognition model](../../Face-API-How-to-Topics/specify-recognition-model.md) for information on these options.
130128

131129
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_detect_models)]
132130

@@ -216,7 +214,7 @@ The next code snippet calls the **IdentifyAsync** operation and prints the resul
216214

217215
## Take a snapshot for data migration
218216

219-
The Snapshots feature lets you move your saved Face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You may want to use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and want to migrate it to a paid subscription. See [Migrate your face data](../Face-API-How-to-Topics/how-to-migrate-face-data.md) for an overview of the Snapshots feature.
217+
The Snapshots feature lets you move your saved Face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You may want to use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and want to migrate it to a paid subscription. See [Migrate your face data](../../Face-API-How-to-Topics/how-to-migrate-face-data.md) for an overview of the Snapshots feature.
220218

221219
In this example, you will migrate the **PersonGroup** you created in [Create and train a person group](#create-and-train-a-person-group). You can either complete that section first, or create your own Face data construct(s) to migrate.
222220

@@ -276,8 +274,8 @@ dotnet run
276274

277275
If you want to clean up and remove a Cognitive Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
278276

279-
* [Portal](../../cognitive-services-apis-create-account.md#clean-up-resources)
280-
* [Azure CLI](../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
277+
* [Portal](../../../cognitive-services-apis-create-account.md#clean-up-resources)
278+
* [Azure CLI](../../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
281279

282280
If you created a **PersonGroup** in this quickstart and you want to delete it, run the following code in your program:
283281

@@ -298,5 +296,5 @@ In this quickstart, you learned how to use the Face library for .NET to do basis
298296
> [!div class="nextstepaction"]
299297
> [Face API reference (.NET)](https://docs.microsoft.com/dotnet/api/overview/azure/cognitiveservices/client/faceapi?view=azure-dotnet)
300298
301-
* [What is the Face service?](../overview.md)
299+
* [What is the Face service?](../../overview.md)
302300
* The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/Face/FaceQuickstart.cs).

articles/cognitive-services/Face/QuickStarts/go-sdk.md renamed to articles/cognitive-services/Face/includes/quickstarts/face-client-library-go.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
2-
title: "Quickstart: Face client library for Go | Microsoft Docs"
2+
title: "Face Go client library quickstart"
33
description: Get started with the Face client library for Go.
44
services: cognitive-services
55
author: PatrickFarley
66
manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice:
9-
ms.topic: quickstart
9+
ms.topic: include
1010
ms.date: 01/27/2020
1111
ms.author: pafarley
1212
---
13-
14-
# Quickstart: Face client library for Go
15-
1613
Get started with the Face client library for Go. Follow these steps to install the library and try out our examples for basic tasks. The Face service provides you with access to advanced algorithms for detecting and recognizing human faces in images.
1714

1815
Use the Face service client library for Go to:
@@ -137,7 +134,7 @@ Next, you'll begin adding code to carry out different Face service operations.
137134

138135
## Object model
139136

140-
The following classes and interfaces handle some of the major features of the Face service Go SDK.
137+
The following classes and interfaces handle some of the major features of the Face service Go client library.
141138

142139
|Name|Description|
143140
|---|---|
@@ -172,7 +169,7 @@ Create a **main** function and add the following code to it to instantiate a cli
172169

173170
## Detect faces in an image
174171

175-
Add the following code in your **main** method. This code defines a remote sample image and specifies which face features to extract from the image. It also specifies which AI model to use to extract data from the detected face(s). See [Specify a recognition model](../Face-API-How-to-Topics/specify-recognition-model.md) for information on these options. Finally, the **[DetectWithURL](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face#Client.DetectWithURL)** method does the face detection operation on the image and saves the results in program memory.
172+
Add the following code in your **main** method. This code defines a remote sample image and specifies which face features to extract from the image. It also specifies which AI model to use to extract data from the detected face(s). See [Specify a recognition model](../../Face-API-How-to-Topics/specify-recognition-model.md) for information on these options. Finally, the **[DetectWithURL](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face#Client.DetectWithURL)** method does the face detection operation on the image and saves the results in program memory.
176173

177174
[!code-go[](~/cognitive-services-quickstart-code/go/Face/FaceQuickstart.go?name=snippet_detect)]
178175

@@ -298,7 +295,7 @@ The following code compares each of the source images to the target image and pr
298295

299296
## Take a snapshot for data migration
300297

301-
The Snapshots feature lets you move your saved face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You might use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and now want to migrate it to a paid subscription. See the [Migrate your face data](../Face-API-How-to-Topics/how-to-migrate-face-data.md) for a broad overview of the Snapshots feature.
298+
The Snapshots feature lets you move your saved face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You might use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and now want to migrate it to a paid subscription. See the [Migrate your face data](../../Face-API-How-to-Topics/how-to-migrate-face-data.md) for a broad overview of the Snapshots feature.
302299

303300
In this example, you'll migrate the **PersonGroup** you created in [Create and train a person group](#create-and-train-a-person-group). You can either complete that section first, or use your own Face data construct(s).
304301

@@ -354,8 +351,8 @@ go run sample-app.go
354351

355352
If you want to clean up and remove a Cognitive Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
356353

357-
* [Portal](../../cognitive-services-apis-create-account.md#clean-up-resources)
358-
* [Azure CLI](../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
354+
* [Portal](../../../cognitive-services-apis-create-account.md#clean-up-resources)
355+
* [Azure CLI](../../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
359356

360357
If you created a **PersonGroup** in this quickstart and you want to delete it, call the **[Delete](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face#PersonGroupClient.Delete)** method. If you migrated data using the Snapshot feature in this quickstart, you'll also need to delete the **PersonGroup** saved to the target subscription.
361358

@@ -366,5 +363,5 @@ In this quickstart, you learned how to use the Face library for Go to do basis t
366363
> [!div class="nextstepaction"]
367364
> [Face API reference (Go)](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face)
368365
369-
* [What is the Face service?](../overview.md)
366+
* [What is the Face service?](../../overview.md)
370367
* The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/go/Face/FaceQuickstart.go).

articles/cognitive-services/Face/QuickStarts/python-sdk.md renamed to articles/cognitive-services/Face/includes/quickstarts/face-client-library-python.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
2-
title: "Quickstart: Face client library for Python"
2+
title: "Face Python client library quickstart"
33
description: This quickstart will help you get started with the Face client library for Python to detect, find similar, identify, verify and more.
44
services: cognitive-services
55
author: PatrickFarley
66
manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: face-api
9-
ms.topic: quickstart
9+
ms.topic: include
1010
ms.date: 04/14/2020
1111
ms.author: pafarley
1212
---
13-
14-
# Quickstart: Face client library for Python
15-
1613
Get started with the Face client library for Python. Follow these steps to install the package and try out the example code for basic tasks. The Face service provides you with access to advanced algorithms for detecting and recognizing human faces in images.
1714

1815
Use the Face client library for Python to:
@@ -62,7 +59,7 @@ pip install --upgrade azure-cognitiveservices-vision-face
6259

6360
## Object model
6461

65-
The following classes and interfaces handle some of the major features of the Face Python SDK.
62+
The following classes and interfaces handle some of the major features of the Face Python client library.
6663

6764
|Name|Description|
6865
|---|---|
@@ -89,7 +86,7 @@ These code snippets show you how to do the following tasks with the Face client
8986
## Authenticate the client
9087

9188
> [!NOTE]
92-
> This quickstart assumes you've [created an environment variable](../../cognitive-services-apis-create-account.md#configure-an-environment-variable-for-authentication) for your Face key, named `FACE_SUBSCRIPTION_KEY`.
89+
> This quickstart assumes you've [created an environment variable](../../../cognitive-services-apis-create-account.md#configure-an-environment-variable-for-authentication) for your Face key, named `FACE_SUBSCRIPTION_KEY`.
9390
9491
Instantiate a client with your endpoint and key. Create a [CognitiveServicesCredentials](https://docs.microsoft.com/python/api/msrest/msrest.authentication.cognitiveservicescredentials?view=azure-python) object with your key, and use it with your endpoint to create a [FaceClient](https://docs.microsoft.com/python/api/azure-cognitiveservices-vision-face/azure.cognitiveservices.vision.face.faceclient?view=azure-python) object.
9592

@@ -109,7 +106,7 @@ The following code outputs the given image to the display and draws rectangles a
109106

110107
[!code-python[](~/cognitive-services-quickstart-code/python/Face/FaceQuickstart.py?name=snippet_frame)]
111108

112-
![A young woman with a red rectangle drawn around the face](../images/face-rectangle-result.png)
109+
![A young woman with a red rectangle drawn around the face](../../images/face-rectangle-result.png)
113110

114111
## Find similar faces
115112

@@ -208,7 +205,7 @@ The following code compares each of the source images to the target image and pr
208205

209206
## Take a snapshot for data migration
210207

211-
The Snapshots feature lets you move your saved face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You may want to use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and now want to migrate it to a paid subscription. See the [Migrate your face data](../Face-API-How-to-Topics/how-to-migrate-face-data.md) for a broad overview of the Snapshots feature.
208+
The Snapshots feature lets you move your saved face data, such as a trained **PersonGroup**, to a different Azure Cognitive Services Face subscription. You may want to use this feature if, for example, you've created a **PersonGroup** object using a free trial subscription and now want to migrate it to a paid subscription. See the [Migrate your face data](../../Face-API-How-to-Topics/how-to-migrate-face-data.md) for a broad overview of the Snapshots feature.
212209

213210
In this example, you will migrate the **PersonGroup** you created in [Create and train a person group](#create-and-train-a-person-group). You can either complete that section first, or use your own Face data construct(s).
214211

@@ -282,5 +279,5 @@ In this quickstart, you learned how to use the Face library for Python to do bas
282279
> [!div class="nextstepaction"]
283280
> [Face API reference (Python)](https://docs.microsoft.com/python/api/azure-cognitiveservices-vision-face/?view=azure-python)
284281
285-
* [What is the Face service?](../overview.md)
282+
* [What is the Face service?](../../overview.md)
286283
* The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/Face/FaceQuickstart.py).

articles/cognitive-services/Face/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ landingContent:
3737
- linkListType: quickstart
3838
links:
3939
- text: Using the .NET SDK
40-
url: quickstarts/csharp-sdk.md
40+
url: quickstarts/client-libraries.md?pivots=programming-language-csharp
4141
- text: Using the Python SDK
42-
url: quickstarts/python-sdk.md
42+
url: quickstarts/client-libraries.md?pivots=programming-language-python
4343
- text: Using the Go SDK
44-
url: quickstarts/go-sdk.md
44+
url: quickstarts/client-libraries.md?pivots=programming-language-go
4545
- linkListType: how-to-guide
4646
links:
4747
- text: Specify a face detection model

articles/cognitive-services/Face/toc.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@
77
href: Overview.md
88
- name: Quickstarts
99
items:
10-
- name: Using the client SDK
11-
items:
12-
- name: .NET SDK
13-
href: Quickstarts/csharp-sdk.md
14-
- name: Python SDK
15-
href: QuickStarts/python-sdk.md
16-
- name: Go SDK
17-
href: QuickStarts/go-sdk.md
10+
- name: Using the client library
11+
href: Quickstarts/client-libraries.md
1812
- name: Using the REST API
1913
items:
2014
- name: Detect faces in an image

articles/zone-pivot-groups.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,14 @@ groups:
305305
- id: programming-language-javascript
306306
title: JavaScript
307307
- id: programming-language-python
308-
title: Python
308+
title: Python
309+
- id: programming-languages-set-eighteen
310+
title: Programming languages
311+
prompt: Choose a programming language
312+
pivots:
313+
- id: programming-language-csharp
314+
title: C#
315+
- id: programming-language-python
316+
title: Python
317+
- id: programming-language-go
318+
title: Go

0 commit comments

Comments
 (0)