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.
- checksums.yaml +4 -4
- data/lib/1.0/generated/azure_cognitiveservices_face.rb +1 -0
- data/lib/1.0/generated/azure_cognitiveservices_face/face.rb +368 -75
- data/lib/1.0/generated/azure_cognitiveservices_face/face_client.rb +1 -1
- data/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb +361 -66
- data/lib/1.0/generated/azure_cognitiveservices_face/large_face_list_operations.rb +407 -72
- data/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_operations.rb +71 -39
- data/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb +368 -42
- data/lib/1.0/generated/azure_cognitiveservices_face/models/detection_model.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_face/person_group_operations.rb +71 -39
- data/lib/1.0/generated/azure_cognitiveservices_face/person_group_person.rb +446 -39
- data/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb +14 -0
- data/lib/profiles/latest/modules/face_profile_module.rb +4 -0
- data/lib/version.rb +1 -1
- metadata +5 -4
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::Face::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for DetectionModel
|
10
|
+
#
|
11
|
+
module DetectionModel
|
12
|
+
Detection01 = "detection_01"
|
13
|
+
Detection02 = "detection_02"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -25,35 +25,41 @@ module Azure::CognitiveServices::Face::V1_0
|
|
25
25
|
# Create a new person group with specified personGroupId, name, user-provided
|
26
26
|
# userData and recognitionModel.
|
27
27
|
# <br /> A person group is the container of the uploaded person data, including
|
28
|
-
# face
|
28
|
+
# face recognition features.
|
29
29
|
# <br /> After creation, use [PersonGroup Person -
|
30
30
|
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c)
|
31
31
|
# to add persons into the group, and then call [PersonGroup -
|
32
32
|
# Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249)
|
33
33
|
# to get this group ready for [Face -
|
34
34
|
# Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
|
35
|
-
# <br />
|
36
|
-
# [PersonGroup Person -
|
35
|
+
# <br /> No image will be stored. Only the person's extracted face features and
|
36
|
+
# userData will be stored on server until [PersonGroup Person -
|
37
37
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
38
38
|
# or [PersonGroup -
|
39
39
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
40
40
|
# is called.
|
41
|
-
# <br
|
41
|
+
# <br/>'recognitionModel' should be specified to associate with this person
|
42
|
+
# group. The default value for 'recognitionModel' is 'recognition_01', if the
|
43
|
+
# latest model needed, please explicitly specify the model you need in this
|
44
|
+
# parameter. New faces that are added to an existing person group will use the
|
45
|
+
# recognition model that's already associated with the collection. Existing
|
46
|
+
# face features in a person group can't be updated to features extracted by
|
47
|
+
# another version of recognition model.
|
48
|
+
# * 'recognition_01': The default recognition model for [PersonGroup -
|
49
|
+
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244).
|
50
|
+
# All those person groups created before 2019 March are bonded with this
|
51
|
+
# recognition model.
|
52
|
+
# * 'recognition_02': Recognition model released in 2019 March.
|
53
|
+
# 'recognition_02' is recommended since its overall accuracy is improved
|
54
|
+
# compared with 'recognition_01'.
|
55
|
+
#
|
56
|
+
# Person group quota:
|
42
57
|
# * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000
|
43
58
|
# persons.
|
44
59
|
# * S0-tier subscription quota: 1,000,000 person groups. Each holds up to
|
45
60
|
# 10,000 persons.
|
46
61
|
# * to handle larger scale face identification problem, please consider using
|
47
62
|
# [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d).
|
48
|
-
# <br />
|
49
|
-
# 'recognitionModel' should be specified to associate with this person group.
|
50
|
-
# The default value for 'recognitionModel' is 'recognition_01', if the latest
|
51
|
-
# model needed, please explicitly specify the model you need in this parameter.
|
52
|
-
# New faces that are added to an existing person group will use the recognition
|
53
|
-
# model that's already associated with the collection. Existing face features
|
54
|
-
# in a person group can't be updated to features extracted by another version
|
55
|
-
# of recognition model.
|
56
|
-
#
|
57
63
|
#
|
58
64
|
# @param person_group_id [String] Id referencing a particular person group.
|
59
65
|
# @param name [String] User defined name, maximum length is 128.
|
@@ -73,35 +79,41 @@ module Azure::CognitiveServices::Face::V1_0
|
|
73
79
|
# Create a new person group with specified personGroupId, name, user-provided
|
74
80
|
# userData and recognitionModel.
|
75
81
|
# <br /> A person group is the container of the uploaded person data, including
|
76
|
-
# face
|
82
|
+
# face recognition features.
|
77
83
|
# <br /> After creation, use [PersonGroup Person -
|
78
84
|
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c)
|
79
85
|
# to add persons into the group, and then call [PersonGroup -
|
80
86
|
# Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249)
|
81
87
|
# to get this group ready for [Face -
|
82
88
|
# Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
|
83
|
-
# <br />
|
84
|
-
# [PersonGroup Person -
|
89
|
+
# <br /> No image will be stored. Only the person's extracted face features and
|
90
|
+
# userData will be stored on server until [PersonGroup Person -
|
85
91
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
86
92
|
# or [PersonGroup -
|
87
93
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
88
94
|
# is called.
|
89
|
-
# <br
|
95
|
+
# <br/>'recognitionModel' should be specified to associate with this person
|
96
|
+
# group. The default value for 'recognitionModel' is 'recognition_01', if the
|
97
|
+
# latest model needed, please explicitly specify the model you need in this
|
98
|
+
# parameter. New faces that are added to an existing person group will use the
|
99
|
+
# recognition model that's already associated with the collection. Existing
|
100
|
+
# face features in a person group can't be updated to features extracted by
|
101
|
+
# another version of recognition model.
|
102
|
+
# * 'recognition_01': The default recognition model for [PersonGroup -
|
103
|
+
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244).
|
104
|
+
# All those person groups created before 2019 March are bonded with this
|
105
|
+
# recognition model.
|
106
|
+
# * 'recognition_02': Recognition model released in 2019 March.
|
107
|
+
# 'recognition_02' is recommended since its overall accuracy is improved
|
108
|
+
# compared with 'recognition_01'.
|
109
|
+
#
|
110
|
+
# Person group quota:
|
90
111
|
# * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000
|
91
112
|
# persons.
|
92
113
|
# * S0-tier subscription quota: 1,000,000 person groups. Each holds up to
|
93
114
|
# 10,000 persons.
|
94
115
|
# * to handle larger scale face identification problem, please consider using
|
95
116
|
# [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d).
|
96
|
-
# <br />
|
97
|
-
# 'recognitionModel' should be specified to associate with this person group.
|
98
|
-
# The default value for 'recognitionModel' is 'recognition_01', if the latest
|
99
|
-
# model needed, please explicitly specify the model you need in this parameter.
|
100
|
-
# New faces that are added to an existing person group will use the recognition
|
101
|
-
# model that's already associated with the collection. Existing face features
|
102
|
-
# in a person group can't be updated to features extracted by another version
|
103
|
-
# of recognition model.
|
104
|
-
#
|
105
117
|
#
|
106
118
|
# @param person_group_id [String] Id referencing a particular person group.
|
107
119
|
# @param name [String] User defined name, maximum length is 128.
|
@@ -121,35 +133,41 @@ module Azure::CognitiveServices::Face::V1_0
|
|
121
133
|
# Create a new person group with specified personGroupId, name, user-provided
|
122
134
|
# userData and recognitionModel.
|
123
135
|
# <br /> A person group is the container of the uploaded person data, including
|
124
|
-
# face
|
136
|
+
# face recognition features.
|
125
137
|
# <br /> After creation, use [PersonGroup Person -
|
126
138
|
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c)
|
127
139
|
# to add persons into the group, and then call [PersonGroup -
|
128
140
|
# Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249)
|
129
141
|
# to get this group ready for [Face -
|
130
142
|
# Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
|
131
|
-
# <br />
|
132
|
-
# [PersonGroup Person -
|
143
|
+
# <br /> No image will be stored. Only the person's extracted face features and
|
144
|
+
# userData will be stored on server until [PersonGroup Person -
|
133
145
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
134
146
|
# or [PersonGroup -
|
135
147
|
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
136
148
|
# is called.
|
137
|
-
# <br
|
149
|
+
# <br/>'recognitionModel' should be specified to associate with this person
|
150
|
+
# group. The default value for 'recognitionModel' is 'recognition_01', if the
|
151
|
+
# latest model needed, please explicitly specify the model you need in this
|
152
|
+
# parameter. New faces that are added to an existing person group will use the
|
153
|
+
# recognition model that's already associated with the collection. Existing
|
154
|
+
# face features in a person group can't be updated to features extracted by
|
155
|
+
# another version of recognition model.
|
156
|
+
# * 'recognition_01': The default recognition model for [PersonGroup -
|
157
|
+
# Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244).
|
158
|
+
# All those person groups created before 2019 March are bonded with this
|
159
|
+
# recognition model.
|
160
|
+
# * 'recognition_02': Recognition model released in 2019 March.
|
161
|
+
# 'recognition_02' is recommended since its overall accuracy is improved
|
162
|
+
# compared with 'recognition_01'.
|
163
|
+
#
|
164
|
+
# Person group quota:
|
138
165
|
# * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000
|
139
166
|
# persons.
|
140
167
|
# * S0-tier subscription quota: 1,000,000 person groups. Each holds up to
|
141
168
|
# 10,000 persons.
|
142
169
|
# * to handle larger scale face identification problem, please consider using
|
143
170
|
# [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d).
|
144
|
-
# <br />
|
145
|
-
# 'recognitionModel' should be specified to associate with this person group.
|
146
|
-
# The default value for 'recognitionModel' is 'recognition_01', if the latest
|
147
|
-
# model needed, please explicitly specify the model you need in this parameter.
|
148
|
-
# New faces that are added to an existing person group will use the recognition
|
149
|
-
# model that's already associated with the collection. Existing face features
|
150
|
-
# in a person group can't be updated to features extracted by another version
|
151
|
-
# of recognition model.
|
152
|
-
#
|
153
171
|
#
|
154
172
|
# @param person_group_id [String] Id referencing a particular person group.
|
155
173
|
# @param name [String] User defined name, maximum length is 128.
|
@@ -212,6 +230,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
212
230
|
end
|
213
231
|
|
214
232
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
233
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
234
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
215
235
|
|
216
236
|
result
|
217
237
|
end
|
@@ -293,6 +313,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
293
313
|
end
|
294
314
|
|
295
315
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
316
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
317
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
296
318
|
|
297
319
|
result
|
298
320
|
end
|
@@ -385,6 +407,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
385
407
|
end
|
386
408
|
|
387
409
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
410
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
411
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
388
412
|
# Deserialize Response
|
389
413
|
if status_code == 200
|
390
414
|
begin
|
@@ -496,6 +520,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
496
520
|
end
|
497
521
|
|
498
522
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
523
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
524
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
499
525
|
|
500
526
|
result
|
501
527
|
end
|
@@ -575,6 +601,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
575
601
|
end
|
576
602
|
|
577
603
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
604
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
605
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
578
606
|
# Deserialize Response
|
579
607
|
if status_code == 200
|
580
608
|
begin
|
@@ -715,6 +743,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
715
743
|
end
|
716
744
|
|
717
745
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
746
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
747
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
718
748
|
# Deserialize Response
|
719
749
|
if status_code == 200
|
720
750
|
begin
|
@@ -822,6 +852,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
822
852
|
end
|
823
853
|
|
824
854
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
855
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
856
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
825
857
|
|
826
858
|
result
|
827
859
|
end
|
@@ -113,6 +113,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
113
113
|
end
|
114
114
|
|
115
115
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
116
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
117
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
116
118
|
# Deserialize Response
|
117
119
|
if status_code == 200
|
118
120
|
begin
|
@@ -223,6 +225,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
223
225
|
end
|
224
226
|
|
225
227
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
228
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
229
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
226
230
|
# Deserialize Response
|
227
231
|
if status_code == 200
|
228
232
|
begin
|
@@ -257,8 +261,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
257
261
|
end
|
258
262
|
|
259
263
|
#
|
260
|
-
# Delete an existing person from a person group.
|
261
|
-
# face
|
264
|
+
# Delete an existing person from a person group. The persistedFaceId, userData,
|
265
|
+
# person name and face feature in the person entry will all be deleted.
|
262
266
|
#
|
263
267
|
# @param person_group_id [String] Id referencing a particular person group.
|
264
268
|
# @param person_id Id referencing a particular person.
|
@@ -272,8 +276,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
272
276
|
end
|
273
277
|
|
274
278
|
#
|
275
|
-
# Delete an existing person from a person group.
|
276
|
-
# face
|
279
|
+
# Delete an existing person from a person group. The persistedFaceId, userData,
|
280
|
+
# person name and face feature in the person entry will all be deleted.
|
277
281
|
#
|
278
282
|
# @param person_group_id [String] Id referencing a particular person group.
|
279
283
|
# @param person_id Id referencing a particular person.
|
@@ -287,8 +291,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
287
291
|
end
|
288
292
|
|
289
293
|
#
|
290
|
-
# Delete an existing person from a person group.
|
291
|
-
# face
|
294
|
+
# Delete an existing person from a person group. The persistedFaceId, userData,
|
295
|
+
# person name and face feature in the person entry will all be deleted.
|
292
296
|
#
|
293
297
|
# @param person_group_id [String] Id referencing a particular person group.
|
294
298
|
# @param person_id Id referencing a particular person.
|
@@ -334,6 +338,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
334
338
|
end
|
335
339
|
|
336
340
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
341
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
342
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
337
343
|
|
338
344
|
result
|
339
345
|
end
|
@@ -420,6 +426,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
420
426
|
end
|
421
427
|
|
422
428
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
429
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
430
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
423
431
|
# Deserialize Response
|
424
432
|
if status_code == 200
|
425
433
|
begin
|
@@ -532,6 +540,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
532
540
|
end
|
533
541
|
|
534
542
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
543
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
544
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
535
545
|
|
536
546
|
result
|
537
547
|
end
|
@@ -540,8 +550,11 @@ module Azure::CognitiveServices::Face::V1_0
|
|
540
550
|
end
|
541
551
|
|
542
552
|
#
|
543
|
-
# Delete a face from a person
|
544
|
-
#
|
553
|
+
# Delete a face from a person in a person group by specified personGroupId,
|
554
|
+
# personId and persistedFaceId.
|
555
|
+
# <br /> Adding/deleting faces to/from a same person will be processed
|
556
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
557
|
+
# in parallel.
|
545
558
|
#
|
546
559
|
# @param person_group_id [String] Id referencing a particular person group.
|
547
560
|
# @param person_id Id referencing a particular person.
|
@@ -557,8 +570,11 @@ module Azure::CognitiveServices::Face::V1_0
|
|
557
570
|
end
|
558
571
|
|
559
572
|
#
|
560
|
-
# Delete a face from a person
|
561
|
-
#
|
573
|
+
# Delete a face from a person in a person group by specified personGroupId,
|
574
|
+
# personId and persistedFaceId.
|
575
|
+
# <br /> Adding/deleting faces to/from a same person will be processed
|
576
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
577
|
+
# in parallel.
|
562
578
|
#
|
563
579
|
# @param person_group_id [String] Id referencing a particular person group.
|
564
580
|
# @param person_id Id referencing a particular person.
|
@@ -574,8 +590,11 @@ module Azure::CognitiveServices::Face::V1_0
|
|
574
590
|
end
|
575
591
|
|
576
592
|
#
|
577
|
-
# Delete a face from a person
|
578
|
-
#
|
593
|
+
# Delete a face from a person in a person group by specified personGroupId,
|
594
|
+
# personId and persistedFaceId.
|
595
|
+
# <br /> Adding/deleting faces to/from a same person will be processed
|
596
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
597
|
+
# in parallel.
|
579
598
|
#
|
580
599
|
# @param person_group_id [String] Id referencing a particular person group.
|
581
600
|
# @param person_id Id referencing a particular person.
|
@@ -624,6 +643,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
624
643
|
end
|
625
644
|
|
626
645
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
646
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
647
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
627
648
|
|
628
649
|
result
|
629
650
|
end
|
@@ -717,6 +738,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
717
738
|
end
|
718
739
|
|
719
740
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
741
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
742
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
720
743
|
# Deserialize Response
|
721
744
|
if status_code == 200
|
722
745
|
begin
|
@@ -735,7 +758,35 @@ module Azure::CognitiveServices::Face::V1_0
|
|
735
758
|
end
|
736
759
|
|
737
760
|
#
|
738
|
-
#
|
761
|
+
# Add a face to a person into a person group for face identification or
|
762
|
+
# verification. To deal with an image contains multiple faces, input face can
|
763
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
764
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
765
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
766
|
+
# PersonFace -
|
767
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
768
|
+
# [PersonGroup Person -
|
769
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
770
|
+
# or [PersonGroup -
|
771
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
772
|
+
# is called.
|
773
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
774
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
775
|
+
# * Higher face image quality means better recognition precision. Please
|
776
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
777
|
+
# (100 pixels between eyes) or bigger.
|
778
|
+
# * Each person entry can hold up to 248 faces.
|
779
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
|
780
|
+
# image file size is from 1KB to 6MB.
|
781
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces will
|
782
|
+
# be regarded as an error. If the provided "targetFace" rectangle is not
|
783
|
+
# returned from [Face -
|
784
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
785
|
+
# there’s no guarantee to detect and add the face successfully.
|
786
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
|
787
|
+
# large occlusions will cause failures.
|
788
|
+
# * Adding/deleting faces to/from a same person will be processed sequentially.
|
789
|
+
# Adding/deleting faces to/from different persons are processed in parallel.
|
739
790
|
#
|
740
791
|
# @param person_group_id [String] Id referencing a particular person group.
|
741
792
|
# @param person_id Id referencing a particular person.
|
@@ -753,7 +804,35 @@ module Azure::CognitiveServices::Face::V1_0
|
|
753
804
|
end
|
754
805
|
|
755
806
|
#
|
756
|
-
#
|
807
|
+
# Add a face to a person into a person group for face identification or
|
808
|
+
# verification. To deal with an image contains multiple faces, input face can
|
809
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
810
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
811
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
812
|
+
# PersonFace -
|
813
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
814
|
+
# [PersonGroup Person -
|
815
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
816
|
+
# or [PersonGroup -
|
817
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
818
|
+
# is called.
|
819
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
820
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
821
|
+
# * Higher face image quality means better recognition precision. Please
|
822
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
823
|
+
# (100 pixels between eyes) or bigger.
|
824
|
+
# * Each person entry can hold up to 248 faces.
|
825
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
|
826
|
+
# image file size is from 1KB to 6MB.
|
827
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces will
|
828
|
+
# be regarded as an error. If the provided "targetFace" rectangle is not
|
829
|
+
# returned from [Face -
|
830
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
831
|
+
# there’s no guarantee to detect and add the face successfully.
|
832
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
|
833
|
+
# large occlusions will cause failures.
|
834
|
+
# * Adding/deleting faces to/from a same person will be processed sequentially.
|
835
|
+
# Adding/deleting faces to/from different persons are processed in parallel.
|
757
836
|
#
|
758
837
|
# @param person_group_id [String] Id referencing a particular person group.
|
759
838
|
# @param person_id Id referencing a particular person.
|
@@ -771,7 +850,35 @@ module Azure::CognitiveServices::Face::V1_0
|
|
771
850
|
end
|
772
851
|
|
773
852
|
#
|
774
|
-
#
|
853
|
+
# Add a face to a person into a person group for face identification or
|
854
|
+
# verification. To deal with an image contains multiple faces, input face can
|
855
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
856
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
857
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
858
|
+
# PersonFace -
|
859
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
860
|
+
# [PersonGroup Person -
|
861
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
862
|
+
# or [PersonGroup -
|
863
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
864
|
+
# is called.
|
865
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
866
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
867
|
+
# * Higher face image quality means better recognition precision. Please
|
868
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
869
|
+
# (100 pixels between eyes) or bigger.
|
870
|
+
# * Each person entry can hold up to 248 faces.
|
871
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed
|
872
|
+
# image file size is from 1KB to 6MB.
|
873
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces will
|
874
|
+
# be regarded as an error. If the provided "targetFace" rectangle is not
|
875
|
+
# returned from [Face -
|
876
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
877
|
+
# there’s no guarantee to detect and add the face successfully.
|
878
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or
|
879
|
+
# large occlusions will cause failures.
|
880
|
+
# * Adding/deleting faces to/from a same person will be processed sequentially.
|
881
|
+
# Adding/deleting faces to/from different persons are processed in parallel.
|
775
882
|
#
|
776
883
|
# @param person_group_id [String] Id referencing a particular person group.
|
777
884
|
# @param person_id Id referencing a particular person.
|
@@ -834,6 +941,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
834
941
|
end
|
835
942
|
|
836
943
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
944
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
945
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
837
946
|
|
838
947
|
result
|
839
948
|
end
|
@@ -842,8 +951,51 @@ module Azure::CognitiveServices::Face::V1_0
|
|
842
951
|
end
|
843
952
|
|
844
953
|
#
|
845
|
-
# Add a
|
846
|
-
#
|
954
|
+
# Add a face to a person into a person group for face identification or
|
955
|
+
# verification. To deal with an image contains multiple faces, input face can
|
956
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
957
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
958
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
959
|
+
# PersonFace -
|
960
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
961
|
+
# [PersonGroup Person -
|
962
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
963
|
+
# or [PersonGroup -
|
964
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
965
|
+
# is called.
|
966
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
967
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
968
|
+
# * Higher face image quality means better recognition precision. Please
|
969
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
970
|
+
# (100 pixels between eyes) or bigger.
|
971
|
+
# * Each person entry can hold up to 248 faces.
|
972
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
973
|
+
# allowed image file size is from 1KB to 6MB.
|
974
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
975
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
976
|
+
# returned from [Face -
|
977
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
978
|
+
# there’s no guarantee to detect and add the face successfully.
|
979
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
980
|
+
# or large occlusions will cause failures.
|
981
|
+
# * Adding/deleting faces to/from a same person will be processed
|
982
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
983
|
+
# in parallel.
|
984
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
985
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
986
|
+
# need a proportionally larger minimum face size.
|
987
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
988
|
+
# different detection models, please refer to [How to specify a detection
|
989
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
990
|
+
# | Model | Recommended use-case(s) |
|
991
|
+
# | ---------- | -------- |
|
992
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
993
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
994
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
995
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
996
|
+
# faces in such cases may not be detected. |
|
997
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
998
|
+
# accuracy especially on small, side and blurry faces. |
|
847
999
|
#
|
848
1000
|
# @param person_group_id [String] Id referencing a particular person group.
|
849
1001
|
# @param person_id Id referencing a particular person.
|
@@ -856,19 +1008,68 @@ module Azure::CognitiveServices::Face::V1_0
|
|
856
1008
|
# is more than one face in the image, targetFace is required to specify which
|
857
1009
|
# face to add. No targetFace means there is only one face detected in the
|
858
1010
|
# entire image.
|
1011
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1012
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1013
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1014
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1015
|
+
# another model is needed, please explicitly specify it. Possible values
|
1016
|
+
# include: 'detection_01', 'detection_02'
|
859
1017
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
860
1018
|
# will be added to the HTTP request.
|
861
1019
|
#
|
862
1020
|
# @return [PersistedFace] operation results.
|
863
1021
|
#
|
864
|
-
def add_face_from_url(person_group_id, person_id, url, user_data:nil, target_face:nil, custom_headers:nil)
|
865
|
-
response = add_face_from_url_async(person_group_id, person_id, url, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
|
1022
|
+
def add_face_from_url(person_group_id, person_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
1023
|
+
response = add_face_from_url_async(person_group_id, person_id, url, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
|
866
1024
|
response.body unless response.nil?
|
867
1025
|
end
|
868
1026
|
|
869
1027
|
#
|
870
|
-
# Add a
|
871
|
-
#
|
1028
|
+
# Add a face to a person into a person group for face identification or
|
1029
|
+
# verification. To deal with an image contains multiple faces, input face can
|
1030
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
1031
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
1032
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
1033
|
+
# PersonFace -
|
1034
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
1035
|
+
# [PersonGroup Person -
|
1036
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
1037
|
+
# or [PersonGroup -
|
1038
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
1039
|
+
# is called.
|
1040
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
1041
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
1042
|
+
# * Higher face image quality means better recognition precision. Please
|
1043
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
1044
|
+
# (100 pixels between eyes) or bigger.
|
1045
|
+
# * Each person entry can hold up to 248 faces.
|
1046
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
1047
|
+
# allowed image file size is from 1KB to 6MB.
|
1048
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
1049
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
1050
|
+
# returned from [Face -
|
1051
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
1052
|
+
# there’s no guarantee to detect and add the face successfully.
|
1053
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
1054
|
+
# or large occlusions will cause failures.
|
1055
|
+
# * Adding/deleting faces to/from a same person will be processed
|
1056
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
1057
|
+
# in parallel.
|
1058
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
1059
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
1060
|
+
# need a proportionally larger minimum face size.
|
1061
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
1062
|
+
# different detection models, please refer to [How to specify a detection
|
1063
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
1064
|
+
# | Model | Recommended use-case(s) |
|
1065
|
+
# | ---------- | -------- |
|
1066
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
1067
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
1068
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
1069
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
1070
|
+
# faces in such cases may not be detected. |
|
1071
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
1072
|
+
# accuracy especially on small, side and blurry faces. |
|
872
1073
|
#
|
873
1074
|
# @param person_group_id [String] Id referencing a particular person group.
|
874
1075
|
# @param person_id Id referencing a particular person.
|
@@ -881,18 +1082,67 @@ module Azure::CognitiveServices::Face::V1_0
|
|
881
1082
|
# is more than one face in the image, targetFace is required to specify which
|
882
1083
|
# face to add. No targetFace means there is only one face detected in the
|
883
1084
|
# entire image.
|
1085
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1086
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1087
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1088
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1089
|
+
# another model is needed, please explicitly specify it. Possible values
|
1090
|
+
# include: 'detection_01', 'detection_02'
|
884
1091
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
885
1092
|
# will be added to the HTTP request.
|
886
1093
|
#
|
887
1094
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
888
1095
|
#
|
889
|
-
def add_face_from_url_with_http_info(person_group_id, person_id, url, user_data:nil, target_face:nil, custom_headers:nil)
|
890
|
-
add_face_from_url_async(person_group_id, person_id, url, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
|
1096
|
+
def add_face_from_url_with_http_info(person_group_id, person_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
1097
|
+
add_face_from_url_async(person_group_id, person_id, url, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
|
891
1098
|
end
|
892
1099
|
|
893
1100
|
#
|
894
|
-
# Add a
|
895
|
-
#
|
1101
|
+
# Add a face to a person into a person group for face identification or
|
1102
|
+
# verification. To deal with an image contains multiple faces, input face can
|
1103
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
1104
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
1105
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
1106
|
+
# PersonFace -
|
1107
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
1108
|
+
# [PersonGroup Person -
|
1109
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
1110
|
+
# or [PersonGroup -
|
1111
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
1112
|
+
# is called.
|
1113
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
1114
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
1115
|
+
# * Higher face image quality means better recognition precision. Please
|
1116
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
1117
|
+
# (100 pixels between eyes) or bigger.
|
1118
|
+
# * Each person entry can hold up to 248 faces.
|
1119
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
1120
|
+
# allowed image file size is from 1KB to 6MB.
|
1121
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
1122
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
1123
|
+
# returned from [Face -
|
1124
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
1125
|
+
# there’s no guarantee to detect and add the face successfully.
|
1126
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
1127
|
+
# or large occlusions will cause failures.
|
1128
|
+
# * Adding/deleting faces to/from a same person will be processed
|
1129
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
1130
|
+
# in parallel.
|
1131
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
1132
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
1133
|
+
# need a proportionally larger minimum face size.
|
1134
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
1135
|
+
# different detection models, please refer to [How to specify a detection
|
1136
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
1137
|
+
# | Model | Recommended use-case(s) |
|
1138
|
+
# | ---------- | -------- |
|
1139
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
1140
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
1141
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
1142
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
1143
|
+
# faces in such cases may not be detected. |
|
1144
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
1145
|
+
# accuracy especially on small, side and blurry faces. |
|
896
1146
|
#
|
897
1147
|
# @param person_group_id [String] Id referencing a particular person group.
|
898
1148
|
# @param person_id Id referencing a particular person.
|
@@ -905,12 +1155,18 @@ module Azure::CognitiveServices::Face::V1_0
|
|
905
1155
|
# is more than one face in the image, targetFace is required to specify which
|
906
1156
|
# face to add. No targetFace means there is only one face detected in the
|
907
1157
|
# entire image.
|
1158
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1159
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1160
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1161
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1162
|
+
# another model is needed, please explicitly specify it. Possible values
|
1163
|
+
# include: 'detection_01', 'detection_02'
|
908
1164
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
909
1165
|
# to the HTTP request.
|
910
1166
|
#
|
911
1167
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
912
1168
|
#
|
913
|
-
def add_face_from_url_async(person_group_id, person_id, url, user_data:nil, target_face:nil, custom_headers:nil)
|
1169
|
+
def add_face_from_url_async(person_group_id, person_id, url, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
914
1170
|
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
915
1171
|
fail ArgumentError, 'person_group_id is nil' if person_group_id.nil?
|
916
1172
|
fail ArgumentError, "'person_group_id' should satisfy the constraint - 'MaxLength': '64'" if !person_group_id.nil? && person_group_id.length > 64
|
@@ -944,7 +1200,7 @@ module Azure::CognitiveServices::Face::V1_0
|
|
944
1200
|
options = {
|
945
1201
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
946
1202
|
path_params: {'personGroupId' => person_group_id,'personId' => person_id},
|
947
|
-
query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(',')},
|
1203
|
+
query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(','),'detectionModel' => detection_model},
|
948
1204
|
body: request_content,
|
949
1205
|
headers: request_headers.merge(custom_headers || {}),
|
950
1206
|
base_url: request_url
|
@@ -961,6 +1217,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
961
1217
|
end
|
962
1218
|
|
963
1219
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1220
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1221
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
964
1222
|
# Deserialize Response
|
965
1223
|
if status_code == 200
|
966
1224
|
begin
|
@@ -979,8 +1237,51 @@ module Azure::CognitiveServices::Face::V1_0
|
|
979
1237
|
end
|
980
1238
|
|
981
1239
|
#
|
982
|
-
# Add a
|
983
|
-
#
|
1240
|
+
# Add a face to a person into a person group for face identification or
|
1241
|
+
# verification. To deal with an image contains multiple faces, input face can
|
1242
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
1243
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
1244
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
1245
|
+
# PersonFace -
|
1246
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
1247
|
+
# [PersonGroup Person -
|
1248
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
1249
|
+
# or [PersonGroup -
|
1250
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
1251
|
+
# is called.
|
1252
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
1253
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
1254
|
+
# * Higher face image quality means better recognition precision. Please
|
1255
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
1256
|
+
# (100 pixels between eyes) or bigger.
|
1257
|
+
# * Each person entry can hold up to 248 faces.
|
1258
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
1259
|
+
# allowed image file size is from 1KB to 6MB.
|
1260
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
1261
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
1262
|
+
# returned from [Face -
|
1263
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
1264
|
+
# there’s no guarantee to detect and add the face successfully.
|
1265
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
1266
|
+
# or large occlusions will cause failures.
|
1267
|
+
# * Adding/deleting faces to/from a same person will be processed
|
1268
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
1269
|
+
# in parallel.
|
1270
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
1271
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
1272
|
+
# need a proportionally larger minimum face size.
|
1273
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
1274
|
+
# different detection models, please refer to [How to specify a detection
|
1275
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
1276
|
+
# | Model | Recommended use-case(s) |
|
1277
|
+
# | ---------- | -------- |
|
1278
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
1279
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
1280
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
1281
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
1282
|
+
# faces in such cases may not be detected. |
|
1283
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
1284
|
+
# accuracy especially on small, side and blurry faces. |
|
984
1285
|
#
|
985
1286
|
# @param person_group_id [String] Id referencing a particular person group.
|
986
1287
|
# @param person_id Id referencing a particular person.
|
@@ -993,19 +1294,68 @@ module Azure::CognitiveServices::Face::V1_0
|
|
993
1294
|
# is more than one face in the image, targetFace is required to specify which
|
994
1295
|
# face to add. No targetFace means there is only one face detected in the
|
995
1296
|
# entire image.
|
1297
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1298
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1299
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1300
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1301
|
+
# another model is needed, please explicitly specify it. Possible values
|
1302
|
+
# include: 'detection_01', 'detection_02'
|
996
1303
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
997
1304
|
# will be added to the HTTP request.
|
998
1305
|
#
|
999
1306
|
# @return [PersistedFace] operation results.
|
1000
1307
|
#
|
1001
|
-
def add_face_from_stream(person_group_id, person_id, image, user_data:nil, target_face:nil, custom_headers:nil)
|
1002
|
-
response = add_face_from_stream_async(person_group_id, person_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
|
1308
|
+
def add_face_from_stream(person_group_id, person_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
1309
|
+
response = add_face_from_stream_async(person_group_id, person_id, image, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
|
1003
1310
|
response.body unless response.nil?
|
1004
1311
|
end
|
1005
1312
|
|
1006
1313
|
#
|
1007
|
-
# Add a
|
1008
|
-
#
|
1314
|
+
# Add a face to a person into a person group for face identification or
|
1315
|
+
# verification. To deal with an image contains multiple faces, input face can
|
1316
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
1317
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
1318
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
1319
|
+
# PersonFace -
|
1320
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
1321
|
+
# [PersonGroup Person -
|
1322
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
1323
|
+
# or [PersonGroup -
|
1324
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
1325
|
+
# is called.
|
1326
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
1327
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
1328
|
+
# * Higher face image quality means better recognition precision. Please
|
1329
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
1330
|
+
# (100 pixels between eyes) or bigger.
|
1331
|
+
# * Each person entry can hold up to 248 faces.
|
1332
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
1333
|
+
# allowed image file size is from 1KB to 6MB.
|
1334
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
1335
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
1336
|
+
# returned from [Face -
|
1337
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
1338
|
+
# there’s no guarantee to detect and add the face successfully.
|
1339
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
1340
|
+
# or large occlusions will cause failures.
|
1341
|
+
# * Adding/deleting faces to/from a same person will be processed
|
1342
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
1343
|
+
# in parallel.
|
1344
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
1345
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
1346
|
+
# need a proportionally larger minimum face size.
|
1347
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
1348
|
+
# different detection models, please refer to [How to specify a detection
|
1349
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
1350
|
+
# | Model | Recommended use-case(s) |
|
1351
|
+
# | ---------- | -------- |
|
1352
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
1353
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
1354
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
1355
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
1356
|
+
# faces in such cases may not be detected. |
|
1357
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
1358
|
+
# accuracy especially on small, side and blurry faces. |
|
1009
1359
|
#
|
1010
1360
|
# @param person_group_id [String] Id referencing a particular person group.
|
1011
1361
|
# @param person_id Id referencing a particular person.
|
@@ -1018,18 +1368,67 @@ module Azure::CognitiveServices::Face::V1_0
|
|
1018
1368
|
# is more than one face in the image, targetFace is required to specify which
|
1019
1369
|
# face to add. No targetFace means there is only one face detected in the
|
1020
1370
|
# entire image.
|
1371
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1372
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1373
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1374
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1375
|
+
# another model is needed, please explicitly specify it. Possible values
|
1376
|
+
# include: 'detection_01', 'detection_02'
|
1021
1377
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1022
1378
|
# will be added to the HTTP request.
|
1023
1379
|
#
|
1024
1380
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1025
1381
|
#
|
1026
|
-
def add_face_from_stream_with_http_info(person_group_id, person_id, image, user_data:nil, target_face:nil, custom_headers:nil)
|
1027
|
-
add_face_from_stream_async(person_group_id, person_id, image, user_data:user_data, target_face:target_face, custom_headers:custom_headers).value!
|
1382
|
+
def add_face_from_stream_with_http_info(person_group_id, person_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
1383
|
+
add_face_from_stream_async(person_group_id, person_id, image, user_data:user_data, target_face:target_face, detection_model:detection_model, custom_headers:custom_headers).value!
|
1028
1384
|
end
|
1029
1385
|
|
1030
1386
|
#
|
1031
|
-
# Add a
|
1032
|
-
#
|
1387
|
+
# Add a face to a person into a person group for face identification or
|
1388
|
+
# verification. To deal with an image contains multiple faces, input face can
|
1389
|
+
# be specified as an image with a targetFace rectangle. It returns a
|
1390
|
+
# persistedFaceId representing the added face. No image will be stored. Only
|
1391
|
+
# the extracted face feature will be stored on server until [PersonGroup
|
1392
|
+
# PersonFace -
|
1393
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e),
|
1394
|
+
# [PersonGroup Person -
|
1395
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
|
1396
|
+
# or [PersonGroup -
|
1397
|
+
# Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
|
1398
|
+
# is called.
|
1399
|
+
# <br /> Note persistedFaceId is different from faceId generated by [Face -
|
1400
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
|
1401
|
+
# * Higher face image quality means better recognition precision. Please
|
1402
|
+
# consider high-quality faces: frontal, clear, and face size is 200x200 pixels
|
1403
|
+
# (100 pixels between eyes) or bigger.
|
1404
|
+
# * Each person entry can hold up to 248 faces.
|
1405
|
+
# * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
|
1406
|
+
# allowed image file size is from 1KB to 6MB.
|
1407
|
+
# * "targetFace" rectangle should contain one face. Zero or multiple faces
|
1408
|
+
# will be regarded as an error. If the provided "targetFace" rectangle is not
|
1409
|
+
# returned from [Face -
|
1410
|
+
# Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
|
1411
|
+
# there’s no guarantee to detect and add the face successfully.
|
1412
|
+
# * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose,
|
1413
|
+
# or large occlusions will cause failures.
|
1414
|
+
# * Adding/deleting faces to/from a same person will be processed
|
1415
|
+
# sequentially. Adding/deleting faces to/from different persons are processed
|
1416
|
+
# in parallel.
|
1417
|
+
# * The minimum detectable face size is 36x36 pixels in an image no larger than
|
1418
|
+
# 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will
|
1419
|
+
# need a proportionally larger minimum face size.
|
1420
|
+
# * Different 'detectionModel' values can be provided. To use and compare
|
1421
|
+
# different detection models, please refer to [How to specify a detection
|
1422
|
+
# model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
|
1423
|
+
# | Model | Recommended use-case(s) |
|
1424
|
+
# | ---------- | -------- |
|
1425
|
+
# | 'detection_01': | The default detection model for [PersonGroup Person - Add
|
1426
|
+
# Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b).
|
1427
|
+
# Recommend for near frontal face detection. For scenarios with exceptionally
|
1428
|
+
# large angle (head-pose) faces, occluded faces or wrong image orientation, the
|
1429
|
+
# faces in such cases may not be detected. |
|
1430
|
+
# | 'detection_02': | Detection model released in 2019 May with improved
|
1431
|
+
# accuracy especially on small, side and blurry faces. |
|
1033
1432
|
#
|
1034
1433
|
# @param person_group_id [String] Id referencing a particular person group.
|
1035
1434
|
# @param person_id Id referencing a particular person.
|
@@ -1042,12 +1441,18 @@ module Azure::CognitiveServices::Face::V1_0
|
|
1042
1441
|
# is more than one face in the image, targetFace is required to specify which
|
1043
1442
|
# face to add. No targetFace means there is only one face detected in the
|
1044
1443
|
# entire image.
|
1444
|
+
# @param detection_model [DetectionModel] Name of detection model. Detection
|
1445
|
+
# model is used to detect faces in the submitted image. A detection model name
|
1446
|
+
# can be provided when performing Face - Detect or (Large)FaceList - Add Face
|
1447
|
+
# or (Large)PersonGroup - Add Face. The default value is 'detection_01', if
|
1448
|
+
# another model is needed, please explicitly specify it. Possible values
|
1449
|
+
# include: 'detection_01', 'detection_02'
|
1045
1450
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1046
1451
|
# to the HTTP request.
|
1047
1452
|
#
|
1048
1453
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1049
1454
|
#
|
1050
|
-
def add_face_from_stream_async(person_group_id, person_id, image, user_data:nil, target_face:nil, custom_headers:nil)
|
1455
|
+
def add_face_from_stream_async(person_group_id, person_id, image, user_data:nil, target_face:nil, detection_model:nil, custom_headers:nil)
|
1051
1456
|
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
1052
1457
|
fail ArgumentError, 'person_group_id is nil' if person_group_id.nil?
|
1053
1458
|
fail ArgumentError, "'person_group_id' should satisfy the constraint - 'MaxLength': '64'" if !person_group_id.nil? && person_group_id.length > 64
|
@@ -1083,7 +1488,7 @@ module Azure::CognitiveServices::Face::V1_0
|
|
1083
1488
|
options = {
|
1084
1489
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1085
1490
|
path_params: {'personGroupId' => person_group_id,'personId' => person_id},
|
1086
|
-
query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(',')},
|
1491
|
+
query_params: {'userData' => user_data,'targetFace' => target_face.nil? ? nil : target_face.join(','),'detectionModel' => detection_model},
|
1087
1492
|
body: request_content,
|
1088
1493
|
headers: request_headers.merge(custom_headers || {}),
|
1089
1494
|
base_url: request_url
|
@@ -1100,6 +1505,8 @@ module Azure::CognitiveServices::Face::V1_0
|
|
1100
1505
|
end
|
1101
1506
|
|
1102
1507
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1508
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1509
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1103
1510
|
# Deserialize Response
|
1104
1511
|
if status_code == 200
|
1105
1512
|
begin
|