Skip to content

Commit

Permalink
Spelling & Typo Corrections (#12)
Browse files Browse the repository at this point in the history
* Add files via upload

fixed typo should be 262 images not 1000

* Add files via upload

fixed spelling typos

* Add files via upload

removed collection name

* Add files via upload

small corrections.

* Add files via upload

supporting images for lab 3.2

* Add files via upload

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_3/3.2 Fun with Rekognition DetectFaces and SearchFacesByImage.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_1/1.0 SETUP - Gather images and setup S3 buckets for IDV modules.ipynb

Co-authored-by: Matteo Figus <[email protected]>

* Update identity-verification/module_2/2.2 Onboarding IDV API Example.ipynb

Co-authored-by: Stefano Vozza <[email protected]>

* Update identity-verification/module_2/2.3 Authentication IDV API Example.ipynb

Co-authored-by: Stefano Vozza <[email protected]>

* Update identity-verification/module_2/2.3 Authentication IDV API Example.ipynb

Co-authored-by: Connor Kirkpatrick <[email protected]>

* Update identity-verification/module_2/2.3 Authentication IDV API Example.ipynb

Co-authored-by: Connor Kirkpatrick <[email protected]>

* Update identity-verification/module_2/2.3 Authentication IDV API Example.ipynb

Co-authored-by: Connor Kirkpatrick <[email protected]>

Co-authored-by: Matteo Figus <[email protected]>
Co-authored-by: Stefano Vozza <[email protected]>
Co-authored-by: Connor Kirkpatrick <[email protected]>
  • Loading branch information
4 people authored Oct 4, 2022
1 parent 450f19e commit 5fbab47
Show file tree
Hide file tree
Showing 10 changed files with 457 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@
"source": [
"s3 = boto3.client('s3')\n",
"try:\n",
" s3.create_bucket(\n",
" Bucket=bucket_name,\n",
" CreateBucketConfiguration={'LocationConstraint': aws_region}\n",
" )\n",
" s3.create_bucket(Bucket=bucket_name)\n",
"except Exception as err:\n",
" print(\"ERROR: {}\".format(err))"
]
Expand Down
1 change: 0 additions & 1 deletion identity-verification/module_1/1.1 Getting Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"metadata": {},
"outputs": [],
"source": [
"# there should be close to 1000 files in the bucket. \n",
"def list_s3_files_using_client(bucket_name):\n",
" \"\"\"\n",
" This functions list all files in s3 bucket.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"\n",
"-------\n",
"\n",
"In-person user identity verification is slow to scale, costly, and high friction for users. Machine learning powered facial biometrics can enable online user identity verification. Amazon Rekognition offers pre-trained facial recognition and analysis capabilities that you can quickly add to your user onboarding and authentication work flows to verify opted-in users' identity online. \n",
"In-person user identity verification is slow to scale, costly, and high friction for users. Machine learning powered facial biometrics can enable online user identity verification. Amazon Rekognition offers pre-trained facial recognition and analysis capabilities that you can quickly add to your user onboarding and authentication workflows to verify opted-in users' identity online. \n",
"\n",
"In this notebook, we'll use the Amazon Rekgonition's key APIs for Identity Verification. After running this notebook you should be able to use the following APIs:\n",
"\n",
Expand Down Expand Up @@ -317,7 +317,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## IndexFaces \n",
"## Index Multiple Faces \n",
"-----\n",
"\n",
"The easy way to index multiple faces is to simply make a list of faces and loop over the list, in this case we are going to use the \"reference name\" as our external image id and the reference image will be the image we add to our collection. Of course you can use a variety of parallel processing methods to speed up indexing operations, however in this case here we'll keep it simple and just use a for loop. Note we are using about 100 images so this may take a few seconds. \n",
Expand Down Expand Up @@ -477,7 +477,7 @@
"----\n",
"Pass the FaceID above to search_faces, this will identify potential matches within the collection. \n",
"\n",
"**Select a face id from the results above and enter it below**"
"**Select a face id from the results above and enter it below** "
]
},
{
Expand All @@ -486,7 +486,6 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"face_id = \"\" # replace with your own face ID\n",
"try:\n",
" response = rek_client.search_faces(\n",
Expand Down Expand Up @@ -664,10 +663,12 @@
"metadata": {},
"outputs": [],
"source": [
"response = rek_client.delete_collection(\n",
" CollectionId= collection_name\n",
")\n",
"response"
"try:\n",
" rek_client.delete_collection(\n",
" CollectionId=collection_name\n",
" )\n",
"except Exception as err:\n",
" print(\"ERROR: {}\".format(err))"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"## Name your Collection \n",
"\n",
"# -- onboarded users collection --\n",
"collection_name = '' # name your collection something like \"onboarded-users\"\n",
"collection_name = ' ' # name your collection something like \"onboarded-users\"\n",
"\n",
"try:\n",
" rek_client.create_collection(\n",
Expand Down Expand Up @@ -279,7 +279,14 @@
" 'Bucket':bucket_name,\n",
" 'Name':id_image}},\n",
" Attributes=['ALL'])\n",
"response"
"print(\"-- 1st face found:\")\n",
"print(response['FaceDetails'][0]['BoundingBox'])\n",
"print(response['FaceDetails'][0]['Quality'])\n",
"\n",
"print(\"-- 2nd face found:\")\n",
"print(response['FaceDetails'][1]['BoundingBox'])\n",
"print(response['FaceDetails'][1]['Quality'])\n",
"\n"
]
},
{
Expand Down Expand Up @@ -324,7 +331,7 @@
"'Quality': {'Brightness': 94.17919921875, 'Sharpness': 46.02980041503906}\n",
" \n",
"# -- selfie quality --\n",
"'Quality': {'Brightness': 93.77082824707031,'Sharpness': 20.927310943603516}\n",
"'Quality': {'Brightness': 89.2042007446289, 'Sharpness': 53.330047607421875}\n",
"```"
]
},
Expand All @@ -339,7 +346,7 @@
" 'Bucket':bucket_name,\n",
" 'Name':selfie_image}},\n",
" Attributes=['ALL'])\n",
"response"
"print(response['FaceDetails'][0]['Quality'])"
]
},
{
Expand Down Expand Up @@ -545,7 +552,7 @@
"source": [
"## Clean up\n",
"----\n",
"Here we simply need to delete our collections \n"
"As part of our cleanup, we can delete our two collections. This will delete the collections and all the face vectors contained within.\n"
]
},
{
Expand All @@ -560,17 +567,18 @@
" rek_client.delete_collection(\n",
" CollectionId=collection_name\n",
" )\n",
"except:\n",
" print(\"collection: {} NOT FOUND\".format(collection_name))\n",
"\n",
"except Exception as err:\n",
" print(\"ERROR: {}\".format(err))\n",
" \n",
"# fraudulent user collection \n",
"\n",
"try:\n",
" rek_client.delete_collection(\n",
" CollectionId=fraud_collection_name\n",
" )\n",
"except:\n",
" print(\"collection: {} NOT FOUND\".format(fraud_collection_name))"
"except Exception as err:\n",
" print(\"ERROR: {}\".format(err))"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"----\n",
"\n",
"Here we want to do some basic checks:\n",
"1. that we can detect that there is only one face in the selie \n",
"1. that we can detect that there is only one face in the selfie \n",
"2. the quality (sharpness and brightness) are sufficient to match with \n",
"\n",
"Note: we could do several other checks, but we'll see those in module 3.\n",
Expand Down Expand Up @@ -347,7 +347,7 @@
"<div class=\"alert alert-info\"><strong> Results </strong>\n",
" \n",
"\n",
"- Check out the similarity of each face found, it should range from 99.99 to 99.96 (Rekognition is extreemly accurate) \n",
"- Check out the similarity of each face found, it should range from 99.99 to 99.96 \n",
"- Also note the ExternalImageId of each face, they should all match Entity_X_Cannon\n",
" \n",
"</div>"
Expand Down Expand Up @@ -391,7 +391,7 @@
"## Search within Collection\n",
"----- \n",
"\n",
"What faces matches another face within the collection? well now we have several faces of Al Gore lets see what that looks like."
"What faces matches another face within the collection? We now have several faces of the same person, lets see what that looks like."
]
},
{
Expand All @@ -400,8 +400,8 @@
"metadata": {},
"outputs": [],
"source": [
"## Snag a FaceID from above\n",
"face_id = \"628d65f7-e96b-45fb-91f7-3841064c6fa7\"\n",
"## -- Snag a FaceID from above --\n",
"face_id = \" \" # enter FaceID from above\n",
"try:\n",
" response = rek_client.search_faces(\n",
" CollectionId=collection_name,\n",
Expand All @@ -420,7 +420,7 @@
"## Clean up\n",
"------\n",
"\n",
"now simply delete our collection "
"As part of our cleanup, we can delete our collection. This will delete the collection and all the face vectors contained within."
]
},
{
Expand All @@ -429,10 +429,12 @@
"metadata": {},
"outputs": [],
"source": [
"response = rek_client.delete_collection(\n",
" CollectionId= collection_name\n",
")\n",
"response"
"try:\n",
" rek_client.delete_collection(\n",
" CollectionId=collection_name\n",
" )\n",
"except Exception as err:\n",
" print(\"ERROR: {}\".format(err))"
]
}
],
Expand Down
Loading

0 comments on commit 5fbab47

Please sign in to comment.