{"id":5665,"date":"2018-05-12T19:49:39","date_gmt":"2018-05-12T19:49:39","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=5665"},"modified":"2020-03-30T02:36:15","modified_gmt":"2020-03-30T02:36:15","slug":"aws-deeplens-facial-recognition-project-setup","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/aws-deeplens-facial-recognition-project-setup\/","title":{"rendered":"AWS DeepLens facial recognition project setup"},"content":{"rendered":"<p>When you set up the <a href=\"https:\/\/amzn.to\/2rCQXcR\">AWS DeepLens<\/a>, you need to set up a project:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.40.54-PM-300x81.png\" alt=\"\" width=\"300\" height=\"81\" class=\"aligncenter size-medium wp-image-5667\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.40.54-PM-300x81.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.40.54-PM-768x208.png 768w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.40.54-PM.png 896w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>When I first set this up, I tried the object detection project, but it detects objects your device probably won&#8217;t see (like a dining room table vs an airplane), so I think the face detection is a better demo.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.53-PM-300x73.png\" alt=\"\" width=\"300\" height=\"73\" class=\"aligncenter size-medium wp-image-5668\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.53-PM-300x73.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.53-PM-768x188.png 768w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.53-PM.png 854w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.59-PM-300x207.png\" alt=\"\" width=\"300\" height=\"207\" class=\"aligncenter size-medium wp-image-5669\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.59-PM-300x207.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.41.59-PM.png 413w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Click through the next screen, and then select to deploy to the device:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.43.18-PM-300x89.png\" alt=\"\" width=\"300\" height=\"89\" class=\"aligncenter size-medium wp-image-5672\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.43.18-PM-300x89.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.43.18-PM-768x228.png 768w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.43.18-PM.png 917w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>This gives you a cryptic (contradictory) error, which you can feel free to ignore:<\/p>\n<pre>Face-detection contains only a Lambda function. Do you want to deploy it?\nThis project does not contain a Lambda function. Lambda functions run an instances of the model.\n<\/pre>\n<p>Once the project deploys, you can &#8220;subscribe&#8221; to output from it, using an identifer AWS gives you that looks like this:<\/p>\n<pre>$aws\/things\/deeplens_836c8651-764c-446e-b5cb-c632e7fa137f\/infer\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.20-PM-300x64.png\" alt=\"\" width=\"300\" height=\"64\" class=\"aligncenter size-medium wp-image-5673\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.20-PM-300x64.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.20-PM-768x163.png 768w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.20-PM.png 887w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Once you subscribe to this stream, you&#8217;ll get a series of JSONs, that appear to represent the probability that there is a face in the image (I get 0 when I point it away, and .3-.8 when pointing at myself)<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.27-PM-300x79.png\" alt=\"\" width=\"300\" height=\"79\" class=\"aligncenter size-medium wp-image-5674\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.27-PM-300x79.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-12-at-3.46.27-PM.png 690w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to get face detection working on the AWS Deeplens<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,12],"tags":[71,119,167,352],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5665"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=5665"}],"version-history":[{"count":1,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5665\/revisions"}],"predecessor-version":[{"id":6438,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5665\/revisions\/6438"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=5665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=5665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=5665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}