Skip to content

Commit

Permalink
Merged PR 942: Rearranged verify actions
Browse files Browse the repository at this point in the history
Rearranged verify actions
  • Loading branch information
Paul Clarke committed Sep 17, 2019
2 parents d74ffe6 + 82b3e5d commit 5e5ffeb
Showing 1 changed file with 84 additions and 84 deletions.
168 changes: 84 additions & 84 deletions docs/source/api/index.rst
Expand Up @@ -717,36 +717,31 @@ Extract Faces
:resheader Content-Type: application/json
:status 200: Face attributes extracted.

Search Subjects
+++++++++++++++
Verify Face
+++++++++++

.. http:post:: /v1.1/face/search
.. http:post:: /v1.1/face/verify
Search for subjects using a probe.
Verify a face against a probe.

**Example request**:

.. sourcecode:: http

POST /v1.1/face/search HTTP/1.1
POST /v1.1/face/verify HTTP/1.1
Host: api.id.nec.com.au
Accept: application/json
Content-Type: application/json
x-api-key: [Application API key]
x-amz-date: [YYYYMMDD'T'HHMMSS'Z' UTC timestamp]
Authorization: [AWS Signature Version 4]

{
"probe": "[PROBE]",
"threshold": 7500,
"limit": 3,
"tags": [ "passport", "licence" ]
"face": "[FACE]",
"probe": "[PROBE]"
}

:<json string probe: Base64 encoded image.
:<json int threshold: Optional score threshold, ranges from 0 to 9999, default is 7000.
:<json int limit: Optional limit of total events returned, ranges from 1 to 50, default is 10.
:<json array tags: Option list of tag names to refine the search against, using OR to filter subjects.
:<json string face: Base64 encoded image.
:reqheader Host: api.id.nec.com.au
:reqheader Accept: application/json
:reqheader Content-Type: application/json
Expand All @@ -762,67 +757,13 @@ Search Subjects
Content-Type: application/json

{
"candidates": [
{
"id": "necidguid-fcdf-49eb-9182-5a6825ed2a3b",
"score": 8200,
"events": [
{
"id": "eventguid-caf3-4e0f-92b9-101a9e73a3ee"
"score": 8200
},
{
"id": "eventguid-f99a-41dc-8eb1-cd7b1b3dcdec"
"score": 8000
}
]
},
{
"id": "necidguid-0d05-4052-a44f-83f6b243e70b",
"score": 7600,
"events": [
{
"id": "eventguid-f8bc-47d1-a976-7e8b953da664"
"score": 7600
}
]
}
],
"attributes": {
"faceArea": {
"left": "161",
"top": "156",
"right": "318",
"bottom": "313"
},
"headArea": {
"left": "131",
"top": "86",
"right": "345",
"bottom": "343"
},
"rightEyeCenter": {
"x": "195",
"y": "198"
},
"leftEyeCenter": {
"x": "276",
"y": "191"
},
"frontalFaceScore": "0.569824",
"faceRoll": "4.93922",
"facePan": "-9.34863",
"faceTilt": "7.613",
"faceScore": "0.999591",
"faceQualityScore": "0.86541"
}
"score": 8200
}

:>json array candidates: Containing **id** *(string)*: Subject id, **score** *(int)*: Highest match score and **event** *(array)*: Containing **id** *(string)*: Event id and **score** *(int)*: Match score.
:>json attributes: See `Face Attributes`_.
:>json int score: Match score.
:resheader Content-Type: application/json
:status 200: Candidates found.
:status 404: Candidates not found.
:status 200: Subject verified.
:status 404: Subject not verified.

Verify Subject
++++++++++++++
Expand All @@ -844,8 +785,8 @@ Verify Subject
Authorization: [AWS Signature Version 4]

{
"probe": "[PROBE]",
"id": necidguid-fcdf-49eb-9182-5a6825ed2a3b
"id": "necidguid-fcdf-49eb-9182-5a6825ed2a3b",
"probe": "[PROBE]"
}

:<json string probe: Base64 encoded image.
Expand Down Expand Up @@ -875,31 +816,36 @@ Verify Subject
:status 200: Subject verified.
:status 404: Subject not verified.

Verify Face
+++++++++++
Search Subjects
+++++++++++++++

.. http:post:: /v1.1/face/verify
.. http:post:: /v1.1/face/search
Verify a face against a probe.
Search for subjects using a probe.

**Example request**:

.. sourcecode:: http

POST /v1.1/face/verify HTTP/1.1
POST /v1.1/face/search HTTP/1.1
Host: api.id.nec.com.au
Accept: application/json
Content-Type: application/json
x-api-key: [Application API key]
x-amz-date: [YYYYMMDD'T'HHMMSS'Z' UTC timestamp]
Authorization: [AWS Signature Version 4]

{
"probe": "[PROBE]",
"face": "[FACE]"
"threshold": 7500,
"limit": 3,
"tags": [ "passport", "licence" ]
}

:<json string probe: Base64 encoded image.
:<json string face: Base64 encoded image.
:<json int threshold: Optional score threshold, ranges from 0 to 9999, default is 7000.
:<json int limit: Optional limit of total events returned, ranges from 1 to 50, default is 10.
:<json array tags: Option list of tag names to refine the search against, using OR to filter subjects.
:reqheader Host: api.id.nec.com.au
:reqheader Accept: application/json
:reqheader Content-Type: application/json
Expand All @@ -915,13 +861,67 @@ Verify Face
Content-Type: application/json

{
"score": 8200
"candidates": [
{
"id": "necidguid-fcdf-49eb-9182-5a6825ed2a3b",
"score": 8200,
"events": [
{
"id": "eventguid-caf3-4e0f-92b9-101a9e73a3ee"
"score": 8200
},
{
"id": "eventguid-f99a-41dc-8eb1-cd7b1b3dcdec"
"score": 8000
}
]
},
{
"id": "necidguid-0d05-4052-a44f-83f6b243e70b",
"score": 7600,
"events": [
{
"id": "eventguid-f8bc-47d1-a976-7e8b953da664"
"score": 7600
}
]
}
],
"attributes": {
"faceArea": {
"left": "161",
"top": "156",
"right": "318",
"bottom": "313"
},
"headArea": {
"left": "131",
"top": "86",
"right": "345",
"bottom": "343"
},
"rightEyeCenter": {
"x": "195",
"y": "198"
},
"leftEyeCenter": {
"x": "276",
"y": "191"
},
"frontalFaceScore": "0.569824",
"faceRoll": "4.93922",
"facePan": "-9.34863",
"faceTilt": "7.613",
"faceScore": "0.999591",
"faceQualityScore": "0.86541"
}
}

:>json int score: Match score.
:>json array candidates: Containing **id** *(string)*: Subject id, **score** *(int)*: Highest match score and **event** *(array)*: Containing **id** *(string)*: Event id and **score** *(int)*: Match score.
:>json attributes: See `Face Attributes`_.
:resheader Content-Type: application/json
:status 200: Subject verified.
:status 404: Subject not verified.
:status 200: Candidates found.
:status 404: Candidates not found.

Tags
~~~~
Expand Down

0 comments on commit 5e5ffeb

Please sign in to comment.