-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatch_and_search.yml
111 lines (109 loc) · 3.9 KB
/
match_and_search.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
openapi: 3.0.3
paths:
/match_and_search:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
post:
tags:
- match
summary: 'match and search (1:1 + 1:N)'
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, match is not performed and only search is carried out."
operationId: match_and_search
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MatchAndSearchRequest'
responses:
200:
description: 'Successful operation; the compare results are returned.'
content:
application/json:
schema:
$ref: '#/components/schemas/MatchAndSearchResponse'
403:
$ref: './common.yml#/components/responses/BadLicense'
components:
schemas:
MatchAndSearchRequest:
allOf:
- type: object
properties:
tag:
type: string
description: "Session identificator, should be unique for each session."
images:
type: array
description: "Person's images."
items:
type: object
properties:
content:
$ref: './common.yml#/components/schemas/ImageData'
type:
$ref: './match.yml#/components/schemas/ImageSource'
groupIds:
type: array
description: "IDs of the groups in which the search is performed."
items:
type: string
format: uuid
MatchAndSearchResponse:
allOf:
- $ref: './common.yml#/components/schemas/FaceSDKResult'
- type: object
properties:
results:
type: array
description: "The match and search results."
items:
$ref: './match.yml#/components/schemas/MatchImageResult'
elapsedTime:
type: number
description: "Time the processing has taken, ms."
format: float
example: 1.317137987
metadata:
type: object
additionalProperties: true
description: "A free-form object containing person's extended attributes."
detections:
type: array
description: "The detection results."
items:
type: object
properties:
faces:
type: array
description: "Detected faces."
items:
$ref: '#/components/schemas/FacesResponse'
imageIndex:
$ref: './match.yml#/components/schemas/MatchImageIndex'
status:
$ref: './common.yml#/components/schemas/FaceSDKResultCode'
PersonWithImages:
allOf:
- type: object
properties:
images:
type: array
description: "Detected Persons."
items:
$ref: './search.yml#/definitions/RecognizeImage'
- $ref: './identification.yml#/components/schemas/Person'
FacesResponse:
allOf:
- $ref: './match.yml#/components/schemas/DetectionFace'
- type: object
properties:
persons:
type: array
description: "Detected Persons."
items:
$ref: '#/components/schemas/PersonWithImages'
rotationAngle:
type: number
format: float
example: 2.1272900104522705