You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To write a Java app that uses Custom Vision, you'll need the Custom Vision maven packages. These packages are included in the sample project you will download, but you can access them individually here.
30
30
31
-
You can install the Custom Vision SDK from maven central repository:
31
+
You can find the Custom Vision SDK in the maven central repository:
Clone or download the [Cognitive Services Java SDK Samples](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/tree/master) project. Navigate to the **Vision/CustomVision/** folder.
36
36
37
-
This Java project creates a new Custom Vision object detection project named __Sample Java OD Project__, which can be accessed through the [Custom Vision website](https://customvision.ai/). It then uploads images to train and test a classifier. In this project, the classifier is intended to determine whether a tree is a __Hemlock__ or a __Japanese Cherry__.
37
+
This Java project creates a new Custom Vision object detection project named __Sample Java OD Project__, which can be accessed through the [Custom Vision website](https://customvision.ai/). It then uploads images to train and test a classifier. In this project, the classifier is intended to determine whether an object is a **fork** or **scissors**.
38
38
39
39
[!INCLUDE [get-keys](includes/get-keys.md)]
40
40
41
-
The program is configured to store your key data as environment variables. Set these variables by navigating to the **Vision/CustomVision** folder in PowerShell. Then enter the commands:
41
+
The program is configured to reference your key data as environment variables. Navigate to the **Vision/CustomVision** folder and enter the following PowerShell commands to set the environment variables.
42
+
43
+
> [!NOTE]
44
+
> If you're using a non-Windows operating system, see [Configure environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows#configure-an-environment-variable-for-authentication) for instructions.
42
45
43
46
```powershell
44
47
$env:AZURE_CUSTOMVISION_TRAINING_API_KEY ="<your training api key>"
@@ -90,9 +93,9 @@ The prediction endpoint, represented by the `predictor` object here, is the refe
90
93
91
94
## Run the application
92
95
93
-
To compile and run the solution using maven, run the following command in the project directory in PowerShell:
96
+
To compile and run the solution using maven, navigate to the project directory (**Vision/CustomVision**) in a command prompt and execute the run command:
To write a Java app that uses Custom Vision, you'll need the Custom Vision maven packages. These packages are included in the sample project you'll download, but you can access them individually here.
30
30
31
-
You can install the Custom Vision SDK from maven central repository:
31
+
You can find the Custom Vision SDK in the maven central repository:
@@ -39,7 +39,10 @@ This Java project creates a new Custom Vision image classification project named
39
39
40
40
[!INCLUDE [get-keys](includes/get-keys.md)]
41
41
42
-
The program is configured to store your key data as environment variables. Set these variables by navigating to the **Vision/CustomVision** folder in PowerShell. Then enter the commands:
42
+
The program is configured to reference your key data as environment variables. Navigate to the **Vision/CustomVision** folder and enter the following PowerShell commands to set the environment variables.
43
+
44
+
> [!NOTE]
45
+
> If you're using a non-Windows operating system, see [Configure environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows#configure-an-environment-variable-for-authentication) for instructions.
43
46
44
47
```powershell
45
48
$env:AZURE_CUSTOMVISION_TRAINING_API_KEY ="<your training api key>"
@@ -84,9 +87,9 @@ The prediction endpoint, represented by the `predictor` object here, is the refe
84
87
85
88
## Run the application
86
89
87
-
To compile and run the solution using maven, run the following command in the project directory in PowerShell:
90
+
To compile and run the solution using maven, navigate to the project directory (**Vision/CustomVision**) in a command prompt and execute the run command:
0 commit comments