Skip to content

Commit fe19edf

Browse files
committed
Merge branch 'main' into release-blob-backup
2 parents 67cea03 + bec2b2c commit fe19edf

File tree

272 files changed

+3075
-1930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+3075
-1930
lines changed

.openpublishing.redirection.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,11 @@
16041604
"redirect_url": "/azure/vpn-gateway/tutorial-create-gateway-portal",
16051605
"redirect_document_id": false
16061606
},
1607+
{
1608+
"source_path_from_root": "/articles/vpn-gateway/create-routebased-vpn-gateway-powershell.md",
1609+
"redirect_url": "/azure/vpn-gateway/create-gateway-powershell",
1610+
"redirect_document_id": false
1611+
},
16071612
{
16081613
"source_path_from_root": "/articles/vpn-gateway/vpn-gateway-howto-openvpn-clients.md",
16091614
"redirect_url": "/azure/vpn-gateway/point-to-site-vpn-client-cert-windows",
@@ -4162,6 +4167,21 @@
41624167
"redirect_url": "/azure/service-fabric/service-fabric-best-practices-security",
41634168
"redirect_document_id": false
41644169
},
4170+
{
4171+
"source_path_from_root": "/articles/service-fabric/service-fabric-diagnostics-overview.md",
4172+
"redirect_url": "/azure/service-fabric/monitor-service-fabric",
4173+
"redirect_document_id": false
4174+
},
4175+
{
4176+
"source_path_from_root": "/articles/service-fabric/service-fabric-diagnostics-event-generation-perf.md",
4177+
"redirect_url": "/azure/service-fabric/monitor-service-fabric-reference#performance-metrics",
4178+
"redirect_document_id": false
4179+
},
4180+
{
4181+
"source_path_from_root": "/articles/service-fabric/service-fabric-diagnostics-event-generation-app.md",
4182+
"redirect_url": "/azure/service-fabric/monitor-service-fabric#application-monitoring",
4183+
"redirect_document_id": false
4184+
},
41654185
{
41664186
"source_path_from_root": "/articles/virtual-desktop/partners.md",
41674187
"redirect_url": "https://azuremarketplace.microsoft.com/marketplace/apps?page=1&search=azure%20virtual%20desktop",

articles/ai-services/computer-vision/Tutorials/liveness.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
8787

8888
#### [C#](#tab/csharp)
8989
```csharp
90-
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("VISION_ENDPOINT"));
91-
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("VISION_KEY"));
90+
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("FACE_ENDPOINT"));
91+
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("FACE_APIKEY"));
9292

9393
var sessionClient = new FaceSessionClient(endpoint, credential);
9494

@@ -107,8 +107,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
107107

108108
#### [Java](#tab/java)
109109
```java
110-
String endpoint = System.getenv("VISION_ENDPOINT");
111-
String accountKey = System.getenv("VISION_KEY");
110+
String endpoint = System.getenv("FACE_ENDPOINT");
111+
String accountKey = System.getenv("FACE_APIKEY");
112112

113113
FaceSessionClient sessionClient = new FaceSessionClientBuilder()
114114
.endpoint(endpoint)
@@ -127,8 +127,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
127127

128128
#### [Python](#tab/python)
129129
```python
130-
endpoint = os.environ["VISION_ENDPOINT"]
131-
key = os.environ["VISION_KEY"]
130+
endpoint = os.environ["FACE_ENDPOINT"]
131+
key = os.environ["FACE_APIKEY"]
132132

133133
face_session_client = FaceSessionClient(endpoint=endpoint, credential=AzureKeyCredential(key))
134134

@@ -171,8 +171,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
171171

172172
#### [REST API (Windows)](#tab/cmd)
173173
```console
174-
curl --request POST --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions" ^
175-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%" ^
174+
curl --request POST --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions" ^
175+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%" ^
176176
--header "Content-Type: application/json" ^
177177
--data ^
178178
"{ ^
@@ -184,8 +184,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
184184

185185
#### [REST API (Linux)](#tab/bash)
186186
```bash
187-
curl --request POST --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions" \
188-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}" \
187+
curl --request POST --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions" \
188+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}" \
189189
--header "Content-Type: application/json" \
190190
--data \
191191
'{
@@ -303,14 +303,14 @@ The high-level steps involved in liveness orchestration are illustrated below:
303303

304304
#### [REST API (Windows)](#tab/cmd)
305305
```console
306-
curl --request GET --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
307-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
306+
curl --request GET --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
307+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
308308
```
309309

310310
#### [REST API (Linux)](#tab/bash)
311311
```bash
312-
curl --request GET --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
313-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
312+
curl --request GET --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
313+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
314314
```
315315

316316
---
@@ -394,14 +394,14 @@ The high-level steps involved in liveness orchestration are illustrated below:
394394

395395
#### [REST API (Windows)](#tab/cmd)
396396
```console
397-
curl --request DELETE --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
398-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
397+
curl --request DELETE --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
398+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
399399
```
400400

401401
#### [REST API (Linux)](#tab/bash)
402402
```bash
403-
curl --request DELETE --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
404-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
403+
curl --request DELETE --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
404+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
405405
```
406406

407407
---
@@ -443,8 +443,8 @@ The high-level steps involved in liveness with verification orchestration are il
443443
444444
#### [C#](#tab/csharp)
445445
```csharp
446-
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("VISION_ENDPOINT"));
447-
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("VISION_KEY"));
446+
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("FACE_ENDPOINT"));
447+
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("FACE_APIKEY"));
448448

449449
var sessionClient = new FaceSessionClient(endpoint, credential);
450450

@@ -467,8 +467,8 @@ The high-level steps involved in liveness with verification orchestration are il
467467

468468
#### [Java](#tab/java)
469469
```java
470-
String endpoint = System.getenv("VISION_ENDPOINT");
471-
String accountKey = System.getenv("VISION_KEY");
470+
String endpoint = System.getenv("FACE_ENDPOINT");
471+
String accountKey = System.getenv("FACE_APIKEY");
472472

473473
FaceSessionClient sessionClient = new FaceSessionClientBuilder()
474474
.endpoint(endpoint)
@@ -493,8 +493,8 @@ The high-level steps involved in liveness with verification orchestration are il
493493

494494
#### [Python](#tab/python)
495495
```python
496-
endpoint = os.environ["VISION_ENDPOINT"]
497-
key = os.environ["VISION_KEY"]
496+
endpoint = os.environ["FACE_ENDPOINT"]
497+
key = os.environ["FACE_APIKEY"]
498498

499499
face_session_client = FaceSessionClient(endpoint=endpoint, credential=AzureKeyCredential(key))
500500

@@ -558,16 +558,16 @@ The high-level steps involved in liveness with verification orchestration are il
558558

559559
#### [REST API (Windows)](#tab/cmd)
560560
```console
561-
curl --request POST --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" ^
562-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%" ^
561+
curl --request POST --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" ^
562+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%" ^
563563
--form "Parameters=""{\\\""livenessOperationMode\\\"": \\\""passive\\\"", \\\""deviceCorrelationId\\\"": \\\""723d6d03-ef33-40a8-9682-23a1feb7bccd\\\""}""" ^
564564
--form "VerifyImage=@""test.png"""
565565
```
566566

567567
#### [REST API (Linux)](#tab/bash)
568568
```bash
569-
curl --request POST --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" \
570-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}" \
569+
curl --request POST --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" \
570+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}" \
571571
--form 'Parameters="{
572572
\"livenessOperationMode\": \"passive\",
573573
\"deviceCorrelationId\": \"723d6d03-ef33-40a8-9682-23a1feb7bccd\"
@@ -693,14 +693,14 @@ The high-level steps involved in liveness with verification orchestration are il
693693

694694
#### [REST API (Windows)](#tab/cmd)
695695
```console
696-
curl --request GET --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
697-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
696+
curl --request GET --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
697+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
698698
```
699699

700700
#### [REST API (Linux)](#tab/bash)
701701
```bash
702-
curl --request GET --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
703-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
702+
curl --request GET --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
703+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
704704
```
705705

706706
---
@@ -788,14 +788,14 @@ The high-level steps involved in liveness with verification orchestration are il
788788

789789
#### [REST API (Windows)](#tab/cmd)
790790
```console
791-
curl --request DELETE --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
792-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
791+
curl --request DELETE --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
792+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
793793
```
794794

795795
#### [REST API (Linux)](#tab/bash)
796796
```bash
797-
curl --request DELETE --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
798-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
797+
curl --request DELETE --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
798+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
799799
```
800800

801801
---

articles/ai-services/computer-vision/how-to/add-faces.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.custom: devx-track-csharp
1818

1919
[!INCLUDE [Gate notice](../includes/identity-gate-notice.md)]
2020

21-
This guide demonstrates how to add a large number of persons and faces to a **PersonGroup** object. The same strategy also applies to **LargePersonGroup**, **FaceList**, and **LargeFaceList** objects. This sample is written in C# and uses the Azure AI Face .NET client library.
21+
This guide demonstrates how to add a large number of persons and faces to a **PersonGroup** object. The same strategy also applies to **LargePersonGroup**, **FaceList**, and **LargeFaceList** objects. This sample is written in C#.
2222

2323
## Initialization
2424

@@ -57,10 +57,6 @@ static async Task WaitCallLimitPerSecondAsync()
5757
}
5858
```
5959

60-
## Authorize the API call
61-
62-
When you use the Face client library, the key and subscription endpoint are passed in through the constructor of the FaceClient class. See the [quickstart](../quickstarts-sdk/identity-client-library.md?pivots=programming-language-csharp&tabs=visual-studio) for instructions on creating a Face client object.
63-
6460

6561
## Create the PersonGroup
6662

@@ -70,21 +66,33 @@ This code creates a **PersonGroup** named `"MyPersonGroup"` to save the persons.
7066
const string personGroupId = "mypersongroupid";
7167
const string personGroupName = "MyPersonGroup";
7268
_timeStampQueue.Enqueue(DateTime.UtcNow);
73-
await faceClient.LargePersonGroup.CreateAsync(personGroupId, personGroupName);
69+
using (var content = new ByteArrayContent(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(new Dictionary<string, object> { ["name"] = personGroupName, ["recognitionModel"] = "recognition_04" }))))
70+
{
71+
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
72+
await httpClient.PutAsync($"{ENDPOINT}/face/v1.0/persongroups/{personGroupId}", content);
73+
}
7474
```
7575

7676
## Create the persons for the PersonGroup
7777

7878
This code creates **Persons** concurrently, and uses `await WaitCallLimitPerSecondAsync()` to avoid exceeding the call rate limit.
7979

8080
```csharp
81-
Person[] persons = new Person[PersonCount];
81+
string?[] persons = new string?[PersonCount];
8282
Parallel.For(0, PersonCount, async i =>
8383
{
8484
await WaitCallLimitPerSecondAsync();
8585

8686
string personName = $"PersonName#{i}";
87-
persons[i] = await faceClient.PersonGroupPerson.CreateAsync(personGroupId, personName);
87+
using (var content = new ByteArrayContent(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(new Dictionary<string, object> { ["name"] = personName }))))
88+
{
89+
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
90+
using (var response = await httpClient.PostAsync($"{ENDPOINT}/face/v1.0/persongroups/{personGroupId}/persons", content))
91+
{
92+
string contentString = await response.Content.ReadAsStringAsync();
93+
persons[i] = (string?)(JsonConvert.DeserializeObject<Dictionary<string, object>>(contentString)?["personId"]);
94+
}
95+
}
8896
});
8997
```
9098

@@ -95,7 +103,6 @@ Faces added to different persons are processed concurrently. Faces added for one
95103
```csharp
96104
Parallel.For(0, PersonCount, async i =>
97105
{
98-
Guid personId = persons[i].PersonId;
99106
string personImageDir = @"/path/to/person/i/images";
100107

101108
foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg"))
@@ -104,7 +111,11 @@ Parallel.For(0, PersonCount, async i =>
104111

105112
using (Stream stream = File.OpenRead(imagePath))
106113
{
107-
await faceClient.PersonGroupPerson.AddFaceFromStreamAsync(personGroupId, personId, stream);
114+
using (var content = new StreamContent(stream))
115+
{
116+
content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
117+
await httpClient.PostAsync($"{ENDPOINT}/face/v1.0/persongroups/{personGroupId}/persons/{persons[i]}/persistedfaces?detectionModel=detection_03", content);
118+
}
108119
}
109120
}
110121
});

articles/ai-services/computer-vision/how-to/find-similar-faces.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.author: pafarley
1717

1818
[!INCLUDE [Gate notice](../includes/identity-gate-notice.md)]
1919

20-
The [Find Similar](/rest/api/face/face-recognition-operations/find-similar-from-large-face-list) operation does face matching between a target face and a set of candidate faces, finding a smaller set of faces that look similar to the target face. This is useful for doing a face search by image.
20+
The [Find Similar](/rest/api/face/face-recognition-operations/find-similar) operation does face matching between a target face and a set of candidate faces, finding a smaller set of faces that look similar to the target face. This is useful for doing a face search by image.
2121

2222
This guide demonstrates how to use the Find Similar feature in the different language SDKs. The following sample code assumes you have already authenticated a Face client object. For details on how to do this, follow a [quickstart](../quickstarts-sdk/identity-client-library.md).
2323

@@ -39,11 +39,11 @@ You need to detect faces in images before you can compare them. In this guide, t
3939

4040
The following face detection method is optimized for comparison operations. It doesn't extract detailed face attributes, and it uses an optimized recognition model.
4141

42-
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_face_detect_recognize)]
42+
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FindSimilar.cs?name=snippet_face_detect_recognize)]
4343

4444
The following code uses the above method to get face data from a series of images.
4545

46-
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_loadfaces)]
46+
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FindSimilar.cs?name=snippet_loadfaces)]
4747

4848

4949
#### [REST API](#tab/rest)
@@ -72,11 +72,11 @@ In this guide, the face detected in the *Family1-Dad1.jpg* image should be retur
7272

7373
The following code calls the Find Similar API on the saved list of faces.
7474

75-
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_find_similar)]
75+
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FindSimilar.cs?name=snippet_find_similar)]
7676

7777
The following code prints the match details to the console:
7878

79-
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FaceQuickstart.cs?name=snippet_find_similar_print)]
79+
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/Face/FindSimilar.cs?name=snippet_find_similar_print)]
8080

8181

8282
#### [REST API](#tab/rest)

0 commit comments

Comments
 (0)