Skip to content

Commit b54e920

Browse files
committed
Face - fix free trial region declaration; add link to regions list
1 parent b128491 commit b54e920

File tree

8 files changed

+14
-18
lines changed

8 files changed

+14
-18
lines changed

articles/cognitive-services/Face/QuickStarts/CSharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ using System.Text;
4848

4949
### Add essential fields
5050

51-
Add the following fields to the **Program** class. This data specifies how to connect to the Face service and where to get the input data. You'll need to update the `subscriptionKey` field with the value of your subscription key, and you may need to change the `uriBase` string so that it contains the correct region identifier.
51+
Add the following fields to the **Program** class. This data specifies how to connect to the Face service and where to get the input data. You'll need to update the `subscriptionKey` field with the value of your subscription key, and you may need to change the `uriBase` string so that it contains the correct region identifier (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints).
5252

5353

5454
```csharp
@@ -60,7 +60,7 @@ const string subscriptionKey = "<Subscription Key>";
6060
// subscription keys from westus, replace "westcentralus" in the URL
6161
// below with "westus".
6262
//
63-
// Free trial subscription keys are generated in the westcentralus region.
63+
// Free trial subscription keys are generated in the "westus" region.
6464
// If you use a free trial subscription key, you shouldn't need to change
6565
// this region.
6666
const string uriBase =

articles/cognitive-services/Face/QuickStarts/Java.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import org.json.JSONObject;
5959

6060
### Add essential fields
6161

62-
Add the following fields to the **Main** class. This data specifies how to connect to the Face service and where to get the input data. You'll need to update the `subscriptionKey` field with the value of your subscription key, and you may need to change the `uriBase` string so that it contains the correct region identifier. You may also wish to set the `imageWithFaces` value to a path that points to a different image file.
62+
Add the following fields to the **Main** class. This data specifies how to connect to the Face service and where to get the input data. You'll need to update the `subscriptionKey` field with the value of your subscription key, and you may need to change the `uriBase` string so that it contains the correct region identifier (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints). You may also wish to set the `imageWithFaces` value to a path that points to a different image file.
6363

6464
The `faceAttributes` field is simply a list of certain types of attributes. It will specify which information to retrieve about the detected faces.
6565

@@ -72,7 +72,7 @@ private static final String subscriptionKey = "<Subscription Key>";
7272
// subscription keys from westus, replace "westcentralus" in the URL
7373
// below with "westus".
7474
//
75-
// Free trial subscription keys are generated in the westcentralus region. If you
75+
// Free trial subscription keys are generated in the "westus" region. If you
7676
// use a free trial subscription key, you shouldn't need to change this region.
7777
private static final String uriBase =
7878
"https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect";

articles/cognitive-services/Face/QuickStarts/JavaScript.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ method to detect faces in an image and return face attributes including:
3333
To run the sample, do the following steps:
3434

3535
1. Copy the following and save it to a file such as `detectFaces.html`.
36-
2. Replace `<Subscription Key>` with your valid subscription key.
37-
3. Change the `uriBase` value to use the location where you obtained your subscription keys, if necessary.
38-
4. Drag-and-drop the file into your browser.
39-
5. Click the `Analyze faces` button.
36+
1. Replace `<Subscription Key>` with your valid subscription key.
37+
1. If necessary, change the `uriBase` value to use the location where you obtained your subscription keys (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints).
38+
1. Drag-and-drop the file into your browser.
39+
1. Click the `Analyze faces` button.
4040

4141
### Face - Detect request
4242

@@ -59,7 +59,7 @@ To run the sample, do the following steps:
5959
// subscription keys from westus, replace "westcentralus" in the URL
6060
// below with "westus".
6161
//
62-
// Free trial subscription keys are generated in the westus region.
62+
// Free trial subscription keys are generated in the "westus" region.
6363
// If you use a free trial subscription key, you shouldn't need to change
6464
// this region.
6565
var uriBase =

articles/cognitive-services/Face/QuickStarts/curl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Replace `<Subscription Key>` with your valid Face subscription key.
3636

3737
### Face endpoint URL
3838

39-
The URL `https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect` indicates the Azure Face endpoint to query. You will need to change the first part of this URL to match the region that corresponds to your subscription key (unless it is already correct).
39+
The URL `https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect` indicates the Azure Face endpoint to query. You may need to change the first part of this URL to match the region that corresponds to your subscription key (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints).
4040

4141
### URL query string
4242

articles/cognitive-services/Face/QuickStarts/node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Replace `<Subscription Key>` with your valid Face subscription key.
7878

7979
### Face endpoint URL
8080

81-
The URL `https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect` indicates the Azure Face endpoint to query. You will need to change the first part of this URL to match the region that corresponds to your subscription key (unless it is already correct).
81+
The URL `https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect` indicates the Azure Face endpoint to query. You may need to change the first part of this URL to match the region that corresponds to your subscription key (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints).
8282

8383
### URL query string
8484

articles/cognitive-services/Face/Tutorials/FaceAPIinCSharpTutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Open *MainWindow.xaml.cs* and add the client library namespaces, along with othe
6464

6565
[!code-csharp[](~/Cognitive-Face-CSharp-sample/FaceTutorialCS/FaceTutorialCS/MainWindow.xaml.cs?range=1-12)]
6666

67-
Next, insert the following code in the **MainWindow** class. This creates a **FaceClient** instance using the subscription key, which you must enter yourself. You must also set the region string in `faceEndpoint` to the correct region for your subscription.
67+
Next, insert the following code in the **MainWindow** class. This creates a **FaceClient** instance using the subscription key, which you must enter yourself. You must also set the region string in `faceEndpoint` to the correct region for your subscription (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints).
6868

6969
[!code-csharp[](~/Cognitive-Face-CSharp-sample/FaceTutorialCS/FaceTutorialCS/MainWindow.xaml.cs?range=18-46)]
7070

articles/cognitive-services/Face/Tutorials/FaceAPIinJavaForAndroidTutorial.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ Then, insert the following code in the **MainActivity** class, above the **onCre
8989

9090
[!code-java[](~/cognitive-services-face-android-detect/FaceTutorial/app/src/main/java/com/contoso/facetutorial/MainActivity.java?range=17-27)]
9191

92-
You will need to replace `<Subscription Key>` with your subscription key. Also, replace `<API endpoint>` with the your Face API endpoint, using the appropriate region identifier for your key. Free trial subscription keys are generated in the **westus** region. An example API endpoint value would be:
93-
94-
```java
95-
apiEndpoint = "https://westus.api.cognitive.microsoft.com/face/v1.0";
96-
```
92+
You will need to replace `<Subscription Key>` with your subscription key. Also, replace `<API endpoint>` with your Face API endpoint, using the appropriate region identifier for your key (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints). Free trial subscription keys are generated in the **westus** region.
9793

9894
In the **Project** pane, expand **app**, then **manifests**, and open *AndroidManifest.xml*. Insert the following element as a direct child of the `manifest` element:
9995

articles/cognitive-services/Face/Tutorials/FaceAPIinPythonTutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
3232

3333
## Detect Faces in an image
3434

35-
Create a new Python script, _FaceQuickstart.py_. Add the following code. This is the core functionality of face detection. You will need to replace `<Subscription Key>` with the value of your key. You may also need to change the value of `BASE_URL` to use the correct region identifier for your key. Free trial subscription keys are generated in the **westus** region. Optionally, set `img_url` to the URL of any image you'd like to use.
35+
Create a new Python script, _FaceQuickstart.py_. Add the following code. This is the core functionality of face detection. You will need to replace `<Subscription Key>` with the value of your key. You may also need to change the value of `BASE_URL` to use the correct region identifier for your key (see the [Face API docs](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) for a list of all region endpoints). Free trial subscription keys are generated in the **westus** region. Optionally, set `img_url` to the URL of any image you'd like to use.
3636
3737
The script will detect faces by calling the **cognitive_face.face.detect** method, which wraps the [Detect](https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236) REST API and returns a list of faces.
3838

0 commit comments

Comments
 (0)