azure_cognitiveservices_face 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,9 +31,10 @@ module Azure::CognitiveServices::Face::V1_0
31
31
  # Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3)
32
32
  # to import the faces and [LargeFaceList -
33
33
  # Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1)
34
- # to make it ready for [Face -
35
- # FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
36
- # Faces are stored on server until [LargeFaceList -
34
+ # to make it ready for [Face - Find
35
+ # Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
36
+ # No image will be stored. Only the extracted face features are stored on
37
+ # server until [LargeFaceList -
37
38
  # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
38
39
  # is called.
39
40
  # <br /> Find Similar is used for scenario like finding celebrity-like faces,
@@ -44,18 +45,24 @@ module Azure::CognitiveServices::Face::V1_0
44
45
  # [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d)
45
46
  # and [Face -
46
47
  # Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
47
- # <br />
48
- # * Free-tier subscription quota: 64 large face lists.
49
- # * S0-tier subscription quota: 1,000,000 large face lists.
50
- # <br />
51
- # 'recognitionModel' should be specified to associate with this large face
48
+ # <br/>'recognitionModel' should be specified to associate with this large face
52
49
  # list. The default value for 'recognitionModel' is 'recognition_01', if the
53
50
  # latest model needed, please explicitly specify the model you need in this
54
51
  # parameter. New faces that are added to an existing large face list will use
55
52
  # the recognition model that's already associated with the collection. Existing
56
53
  # face features in a large face list can't be updated to features extracted by
57
54
  # another version of recognition model.
58
- #
55
+ # * 'recognition_01': The default recognition model for [LargeFaceList-
56
+ # Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc).
57
+ # All those large face lists created before 2019 March are bonded with this
58
+ # recognition model.
59
+ # * 'recognition_02': Recognition model released in 2019 March.
60
+ # 'recognition_02' is recommended since its overall accuracy is improved
61
+ # compared with 'recognition_01'.
62
+ #
63
+ # Large face list quota:
64
+ # * Free-tier subscription quota: 64 large face lists.
65
+ # * S0-tier subscription quota: 1,000,000 large face lists.
59
66
  #
60
67
  # @param large_face_list_id [String] Id referencing a particular large face
61
68
  # list.
@@ -82,9 +89,10 @@ module Azure::CognitiveServices::Face::V1_0
82
89
  # Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3)
83
90
  # to import the faces and [LargeFaceList -
84
91
  # Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1)
85
- # to make it ready for [Face -
86
- # FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
87
- # Faces are stored on server until [LargeFaceList -
92
+ # to make it ready for [Face - Find
93
+ # Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
94
+ # No image will be stored. Only the extracted face features are stored on
95
+ # server until [LargeFaceList -
88
96
  # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
89
97
  # is called.
90
98
  # <br /> Find Similar is used for scenario like finding celebrity-like faces,
@@ -95,18 +103,24 @@ module Azure::CognitiveServices::Face::V1_0
95
103
  # [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d)
96
104
  # and [Face -
97
105
  # Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
98
- # <br />
99
- # * Free-tier subscription quota: 64 large face lists.
100
- # * S0-tier subscription quota: 1,000,000 large face lists.
101
- # <br />
102
- # 'recognitionModel' should be specified to associate with this large face
106
+ # <br/>'recognitionModel' should be specified to associate with this large face
103
107
  # list. The default value for 'recognitionModel' is 'recognition_01', if the
104
108
  # latest model needed, please explicitly specify the model you need in this
105
109
  # parameter. New faces that are added to an existing large face list will use
106
110
  # the recognition model that's already associated with the collection. Existing
107
111
  # face features in a large face list can't be updated to features extracted by
108
112
  # another version of recognition model.
109
- #
113
+ # * 'recognition_01': The default recognition model for [LargeFaceList-
114
+ # Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc).
115
+ # All those large face lists created before 2019 March are bonded with this
116
+ # recognition model.
117
+ # * 'recognition_02': Recognition model released in 2019 March.
118
+ # 'recognition_02' is recommended since its overall accuracy is improved
119
+ # compared with 'recognition_01'.
120
+ #
121
+ # Large face list quota:
122
+ # * Free-tier subscription quota: 64 large face lists.
123
+ # * S0-tier subscription quota: 1,000,000 large face lists.
110
124
  #
111
125
  # @param large_face_list_id [String] Id referencing a particular large face
112
126
  # list.
@@ -133,9 +147,10 @@ module Azure::CognitiveServices::Face::V1_0
133
147
  # Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3)
134
148
  # to import the faces and [LargeFaceList -
135
149
  # Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1)
136
- # to make it ready for [Face -
137
- # FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
138
- # Faces are stored on server until [LargeFaceList -
150
+ # to make it ready for [Face - Find
151
+ # Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
152
+ # No image will be stored. Only the extracted face features are stored on
153
+ # server until [LargeFaceList -
139
154
  # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
140
155
  # is called.
141
156
  # <br /> Find Similar is used for scenario like finding celebrity-like faces,
@@ -146,18 +161,24 @@ module Azure::CognitiveServices::Face::V1_0
146
161
  # [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d)
147
162
  # and [Face -
148
163
  # Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
149
- # <br />
150
- # * Free-tier subscription quota: 64 large face lists.
151
- # * S0-tier subscription quota: 1,000,000 large face lists.
152
- # <br />
153
- # 'recognitionModel' should be specified to associate with this large face
164
+ # <br/>'recognitionModel' should be specified to associate with this large face
154
165
  # list. The default value for 'recognitionModel' is 'recognition_01', if the
155
166
  # latest model needed, please explicitly specify the model you need in this
156
167
  # parameter. New faces that are added to an existing large face list will use
157
168
  # the recognition model that's already associated with the collection. Existing
158
169
  # face features in a large face list can't be updated to features extracted by
159
170
  # another version of recognition model.
160
- #
171
+ # * 'recognition_01': The default recognition model for [LargeFaceList-
172
+ # Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc).
173
+ # All those large face lists created before 2019 March are bonded with this
174
+ # recognition model.
175
+ # * 'recognition_02': Recognition model released in 2019 March.
176
+ # 'recognition_02' is recommended since its overall accuracy is improved
177
+ # compared with 'recognition_01'.
178
+ #
179
+ # Large face list quota:
180
+ # * Free-tier subscription quota: 64 large face lists.
181
+ # * S0-tier subscription quota: 1,000,000 large face lists.
161
182
  #
162
183
  # @param large_face_list_id [String] Id referencing a particular large face
163
184
  # list.
@@ -221,6 +242,8 @@ module Azure::CognitiveServices::Face::V1_0
221
242
  end
222
243
 
223
244
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
245
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
246
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
224
247
 
225
248
  result
226
249
  end
@@ -313,6 +336,8 @@ module Azure::CognitiveServices::Face::V1_0
313
336
  end
314
337
 
315
338
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
339
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
340
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
316
341
  # Deserialize Response
317
342
  if status_code == 200
318
343
  begin
@@ -424,6 +449,8 @@ module Azure::CognitiveServices::Face::V1_0
424
449
  end
425
450
 
426
451
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
452
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
453
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
427
454
 
428
455
  result
429
456
  end
@@ -432,8 +459,7 @@ module Azure::CognitiveServices::Face::V1_0
432
459
  end
433
460
 
434
461
  #
435
- # Delete an existing large face list according to faceListId. Persisted face
436
- # images in the large face list will also be deleted.
462
+ # Delete a specified large face list.
437
463
  #
438
464
  # @param large_face_list_id [String] Id referencing a particular large face
439
465
  # list.
@@ -447,8 +473,7 @@ module Azure::CognitiveServices::Face::V1_0
447
473
  end
448
474
 
449
475
  #
450
- # Delete an existing large face list according to faceListId. Persisted face
451
- # images in the large face list will also be deleted.
476
+ # Delete a specified large face list.
452
477
  #
453
478
  # @param large_face_list_id [String] Id referencing a particular large face
454
479
  # list.
@@ -462,8 +487,7 @@ module Azure::CognitiveServices::Face::V1_0
462
487
  end
463
488
 
464
489
  #
465
- # Delete an existing large face list according to faceListId. Persisted face
466
- # images in the large face list will also be deleted.
490
+ # Delete a specified large face list.
467
491
  #
468
492
  # @param large_face_list_id [String] Id referencing a particular large face
469
493
  # list.
@@ -508,6 +532,8 @@ module Azure::CognitiveServices::Face::V1_0
508
532
  end
509
533
 
510
534
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
535
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
536
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
511
537
 
512
538
  result
513
539
  end
@@ -590,6 +616,8 @@ module Azure::CognitiveServices::Face::V1_0
590
616
  end
591
617
 
592
618
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
619
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
620
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
593
621
  # Deserialize Response
594
622
  if status_code == 200
595
623
  begin
@@ -730,6 +758,8 @@ module Azure::CognitiveServices::Face::V1_0
730
758
  end
731
759
 
732
760
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
761
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
762
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
733
763
  # Deserialize Response
734
764
  if status_code == 200
735
765
  begin
@@ -840,6 +870,8 @@ module Azure::CognitiveServices::Face::V1_0
840
870
  end
841
871
 
842
872
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
873
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
874
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
843
875
 
844
876
  result
845
877
  end
@@ -848,9 +880,10 @@ module Azure::CognitiveServices::Face::V1_0
848
880
  end
849
881
 
850
882
  #
851
- # Delete an existing face from a large face list (given by a persistedFaceId
852
- # and a largeFaceListId). Persisted image related to the face will also be
853
- # deleted.
883
+ # Delete a face from a large face list by specified largeFaceListId and
884
+ # persistedFaceId.
885
+ # <br /> Adding/deleting faces to/from a same large face list are processed
886
+ # sequentially and to/from different large face lists are in parallel.
854
887
  #
855
888
  # @param large_face_list_id [String] Id referencing a particular large face
856
889
  # list.
@@ -866,9 +899,10 @@ module Azure::CognitiveServices::Face::V1_0
866
899
  end
867
900
 
868
901
  #
869
- # Delete an existing face from a large face list (given by a persistedFaceId
870
- # and a largeFaceListId). Persisted image related to the face will also be
871
- # deleted.
902
+ # Delete a face from a large face list by specified largeFaceListId and
903
+ # persistedFaceId.
904
+ # <br /> Adding/deleting faces to/from a same large face list are processed
905
+ # sequentially and to/from different large face lists are in parallel.
872
906
  #
873
907
  # @param large_face_list_id [String] Id referencing a particular large face
874
908
  # list.
@@ -884,9 +918,10 @@ module Azure::CognitiveServices::Face::V1_0
884
918
  end
885
919
 
886
920
  #
887
- # Delete an existing face from a large face list (given by a persistedFaceId
888
- # and a largeFaceListId). Persisted image related to the face will also be
889
- # deleted.
921
+ # Delete a face from a large face list by specified largeFaceListId and
922
+ # persistedFaceId.
923
+ # <br /> Adding/deleting faces to/from a same large face list are processed
924
+ # sequentially and to/from different large face lists are in parallel.
890
925
  #
891
926
  # @param large_face_list_id [String] Id referencing a particular large face
892
927
  # list.
@@ -934,6 +969,8 @@ module Azure::CognitiveServices::Face::V1_0
934
969
  end
935
970
 
936
971
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
972
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
973
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
937
974
 
938
975
  result
939
976
  end
@@ -1026,6 +1063,8 @@ module Azure::CognitiveServices::Face::V1_0
1026
1063
  end
1027
1064
 
1028
1065
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1066
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1067
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1029
1068
  # Deserialize Response
1030
1069
  if status_code == 200
1031
1070
  begin
@@ -1142,6 +1181,8 @@ module Azure::CognitiveServices::Face::V1_0
1142
1181
  end
1143
1182
 
1144
1183
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1184
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1185
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1145
1186
 
1146
1187
  result
1147
1188
  end
@@ -1150,9 +1191,51 @@ module Azure::CognitiveServices::Face::V1_0
1150
1191
  end
1151
1192
 
1152
1193
  #
1153
- # Add a face to a large face list. The input face is specified as an image with
1154
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1155
- # face, and persistedFaceId will not expire.
1194
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1195
+ # <br /> To deal with an image contains multiple faces, input face can be
1196
+ # specified as an image with a targetFace rectangle. It returns a
1197
+ # persistedFaceId representing the added face. No image will be stored. Only
1198
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1199
+ # -
1200
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1201
+ # or [LargeFaceList -
1202
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1203
+ # is called.
1204
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1205
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1206
+ # * Higher face image quality means better recognition precision. Please
1207
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1208
+ # (100 pixels between eyes) or bigger.
1209
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1210
+ # image file size is from 1KB to 6MB.
1211
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1212
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1213
+ # returned from [Face -
1214
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1215
+ # there’s no guarantee to detect and add the face successfully.
1216
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1217
+ # large occlusions will cause failures.
1218
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1219
+ # and to/from different face lists are in parallel.
1220
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1221
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1222
+ # need a proportionally larger minimum face size.
1223
+ # * Different 'detectionModel' values can be provided. To use and compare
1224
+ # different detection models, please refer to [How to specify a detection
1225
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1226
+ # | Model | Recommended use-case(s) |
1227
+ # | ---------- | -------- |
1228
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1229
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1230
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1231
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1232
+ # faces in such cases may not be detected. |
1233
+ # | 'detection_02': | Detection model released in 2019 May with improved
1234
+ # accuracy especially on small, side and blurry faces. |
1235
+ #
1236
+ # Quota:
1237
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1238
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1156
1239
  #
1157
1240
  # @param large_face_list_id [String] Id referencing a particular large face
1158
1241
  # list.
@@ -1165,20 +1248,68 @@ module Azure::CognitiveServices::Face::V1_0
1165
1248
  # is more than one face in the image, targetFace is required to specify which
1166
1249
  # face to add. No targetFace means there is only one face detected in the
1167
1250
  # entire image.
1251
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1252
+ # model is used to detect faces in the submitted image. A detection model name
1253
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1254
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1255
+ # another model is needed, please explicitly specify it. Possible values
1256
+ # include: 'detection_01', 'detection_02'
1168
1257
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1169
1258
  # will be added to the HTTP request.
1170
1259
  #
1171
1260
  # @return [PersistedFace] operation results.
1172
1261
  #
1173
- def add_face_from_url(large_face_list_id, url, user_data:nil, target_face:nil, custom_headers:nil)
1174
- response = add_face_from_url_async(large_face_list_id, url, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
1262
+ def add_face_from_url(large_face_list_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1263
+ response = add_face_from_url_async(large_face_list_id, url, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
1175
1264
  response.body unless response.nil?
1176
1265
  end
1177
1266
 
1178
1267
  #
1179
- # Add a face to a large face list. The input face is specified as an image with
1180
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1181
- # face, and persistedFaceId will not expire.
1268
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1269
+ # <br /> To deal with an image contains multiple faces, input face can be
1270
+ # specified as an image with a targetFace rectangle. It returns a
1271
+ # persistedFaceId representing the added face. No image will be stored. Only
1272
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1273
+ # -
1274
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1275
+ # or [LargeFaceList -
1276
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1277
+ # is called.
1278
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1279
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1280
+ # * Higher face image quality means better recognition precision. Please
1281
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1282
+ # (100 pixels between eyes) or bigger.
1283
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1284
+ # image file size is from 1KB to 6MB.
1285
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1286
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1287
+ # returned from [Face -
1288
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1289
+ # there’s no guarantee to detect and add the face successfully.
1290
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1291
+ # large occlusions will cause failures.
1292
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1293
+ # and to/from different face lists are in parallel.
1294
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1295
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1296
+ # need a proportionally larger minimum face size.
1297
+ # * Different 'detectionModel' values can be provided. To use and compare
1298
+ # different detection models, please refer to [How to specify a detection
1299
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1300
+ # | Model | Recommended use-case(s) |
1301
+ # | ---------- | -------- |
1302
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1303
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1304
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1305
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1306
+ # faces in such cases may not be detected. |
1307
+ # | 'detection_02': | Detection model released in 2019 May with improved
1308
+ # accuracy especially on small, side and blurry faces. |
1309
+ #
1310
+ # Quota:
1311
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1312
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1182
1313
  #
1183
1314
  # @param large_face_list_id [String] Id referencing a particular large face
1184
1315
  # list.
@@ -1191,19 +1322,67 @@ module Azure::CognitiveServices::Face::V1_0
1191
1322
  # is more than one face in the image, targetFace is required to specify which
1192
1323
  # face to add. No targetFace means there is only one face detected in the
1193
1324
  # entire image.
1325
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1326
+ # model is used to detect faces in the submitted image. A detection model name
1327
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1328
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1329
+ # another model is needed, please explicitly specify it. Possible values
1330
+ # include: 'detection_01', 'detection_02'
1194
1331
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1195
1332
  # will be added to the HTTP request.
1196
1333
  #
1197
1334
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1198
1335
  #
1199
- def add_face_from_url_with_http_info(large_face_list_id, url, user_data:nil, target_face:nil, custom_headers:nil)
1200
- add_face_from_url_async(large_face_list_id, url, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
1336
+ def add_face_from_url_with_http_info(large_face_list_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1337
+ add_face_from_url_async(large_face_list_id, url, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
1201
1338
  end
1202
1339
 
1203
1340
  #
1204
- # Add a face to a large face list. The input face is specified as an image with
1205
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1206
- # face, and persistedFaceId will not expire.
1341
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1342
+ # <br /> To deal with an image contains multiple faces, input face can be
1343
+ # specified as an image with a targetFace rectangle. It returns a
1344
+ # persistedFaceId representing the added face. No image will be stored. Only
1345
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1346
+ # -
1347
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1348
+ # or [LargeFaceList -
1349
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1350
+ # is called.
1351
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1352
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1353
+ # * Higher face image quality means better recognition precision. Please
1354
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1355
+ # (100 pixels between eyes) or bigger.
1356
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1357
+ # image file size is from 1KB to 6MB.
1358
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1359
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1360
+ # returned from [Face -
1361
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1362
+ # there’s no guarantee to detect and add the face successfully.
1363
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1364
+ # large occlusions will cause failures.
1365
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1366
+ # and to/from different face lists are in parallel.
1367
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1368
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1369
+ # need a proportionally larger minimum face size.
1370
+ # * Different 'detectionModel' values can be provided. To use and compare
1371
+ # different detection models, please refer to [How to specify a detection
1372
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1373
+ # | Model | Recommended use-case(s) |
1374
+ # | ---------- | -------- |
1375
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1376
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1377
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1378
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1379
+ # faces in such cases may not be detected. |
1380
+ # | 'detection_02': | Detection model released in 2019 May with improved
1381
+ # accuracy especially on small, side and blurry faces. |
1382
+ #
1383
+ # Quota:
1384
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1385
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1207
1386
  #
1208
1387
  # @param large_face_list_id [String] Id referencing a particular large face
1209
1388
  # list.
@@ -1216,12 +1395,18 @@ module Azure::CognitiveServices::Face::V1_0
1216
1395
  # is more than one face in the image, targetFace is required to specify which
1217
1396
  # face to add. No targetFace means there is only one face detected in the
1218
1397
  # entire image.
1398
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1399
+ # model is used to detect faces in the submitted image. A detection model name
1400
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1401
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1402
+ # another model is needed, please explicitly specify it. Possible values
1403
+ # include: 'detection_01', 'detection_02'
1219
1404
  # @param [Hash{String => String}] A hash of custom headers that will be added
1220
1405
  # to the HTTP request.
1221
1406
  #
1222
1407
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1223
1408
  #
1224
- def add_face_from_url_async(large_face_list_id, url, user_data:nil, target_face:nil, custom_headers:nil)
1409
+ def add_face_from_url_async(large_face_list_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1225
1410
  fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1226
1411
  fail ArgumentError, 'large_face_list_id is nil' if large_face_list_id.nil?
1227
1412
  fail ArgumentError, "'large_face_list_id' should satisfy the constraint - 'MaxLength': '64'" if !large_face_list_id.nil? && large_face_list_id.length > 64
@@ -1254,7 +1439,7 @@ module Azure::CognitiveServices::Face::V1_0
1254
1439
  options = {
1255
1440
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1256
1441
  path_params: {'largeFaceListId' => large_face_list_id},
1257
- query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(',')},
1442
+ query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(','),'detectionModel' => detection_model},
1258
1443
  body: request_content,
1259
1444
  headers: request_headers.merge(custom_headers || {}),
1260
1445
  base_url: request_url
@@ -1271,6 +1456,8 @@ module Azure::CognitiveServices::Face::V1_0
1271
1456
  end
1272
1457
 
1273
1458
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1459
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1460
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1274
1461
  # Deserialize Response
1275
1462
  if status_code == 200
1276
1463
  begin
@@ -1381,6 +1568,8 @@ module Azure::CognitiveServices::Face::V1_0
1381
1568
  end
1382
1569
 
1383
1570
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1571
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1572
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1384
1573
  # Deserialize Response
1385
1574
  if status_code == 200
1386
1575
  begin
@@ -1415,9 +1604,51 @@ module Azure::CognitiveServices::Face::V1_0
1415
1604
  end
1416
1605
 
1417
1606
  #
1418
- # Add a face to a large face list. The input face is specified as an image with
1419
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1420
- # face, and persistedFaceId will not expire.
1607
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1608
+ # <br /> To deal with an image contains multiple faces, input face can be
1609
+ # specified as an image with a targetFace rectangle. It returns a
1610
+ # persistedFaceId representing the added face. No image will be stored. Only
1611
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1612
+ # -
1613
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1614
+ # or [LargeFaceList -
1615
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1616
+ # is called.
1617
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1618
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1619
+ # * Higher face image quality means better recognition precision. Please
1620
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1621
+ # (100 pixels between eyes) or bigger.
1622
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1623
+ # image file size is from 1KB to 6MB.
1624
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1625
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1626
+ # returned from [Face -
1627
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1628
+ # there’s no guarantee to detect and add the face successfully.
1629
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1630
+ # large occlusions will cause failures.
1631
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1632
+ # and to/from different face lists are in parallel.
1633
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1634
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1635
+ # need a proportionally larger minimum face size.
1636
+ # * Different 'detectionModel' values can be provided. To use and compare
1637
+ # different detection models, please refer to [How to specify a detection
1638
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1639
+ # | Model | Recommended use-case(s) |
1640
+ # | ---------- | -------- |
1641
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1642
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1643
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1644
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1645
+ # faces in such cases may not be detected. |
1646
+ # | 'detection_02': | Detection model released in 2019 May with improved
1647
+ # accuracy especially on small, side and blurry faces. |
1648
+ #
1649
+ # Quota:
1650
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1651
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1421
1652
  #
1422
1653
  # @param large_face_list_id [String] Id referencing a particular large face
1423
1654
  # list.
@@ -1430,20 +1661,68 @@ module Azure::CognitiveServices::Face::V1_0
1430
1661
  # is more than one face in the image, targetFace is required to specify which
1431
1662
  # face to add. No targetFace means there is only one face detected in the
1432
1663
  # entire image.
1664
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1665
+ # model is used to detect faces in the submitted image. A detection model name
1666
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1667
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1668
+ # another model is needed, please explicitly specify it. Possible values
1669
+ # include: 'detection_01', 'detection_02'
1433
1670
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1434
1671
  # will be added to the HTTP request.
1435
1672
  #
1436
1673
  # @return [PersistedFace] operation results.
1437
1674
  #
1438
- def add_face_from_stream(large_face_list_id, image, user_data:nil, target_face:nil, custom_headers:nil)
1439
- response = add_face_from_stream_async(large_face_list_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
1675
+ def add_face_from_stream(large_face_list_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1676
+ response = add_face_from_stream_async(large_face_list_id, image, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
1440
1677
  response.body unless response.nil?
1441
1678
  end
1442
1679
 
1443
1680
  #
1444
- # Add a face to a large face list. The input face is specified as an image with
1445
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1446
- # face, and persistedFaceId will not expire.
1681
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1682
+ # <br /> To deal with an image contains multiple faces, input face can be
1683
+ # specified as an image with a targetFace rectangle. It returns a
1684
+ # persistedFaceId representing the added face. No image will be stored. Only
1685
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1686
+ # -
1687
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1688
+ # or [LargeFaceList -
1689
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1690
+ # is called.
1691
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1692
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1693
+ # * Higher face image quality means better recognition precision. Please
1694
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1695
+ # (100 pixels between eyes) or bigger.
1696
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1697
+ # image file size is from 1KB to 6MB.
1698
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1699
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1700
+ # returned from [Face -
1701
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1702
+ # there’s no guarantee to detect and add the face successfully.
1703
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1704
+ # large occlusions will cause failures.
1705
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1706
+ # and to/from different face lists are in parallel.
1707
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1708
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1709
+ # need a proportionally larger minimum face size.
1710
+ # * Different 'detectionModel' values can be provided. To use and compare
1711
+ # different detection models, please refer to [How to specify a detection
1712
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1713
+ # | Model | Recommended use-case(s) |
1714
+ # | ---------- | -------- |
1715
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1716
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1717
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1718
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1719
+ # faces in such cases may not be detected. |
1720
+ # | 'detection_02': | Detection model released in 2019 May with improved
1721
+ # accuracy especially on small, side and blurry faces. |
1722
+ #
1723
+ # Quota:
1724
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1725
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1447
1726
  #
1448
1727
  # @param large_face_list_id [String] Id referencing a particular large face
1449
1728
  # list.
@@ -1456,19 +1735,67 @@ module Azure::CognitiveServices::Face::V1_0
1456
1735
  # is more than one face in the image, targetFace is required to specify which
1457
1736
  # face to add. No targetFace means there is only one face detected in the
1458
1737
  # entire image.
1738
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1739
+ # model is used to detect faces in the submitted image. A detection model name
1740
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1741
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1742
+ # another model is needed, please explicitly specify it. Possible values
1743
+ # include: 'detection_01', 'detection_02'
1459
1744
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1460
1745
  # will be added to the HTTP request.
1461
1746
  #
1462
1747
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1463
1748
  #
1464
- def add_face_from_stream_with_http_info(large_face_list_id, image, user_data:nil, target_face:nil, custom_headers:nil)
1465
- add_face_from_stream_async(large_face_list_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
1749
+ def add_face_from_stream_with_http_info(large_face_list_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1750
+ add_face_from_stream_async(large_face_list_id, image, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
1466
1751
  end
1467
1752
 
1468
1753
  #
1469
- # Add a face to a large face list. The input face is specified as an image with
1470
- # a targetFace rectangle. It returns a persistedFaceId representing the added
1471
- # face, and persistedFaceId will not expire.
1754
+ # Add a face to a specified large face list, up to 1,000,000 faces.
1755
+ # <br /> To deal with an image contains multiple faces, input face can be
1756
+ # specified as an image with a targetFace rectangle. It returns a
1757
+ # persistedFaceId representing the added face. No image will be stored. Only
1758
+ # the extracted face feature will be stored on server until [LargeFaceList Face
1759
+ # -
1760
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4)
1761
+ # or [LargeFaceList -
1762
+ # Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd)
1763
+ # is called.
1764
+ # <br /> Note persistedFaceId is different from faceId generated by [Face -
1765
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
1766
+ # * Higher face image quality means better recognition precision. Please
1767
+ # consider high-quality faces: frontal, clear, and face size is 200x200 pixels
1768
+ # (100 pixels between eyes) or bigger.
1769
+ # * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
1770
+ # image file size is from 1KB to 6MB.
1771
+ # * "targetFace" rectangle should contain one face. Zero or multiple faces will
1772
+ # be regarded as an error. If the provided "targetFace" rectangle is not
1773
+ # returned from [Face -
1774
+ # Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
1775
+ # there’s no guarantee to detect and add the face successfully.
1776
+ # * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
1777
+ # large occlusions will cause failures.
1778
+ # * Adding/deleting faces to/from a same face list are processed sequentially
1779
+ # and to/from different face lists are in parallel.
1780
+ # * The minimum detectable face size is 36x36 pixels in an image no larger than
1781
+ # 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
1782
+ # need a proportionally larger minimum face size.
1783
+ # * Different 'detectionModel' values can be provided. To use and compare
1784
+ # different detection models, please refer to [How to specify a detection
1785
+ # model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
1786
+ # | Model | Recommended use-case(s) |
1787
+ # | ---------- | -------- |
1788
+ # | 'detection_01': | The default detection model for [LargeFaceList - Add
1789
+ # Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3).
1790
+ # Recommend for near frontal face detection. For scenarios with exceptionally
1791
+ # large angle (head-pose) faces, occluded faces or wrong image orientation, the
1792
+ # faces in such cases may not be detected. |
1793
+ # | 'detection_02': | Detection model released in 2019 May with improved
1794
+ # accuracy especially on small, side and blurry faces. |
1795
+ #
1796
+ # Quota:
1797
+ # * Free-tier subscription quota: 1,000 faces per large face list.
1798
+ # * S0-tier subscription quota: 1,000,000 faces per large face list.
1472
1799
  #
1473
1800
  # @param large_face_list_id [String] Id referencing a particular large face
1474
1801
  # list.
@@ -1481,12 +1808,18 @@ module Azure::CognitiveServices::Face::V1_0
1481
1808
  # is more than one face in the image, targetFace is required to specify which
1482
1809
  # face to add. No targetFace means there is only one face detected in the
1483
1810
  # entire image.
1811
+ # @param detection_model [DetectionModel] Name of detection model. Detection
1812
+ # model is used to detect faces in the submitted image. A detection model name
1813
+ # can be provided when performing Face - Detect or (Large)FaceList - Add Face
1814
+ # or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
1815
+ # another model is needed, please explicitly specify it. Possible values
1816
+ # include: 'detection_01', 'detection_02'
1484
1817
  # @param [Hash{String => String}] A hash of custom headers that will be added
1485
1818
  # to the HTTP request.
1486
1819
  #
1487
1820
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1488
1821
  #
1489
- def add_face_from_stream_async(large_face_list_id, image, user_data:nil, target_face:nil, custom_headers:nil)
1822
+ def add_face_from_stream_async(large_face_list_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
1490
1823
  fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1491
1824
  fail ArgumentError, 'large_face_list_id is nil' if large_face_list_id.nil?
1492
1825
  fail ArgumentError, "'large_face_list_id' should satisfy the constraint - 'MaxLength': '64'" if !large_face_list_id.nil? && large_face_list_id.length > 64
@@ -1521,7 +1854,7 @@ module Azure::CognitiveServices::Face::V1_0
1521
1854
  options = {
1522
1855
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1523
1856
  path_params: {'largeFaceListId' => large_face_list_id},
1524
- query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(',')},
1857
+ query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(','),'detectionModel' => detection_model},
1525
1858
  body: request_content,
1526
1859
  headers: request_headers.merge(custom_headers || {}),
1527
1860
  base_url: request_url
@@ -1538,6 +1871,8 @@ module Azure::CognitiveServices::Face::V1_0
1538
1871
  end
1539
1872
 
1540
1873
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1874
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1875
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1541
1876
  # Deserialize Response
1542
1877
  if status_code == 200
1543
1878
  begin