More Related Content Similar to Aws rekognition - riconoscimento facciale (20) More from Corley S.r.l. (20) Aws rekognition - riconoscimento facciale2. Walter Dal Mut
Solution Architect - AWS Certified
SysOps Administrator - AWS Certified
Docker Certified Associate
@walterdalmut
walter.dalmut@corley.it
corley.it
4. Scalability and cost optimization with Container Services
CloudConf2019 - General
Setup
AWS Rekognition
Summary
6. โข Receive the CloudConf email with the web
application endpoint
โข The barcode is used on the web application
โข The user upload its own picture connecting the
identification number
โข The pictures is checked to drop common mistakes
โ Drop multiple users (too many people)
โ Dark or too bright pictures
โ Low quality pictures
โ etc.
โ We believe that users are somehow polite
โข AWS Rekognition tear apart the picture in favor of
raw information
โ (no images are stored)
The user upload its own picture
7. โข Locally runs a simple face recognition algorithm
โข When a face is detected a frame is captured
โข The captured frame is processed by AWS
Rekognition Service
โข The External Image Identification number is
used to get the user information
โข The user information is stored as PDF file
โข The file is printed using a thermal printer
Local algorithm
9. AWS Rekognition
$ aws rekognition list-collections
{
"CollectionIds": [
"collection-10",
"corley-test"
],
"FaceModelVersions": [
"4.0",
"4.0"
]
}
10. AWS Rekognition
$ aws rekognition create-collection --collection-id collection-11
{
"StatusCode": 200,
"CollectionArn":
"aws:rekognition:eu-west-1:xxxxxxxxxxxx:collection/collection-11",
"FaceModelVersion": "4.0"
}
11. Upload pictures on s3
$aws s3 cp wdm1.jpg s3://faces.walterdalmut.com/
$ aws s3 ls s3://faces.walterdalmut.com
2019-02-15 17:46:24 6753 thor1.jpg
2019-02-15 17:40:00 44897 wdm1.jpg
12. Detect faces (when you upload a picture)
$ aws rekognition detect-faces --image 'S3Object={Bucket=faces.walterdalmut.com,Name=wdm1.jpg}'
{
"FaceDetails": [
{
"Landmarks": [
{
"Type": "eyeLeft",
"X": 0.4940113127231598,
"Y": 0.28493359684944153
},
{
"Type": "eyeRight",
"X": 0.5633826851844788,
"Y": 0.2943187952041626
},
{
"Type": "mouthLeft",
"X": 0.4960087239742279,
"Y": 0.41778162121772766
},
{
"Type": "mouthRight",
"X": 0.5530909895896912,
"Y": 0.42552411556243896
},
{
"Type": "nose",
"X": 0.5306091904640198,
"Y": 0.34477418661117554
}
],
}
]
}
// continue...
{
"FaceDetails": [
{
"BoundingBox": {
"Width": 0.1618916094303131,
"Height": 0.4021730124950409,
"Left": 0.43909329175949097,
"Top": 0.12676428258419037
},
"Pose": {
"Roll": 3.8218839168548584,
"Yaw": 5.0268073081970215,
"Pitch": 5.38221549987793
},
"Quality": {
"Brightness": 64.7296142578125,
"Sharpness": 32.20803451538086
},
"Confidence": 99.9999771118164
}
]
}
13. Index faces (when you upload a picture)
$ aws rekognition index-faces
--collection-id collection-11
--image 'S3Object={Bucket=faces.walterdalmut.com,Name=wdm1.jpg}'
{
"FaceRecords": [
{
"Face": {
"FaceId": "310b383e-66c1-43b8-918a-75388619ee7b",
"BoundingBox": {
"Width": 0.1618916094303131,
"Height": 0.4021730124950409,
"Left": 0.43909329175949097,
"Top": 0.12676428258419037
},
"ImageId": "da1ae019-db88-3713-8e9e-7d01238ea609",
"Confidence": 99.9999771118164
},
}
]
โฆ
}
14. Index faces (when you upload a picture)
$ aws rekognition index-faces
--collection-id collection-11
--image 'S3Object={Bucket=faces.walterdalmut.com,Name=wdm1.jpg}'
--external-image-id my-user-id
{
"FaceRecords": [
{
"Face": {
"FaceId": "my-user-id",
"BoundingBox": {
"Width": 0.1618916094303131,
"Height": 0.4021730124950409,
"Left": 0.43909329175949097,
"Top": 0.12676428258419037
},
"ImageId": "da1ae019-db88-3713-8e9e-7d01238ea609",
"Confidence": 99.9999771118164
},
}
]
โฆ
}
15. Search faces (when you upload a picture)
$ aws rekognition search-faces-by-image
--collection-id collection-11
--image 'S3Object={Bucket=faces.walterdalmut.com,Name=wdm1.jpg}'
{
"SearchedFaceBoundingBox": {
"Width": 0.1618916094303131,
"Height": 0.4021730124950409,
"Left": 0.43909329175949097,
"Top": 0.12676428258419037
},
"SearchedFaceConfidence": 99.9999771118164,
"FaceMatches": [
{
"Similarity": 99.99999237060547,
"Face": {
"FaceId": "my-user-id",
"BoundingBox": {
"Width": 0.16189199686050415,
"Height": 0.4021730124950409,
"Left": 0.4390929937362671,
"Top": 0.12676399946212769
},
"ImageId": "da1ae019-db88-3713-8e9e-7d01238ea609",
"Confidence": 100.0
}
}
],
"FaceModelVersion": "4.0"
}
16. List existing faces (management)
$ aws rekognition list-faces --collection-id collection-16
{
"Faces": [
{
"FaceId": "18215496-3282-46ae-a265-aecf140fba65",
"BoundingBox": {
"Width": 0.37553301453590393,
"Height": 0.3338260054588318,
"Left": 0.43626898527145386,
"Top": 0.289465993642807
},
"ImageId": "ea5e78fc-3fdb-32d3-b053-5a22f95dbd55",
"ExternalImageId": "6639219",
"Confidence": 100.0
},
{
"FaceId": "2b85a18f-7570-4568-9fe0-b770ace00745",
"BoundingBox": {
"Width": 0.47415900230407715,
"Height": 0.3649649918079376,
"Left": 0.34846198558807373,
"Top": 0.28914299607276917
},
"ImageId": "c601ee26-224b-308a-a25c-ecd56ad0a400",
"ExternalImageId": "6639219",
"Confidence": 100.0
},
],
"FaceModelVersion": "4.0"
}
17. Drop existing faces (management)
$ aws rekognition delete-faces --collection-id collection-16
--face-ids 2b85a18f-7570-4568-9fe0-b770ace00745
{
"DeletedFaces": [
"2b85a18f-7570-4568-9fe0-b770ace00745"
]
}