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
Copy file name to clipboardExpand all lines: articles/cognitive-services/Custom-Vision-Service/rest-api-tutorial.md
+78-7Lines changed: 78 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ To get the keys for your account, visit the [Custom Vision web page](https://cus
57
57
58
58
## Create a new project
59
59
60
-
The following examples create a new project named `myproject`in your Custom Vision service instance. This service defaults to the `General` domain. For more information on this request, see [CreateProject](https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a8290).
60
+
The following examples create a new project named `myproject`in your Custom Vision service instance. This service defaults to the `General` domain:
61
61
62
62
```bash
63
63
curl -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Training/projects?name=myproject" -H "Training-Key: $TRAININGKEY" --data-ascii ""
@@ -67,7 +67,7 @@ curl -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2
@@ -93,6 +93,8 @@ The response to the request is similar to the following JSON document:
93
93
> [!TIP]
94
94
> The `id` entry in the response is the ID of the new project. This is used in other examples later in this document.
95
95
96
+
For more information on this request, see [CreateProject](https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a8290).
97
+
96
98
### Specific domains
97
99
98
100
To create a project for a specific domain, you can provide the __domain Id__ as an optional paramter. The following examples show how to retrieve a list of available domains:
@@ -105,7 +107,7 @@ curl -X GET "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.
@@ -138,6 +140,8 @@ The response to the request is similar to the following JSON document:
138
140
]
139
141
```
140
142
143
+
For more information on this request, see [GetDomains](https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a827d).
144
+
141
145
The following example demonstrates creating a new project that uses the __Landmarks__ domain:
142
146
143
147
```bash
@@ -148,15 +152,15 @@ curl -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2
When tagging images, you use a tag Id. To get a tag Id, you must create a tag or get the information for an existing tag.
158
162
159
-
The following example demonstrates how to create a new tag:
163
+
The following example demonstrates how to create a new tag named `cat`. Replace `{projectId}` with the ID of your project. Use the `name=` parameter to specify the name of the tag:
160
164
161
165
```bash
162
166
curl -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Training/projects/{projectId}/tags?name=cat" -H "Training-Key: $TRAININGKEY" --data-ascii ""
@@ -166,10 +170,77 @@ curl -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2
Save the `id` value, as it is used when tagging images.
184
+
185
+
For more information on this requst, see [CreateTag](https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a829d).
186
+
173
187
## Add images
174
188
175
-
Images can be added from files or from URLs. The following examples demonstrate
189
+
The following examples demonstrate adding a file from URL. Replace `{projectId}` with the ID of your project. Replace `{tagId}` with the ID of the tag for the image:
For more information on this request, see [CreateImagesFromUrls](https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a8287).
0 commit comments