Skip to content

Commit 1e57e0b

Browse files
authored
Merge pull request #101196 from Juliako/patch-170
Update customize-person-model-with-api.md
2 parents ecce104 + 5f83137 commit 1e57e0b

File tree

1 file changed

+5
-127
lines changed

1 file changed

+5
-127
lines changed

articles/media-services/video-indexer/customize-person-model-with-api.md

Lines changed: 5 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: johndeu
99
ms.service: media-services
1010
ms.subservice: video-indexer
1111
ms.topic: article
12-
ms.date: 05/15/2019
12+
ms.date: 01/14/2020
1313
ms.author: anzaman
1414
---
1515

@@ -31,38 +31,7 @@ Each account has a limit of 50 Person models. If you do not need the multiple Pe
3131

3232
## Create a new Person model
3333

34-
Create a new Person model in the specified account.
35-
36-
### Request URL
37-
38-
This is a POST request.
39-
40-
```
41-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels?name={name}&accessToken={accessToken}
42-
```
43-
44-
Below is the request in Curl.
45-
46-
```curl
47-
curl -v -X POST "https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels?name={name}&accessToken={accessToken}"
48-
```
49-
50-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Create-Person-Model?).
51-
52-
### Request parameters
53-
54-
|**Name**|**Type**|**Required**|**Description**|
55-
|---|---|---|---|
56-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
57-
|accountId|string|Yes|Globally unique identifier for the account|
58-
|name|string|Yes|The name for the Person model|
59-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
60-
61-
### Request body
62-
63-
There is no further request body required for this call.
64-
65-
### Response
34+
To create a new Person model in the specified account, use the [create a person model](https://api-portal.videoindexer.ai/docs/services/operations/operations/Create-Person-Model?) API.
6635

6736
The response provides the name and generated model ID of the Person model that you just created following the format of the example below.
6837

@@ -77,73 +46,15 @@ You should then use the **id** value for the **personModelId** parameter when [u
7746

7847
## Delete a Person model
7948

80-
Delete a custom Person model from the specified account.
49+
To delete a custom Person model from the specified account, use the [delete a person model](https://api-portal.videoindexer.ai/docs/services/operations/operations/Delete-Person-Model?) API.
8150

8251
Once the Person model is deleted successfully, the index of your current videos that were using the deleted model will remain unchanged until you reindex them. Upon reindexing, the faces that were named in the deleted model will not be recognized by Video Indexer in your current videos that were indexed using that model; however, those faces will still be detected. Your current videos that were indexed using the deleted model will now use your account's default Person model. If faces from the deleted model are also named in your account's default model, those faces will continue to be recognized in the videos.
8352

84-
### Request URL
85-
86-
```
87-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels/{id}?accessToken={accessToken}
88-
```
89-
90-
Below is the request in Curl.
91-
```curl
92-
curl -v -X DELETE "https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels/{id}?accessToken={accessToken}"
93-
```
94-
95-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Delete-Person-Model?).
96-
97-
### Request parameters
98-
99-
|**Name**|**Type**|**Required**|**Description**|
100-
|---|---|---|---|
101-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
102-
|accountId|string|Yes|Globally unique identifier for the account|
103-
|id|string|Yes|The Person model id (generated when the Person model is created)|
104-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
105-
106-
### Request body
107-
108-
There is no further request body required for this call.
109-
110-
### Response
111-
11253
There is no returned content when the Person model is deleted successfully.
11354

11455
## Get all Person models
11556

116-
Get all Person models in the specified account.
117-
118-
### Request Call
119-
120-
This is a GET request.
121-
122-
```
123-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels?accessToken={accessToken}
124-
```
125-
126-
Below is the request in Curl.
127-
128-
```curl
129-
curl -v -X GET "https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/PersonModels?accessToken={accessToken}"
130-
```
131-
132-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Person-Models?).
133-
134-
### Request parameters
135-
136-
|**Name**|**Type**|**Required**|**Description**|
137-
|---|---|---|---|
138-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
139-
|accountId|string|Yes|Globally unique identifier for the account|
140-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
141-
142-
### Request body
143-
144-
There is no further request body required for this call.
145-
146-
### Response
57+
To get all Person models in the specified account, use the [get a person model](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Person-Models?) API.
14758

14859
The response provides a list of all of the Person models in your account (including the default Person model in the specified account) and each of their names and ids following the format of the example below.
14960

@@ -170,43 +81,10 @@ Once this happens, it recognizes the occurrences of the same face in your other
17081

17182
You can update a face that Video Indexer recognized as a celebrity with a new name. The new name that you give will take precedence over the built-in celebrity recognition.
17283

173-
### Request Call
174-
175-
This is a POST request.
176-
177-
```
178-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Videos/{videoId}/Index/Faces/{faceId}?accessToken={accessToken}&newName={newName}
179-
```
180-
181-
Below is the request in Curl.
182-
183-
```curl
184-
curl -v -X PUT "https://api.videoindexer.ai/{location}/Accounts/{accountId}/Videos/{videoId}/Index/Faces/{faceId}?accessToken={accessToken}&newName={newName}"
185-
```
186-
187-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Video-Face?).
188-
189-
### Request parameters
190-
191-
|**Name**|**Type**|**Required**|**Description**|
192-
|---|---|---|---|
193-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
194-
|accountId|string|Yes|Globally unique identifier for the account|
195-
|videoId|string|Yes|Id for the video in which the face that you want to update appears. This is created when the video is uploaded and indexed.|
196-
|faceId|integer|Yes|Id for the face that will be updated. You can get the faceId from the video index|
197-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
198-
|name|string|Yes|New name to update the face with.|
84+
To update the face, use the [update a video face](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Video-Face?) API.
19985

20086
Names are unique for Person models, so if you give two different faces in the same Person model the same **name** parameter value, Video Indexer views the faces as the same person and converges them once you reindex your video.
20187

202-
### Request body
203-
204-
There is no further request body required for this call.
205-
206-
### Response
207-
208-
There is no returned content when the face has been updated successfully.
209-
21088
## Next steps
21189

21290
[Customize Person model using the Video Indexer website](customize-person-model-with-website.md)

0 commit comments

Comments
 (0)