Skip to content

Commit ef19ccf

Browse files
Merge pull request #91 from regulaforensics/7938-matching-update
Added descriptions, enum members
2 parents 79d7e04 + 78b9b39 commit ef19ccf

8 files changed

Lines changed: 77 additions & 37 deletions

File tree

common.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ components:
394394
$ref: "#/components/schemas/FaceSDKResultCode"
395395

396396
ImageData:
397-
description: "Base64 encoded image."
397+
description: "Base64-encoded image."
398398
type: string
399399
format: byte
400400

@@ -449,7 +449,17 @@ components:
449449

450450
FaceSDKResultCode:
451451
type: integer
452-
description: "The result code, see enum: https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/"
452+
description: "The result code, see the [FaceSDKResultCode enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/).
453+
454+
Some of the values:
455+
456+
- `0`—everything is OK
457+
458+
- `1`—image is empty, try again with another image
459+
460+
- `2`—face is not detected
461+
462+
- `6`—data cannot be decoded as an image"
453463
enum:
454464
- 0
455465
- 1
@@ -490,6 +500,8 @@ components:
490500
- 250
491501
- 251
492502
- 252
503+
- 253
504+
- 254
493505
x-enum-varnames:
494506
- FACER_OK
495507
- FR_IMAGE_EMPTY
@@ -530,11 +542,12 @@ components:
530542
- FACER_TIMEOUT_LIVENESS_TRANSACTION
531543
- FACER_FAILED_LIVENESS_TRANSACTION
532544
- FACER_ABORTED_LIVENESS_TRANSACTION
545+
- FACER_GENERAL_ERROR
546+
- FACER_PASSIVE_LIVENESS_FAIL
533547

534548
Thumbnail:
535-
description: "Base64 of the cropped portrait."
536-
type: string
537-
format: byte
549+
description: "See `crop` instead."
550+
deprecated: true
538551

539552
FaceRectangular:
540553
description: "The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle."

detect.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
openapi: 3.0.3
2-
3-
42
paths:
53
/detect:
64
parameters:
75
- $ref: './common.yml#/components/parameters/x-request'
86
post:
97
tags:
108
- matching
11-
summary: "Detect face, evaluate attributes, assess the portrait quality"
9+
summary: "detect faces"
10+
description: "Detect face, evaluate attributes, assess the portrait quality"
1211
operationId: detect
1312
requestBody:
1413
required: true
@@ -33,7 +32,7 @@ components:
3332
properties:
3433
tag:
3534
type: string
36-
description: "Session identificator."
35+
description: "Session identificator, should be unique for each session."
3736
processParam:
3837
$ref: "./common.yml#/components/schemas/ProcessParam"
3938
image:

identification.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ components:
6060
properties:
6161
name:
6262
type: string
63-
description: "Person name."
63+
description: "Person's name."
6464
metadata:
6565
type: object
6666
additionalProperties: true
@@ -77,7 +77,7 @@ components:
7777
properties:
7878
name:
7979
type: string
80-
description: "Person name."
80+
description: "Person's name."
8181
metadata:
8282
type: object
8383
additionalProperties: true
@@ -95,7 +95,7 @@ components:
9595
properties:
9696
tag:
9797
type: string
98-
description: "Session identificator."
98+
description: "Session identificator, should be unique for each session."
9999
image:
100100
type: object
101101
description: "Uploaded image."

index.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
openapi: 3.0.3
22
info:
33
version: 6.1.0
4-
title: Regula FaceSDK Web API
4+
title: Regula Face SDK Web API
55
x-logo:
66
url: 'https://static-content.regulaforensics.com/Icons/Logos/Regula-logo.svg'
77
href: 'https://mobile.regulaforensics.com/'
88
description: |
9-
[Download OpenAPI specification](https://github.com/regulaforensics/FaceSDK-web-openapi)
9+
<a href="https://regulaforensics.com/products/face-recognition-sdk/ " target="_blank">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side.
10+
11+
The Face SDK includes the following features:
12+
13+
* <a href="https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection" target="_blank">Face Detection</a>
14+
* <a href="https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11" target="_blank">Face Match (1:1)</a>
15+
* <a href="https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n" target="_blank">Face Search (1:N)</a>
16+
* <a href="https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment" target="_blank">Liveness Assessment</a>
17+
18+
Here is the <a href="https://github.com/regulaforensics/FaceSDK-web-openapi " target="_blank">OpenAPI specification on GitHub</a>.
19+
1020
### Clients
1121
* [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios
1222
* [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android

liveness.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ components:
3131
description: "Whether the liveness detection is confirmed (0) or not (1)."
3232
tag:
3333
type: string
34-
description: "Session identificator."
34+
description: "Session identificator, should be unique for each session."
3535
transactionId:
3636
type: string
3737
description: "Transaction ID, there can be several transactions within one session."

match_and_search.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ paths:
66
post:
77
tags:
88
- matching
9-
summary: 'Match and Search in one request'
9+
summary: 'match and search (1:1 + 1:N)'
10+
description: "To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, matching is not performed and only search is carried out."
1011
operationId: match_and_search
1112
requestBody:
1213
required: true
@@ -31,10 +32,10 @@ components:
3132
properties:
3233
tag:
3334
type: string
34-
description: "Session identificator."
35+
description: "Session identificator, should be unique for each session."
3536
images:
3637
type: array
37-
description: "Array of Person images."
38+
description: "Person's images."
3839
items:
3940
type: object
4041
properties:
@@ -56,10 +57,12 @@ components:
5657
properties:
5758
results:
5859
type: array
60+
description: "The match and search results."
5961
items:
6062
$ref: './matching.yml#/components/schemas/MatchImageResult'
6163
elapsedTime:
6264
type: number
65+
description: "Time the processing has taken, ms."
6366
format: float
6467
example: 1.317137987
6568
metadata:
@@ -68,11 +71,13 @@ components:
6871
description: "A free-form object containing person's extended attributes."
6972
detections:
7073
type: array
74+
description: "The detection results."
7175
items:
7276
type: object
7377
properties:
7478
faces:
7579
type: array
80+
description: "Detected faces."
7681
items:
7782
$ref: '#/components/schemas/FacesResponse'
7883
imageIndex:
@@ -85,6 +90,7 @@ components:
8590
properties:
8691
images:
8792
type: array
93+
description: "Detected Persons."
8894
items:
8995
$ref: './search.yml#/definitions/RecognizeImage'
9096
- $ref: './identification.yml#/components/schemas/Person'
@@ -96,6 +102,7 @@ components:
96102
properties:
97103
persons:
98104
type: array
105+
description: "Detected Persons."
99106
items:
100107
$ref: '#/components/schemas/PersonWithImages'
101108
rotationAngle:

matching.yml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
openapi: 3.0.3
22
paths:
3-
43
/match:
54
parameters:
65
- $ref: './common.yml#/components/parameters/x-request'
76
post:
87
tags:
98
- matching
10-
summary: "Compare faces in all combinations"
9+
summary: "compare faces (1:1)"
10+
description: "To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field.
11+
12+
Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected).
13+
14+
So, if there are two images each of which has two faces in them, the parameters will be the following:
15+
16+
- First face in the first image: `faceIndex: 0`, `imageIndex: 0`
17+
18+
- Second face in the first image: `faceIndex: 1`, `imageIndex: 0`
19+
20+
- First face of the second image: `faceIndex: 0`, `imageIndex: 1`
21+
22+
- Second face in the second image: `faceIndex: 1`, `imageIndex: 1`"
1123
operationId: match
1224
requestBody:
1325
required: true
@@ -39,15 +51,13 @@ components:
3951
properties:
4052
tag:
4153
type: string
42-
description: "Session identificator."
54+
description: "Session identificator, should be unique for each session."
4355
thumbnails:
44-
type: boolean
45-
description: "Deprecated, use the `crop` field in `outputImageParams` instead."
46-
default: false
56+
description: "Use `outputImageParams.crop` instead."
4757
deprecated: true
4858
images:
4959
type: array
50-
description: "The array of all images included in the comparison."
60+
description: "All images included in the comparison."
5161
items:
5262
$ref: "#/components/schemas/MatchImage"
5363
outputImageParams:
@@ -62,7 +72,7 @@ components:
6272
type: integer
6373
crop:
6474
type: object
65-
description: "Whether to return the Base64 of an aligned and cropped portrait in the `crop` field."
75+
description: "If set, a Base64-encoded aligned and cropped by the indicated settings portrait is returned in the `crop` field."
6676
properties:
6777
padColor:
6878
type: array
@@ -72,7 +82,7 @@ components:
7282
type: integer
7383
returnOriginalRect:
7484
type: boolean
75-
description: "Whether to return the coordinates of the rectangle with the face in the original image prepared for the face crop."
85+
description: "Whether to return the coordinates of the rectangle with the face in the original image prepared for the face crop. Can be used only if the face in the original image is not tilted."
7686
default: null
7787
size:
7888
type: array
@@ -82,7 +92,7 @@ components:
8292
type: integer
8393
type:
8494
type: integer
85-
description: "The aspect ratio according to which face alignment is performed during face detection."
95+
description: "The aspect ratio according to which face alignment is performed. See the [FaceImageQualityAlignType enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-image-quality-align-type/). To get a thumbnail with dimensions 3x4, set `0`."
8696
default: null
8797
enum:
8898
- 0
@@ -93,7 +103,7 @@ components:
93103

94104
MatchImageIndex:
95105
type: integer
96-
description: "The image index number. Can be given; if not given, the index numbers are set automatically starting from 0. All index numbers must be whole and unique—not repeated."
106+
description: "The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated."
97107

98108
MatchFaceIndex:
99109
type: number
@@ -120,12 +130,12 @@ components:
120130
properties:
121131
detections:
122132
type: array
123-
description: "The array of detected faces."
133+
description: "The detection results."
124134
items:
125135
$ref: "#/components/schemas/MatchImageDetection"
126136
results:
127137
type: array
128-
description: "The array of matching results."
138+
description: "The comparison results."
129139
items:
130140
$ref: "#/components/schemas/MatchImageResult"
131141
metadata:
@@ -166,7 +176,7 @@ components:
166176
properties:
167177
faces:
168178
type: array
169-
description: "The array of detected faces."
179+
description: "Detected faces."
170180
items:
171181
$ref: "#/components/schemas/DetectionFace"
172182
imageIndex:
@@ -199,10 +209,10 @@ components:
199209
crop:
200210
type: string
201211
format: byte
202-
description: "Base64 of the cropped portrait."
212+
description: "Base64-encoded aligned and cropped portrait."
203213

204214
ImageSource:
205-
description: "The type of the image, defines the way the comparison is performed. See the enum: https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/image-source/"
215+
description: "The type of the image, defines the way the comparison is performed, see the [ImageSource enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/image-source/)."
206216
type: integer
207217
enum:
208218
- 1
@@ -211,15 +221,16 @@ components:
211221
- 4
212222
- 5
213223
- 6
224+
- 7
214225
x-enum-varnames:
215226
- DOCUMENT_PRINTED
216227
- DOCUMENT_RFID
217228
- LIVE
218229
- DOCUMENT_WITH_LIVE
219230
- EXTERNAL
220231
- GHOST
221-
232+
- BARCODE
222233
detectAll:
223234
type: boolean
224-
description: "Whether to detect all faces in the image. If set to false, only the most central face is detected."
235+
description: "Whether to detect all faces in the image. If set to `false`, only the most central face is detected."
225236
default: false

search.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ definitions:
105105
format: uuid
106106
name:
107107
type: string
108-
description: "Person name."
108+
description: "Person's name."
109109
nullable: true
110110
metadata:
111111
type: object

0 commit comments

Comments
 (0)