Skip to content

Commit bf39195

Browse files
committed
start rewrite from template
1 parent 164a0a9 commit bf39195

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

articles/cognitive-services/Custom-Vision-Service/use-prediction-api.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ ms.author: pafarley
1414
ms.custom: devx-track-csharp
1515
---
1616

17-
# Use your model with the prediction API
17+
# Call the prediction API
18+
19+
After you've train your model, you can test images programmatically by submitting them to the prediction API endpoint. In this guide, you'll learn how to call the prediction API to score an image. You'll learn the different ways you can configure the behavior of this API to meet your needs.
1820

19-
After you've train your model, you can test images programmatically by submitting them to the Prediction API endpoint.
2021

2122
> [!NOTE]
22-
> This document demonstrates using C# to submit an image to the Prediction API. For more information and examples, see the [Prediction API reference](https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Prediction_3.0/operations/5c82db60bf6a2b11a8247c15).
23+
> This document demonstrates using the .NET client library with C# to submit an image to the Prediction API. For more information and examples, see the [Prediction API reference](https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Prediction_3.0/operations/5c82db60bf6a2b11a8247c15).
24+
25+
## Setup
2326

24-
## Publish your trained iteration
27+
### Publish your trained iteration
2528

2629
From the [Custom Vision web page](https://customvision.ai), select your project and then select the __Performance__ tab.
2730

@@ -33,19 +36,34 @@ Once your model has been successfully published, you'll see a "Published" label
3336

3437
![The performance tab is shown, with a red rectangle surrounding the Published label and the name of the published iteration.](./media/use-prediction-api/published-iteration.png)
3538

36-
## Get the URL and prediction key
39+
### Get the URL and prediction key
3740

3841
Once your model has been published, you can retrieve the required information by selecting __Prediction URL__. This will open up a dialog with information for using the Prediction API, including the __Prediction URL__ and __Prediction-Key__.
3942

4043
![The performance tab is shown with a red rectangle surrounding the Prediction URL button.](./media/use-prediction-api/published-iteration-prediction-url.png)
4144

4245
![The performance tab is shown with a red rectangle surrounding the Prediction URL value for using an image file and the Prediction-Key value.](./media/use-prediction-api/prediction-api-info.png)
4346

47+
## Submit data to the service
48+
49+
This guide assumes that you already constructed a FaceClient object, named faceClient, with a Face subscription key and endpoint URL. For instructions on how to set up this feature, follow one of the quickstarts.
4450

45-
In this guide, you will use a local image, so copy the URL under **If you have an image file** to a temporary location. Copy the corresponding __Prediction-Key__ value as well.
51+
In this guide, you will use a local image, so download an image you'd like to use. Copy the corresponding __Prediction-Key__ value as well.
4652

53+
54+
The **[PredictImageAsync](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.customvision.prediction.customvisionpredictionclientextensions.predictimageasync?view=azure-dotnet-preview#Microsoft_Azure_CognitiveServices_Vision_CustomVision_Prediction_CustomVisionPredictionClientExtensions_PredictImageAsync_Microsoft_Azure_CognitiveServices_Vision_CustomVision_Prediction_ICustomVisionPredictionClient_System_Guid_System_IO_Stream_System_Nullable_System_Guid__System_String_System_Threading_CancellationToken_)** method.
4755
## Create the application
4856

57+
## Determine how to process the data
58+
59+
## Get results from the service
60+
61+
[If this is a separate API call, show it here. Then show a sample response value, and explain any parts of the response that aren't intuitive. Explain error cases if they're relevant enough]
62+
63+
64+
---
65+
66+
4967
1. In Visual Studio, create a new C# console application.
5068

5169
1. Use the following code as the body of the __Program.cs__ file.

0 commit comments

Comments
 (0)