Virtual Concierge - Intruder Detection with AWS DeepLens
source link: https://mechanicalrock.github.io/2019/07/12/virtual-concierge-intruder-detection-with-deeplens.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Virtual Concierge - Intruder Detection with AWS DeepLens
Jul 12, 2019 • Nathan Glover
Tags: devops iot greengrass aws deeplensIntroduction
Virtual Concierge is an office assistant written to help detect intruders that enter the Mechanical Rock office.
Architecture
Seen above is the high level architecture implemented in virtual-concierge. Each component handles a different stage in the intruder detection processing stream.
Source Code
The full source code for the project is available on our GitHub at MechanicalRock/virtual-concierge.
Note: Guess what! You don’t need a DeepLens in order to follow along with this tutorial 😍. If you have another device (lets say a Raspberry Pi 3 for example), as long as you’re able to load AWS IoT Greengrass, onto it, you’ll be able to re-use the code in this repo.
😃 facecrop
Receives the incoming video feed from the DeepLens camera, then makes use of the Amazon single shot detector (SSD) for recognising facial characteristics.
Upon successful detection the face area is cropped out of the video feed and send over the DeepLens AWS IoT topic for the next stage of processing.
🔍 decode
Decode is responsible for receiving the base64 encoded face image from the DeepLens IoT topic. It makes use of an AWS IoT Topic Rule as an event trigger and takes the decoded image and places it into an S3 bucket in the /incoming
folder.
🔮 guess
Guess is triggered when a new image lands in the incoming/
folder of the S3 bucket. Its role is to perform an inference with Amazon Rekognition on the supplied face image.
client = boto3.client('rekognition')
...
resp = client.search_faces_by_image(
CollectionId=rekognition_collection_id, # Collection ID (more on this later)
Image=image, # Image object from S3
MaxFaces=1, # Single face provided in image
FaceMatchThreshold=70) # Match threshold, sweet spot based on some tweaking.
At this point the process flow can go one of two ways.
-
If the person in the image IS NOT detected, then a message is delivered to slack prompting members of the team to tag a new face.
This interaction happens by another Lambda called unknown that retrieves the image from the
unknown/
directory of the S3 bucket. This interaction is also faciliated via S3 events.The input asks for a Slack username so that an identity within chat can be tagged later on when the user is seen again.
-
If the person in the image is detected, then a message is delivered to slack notifying the office that their colleague has entered the building. The bot also tags the user into the message, so that if it isn’t actually them they can quickly warn the team of the imposter.
🥋 train
Train is responsible for completing the feedback loop based on the users selection from Slack.
-
If the user clicks
ignore
, the image is removed from the S3 bucket and not assigned to any identities. -
If the user selects a Slack identity however, the image is fed back into Amazon Rekognition for future inferences.
client = boto3.client('rekognition') ... resp = client.index_faces( CollectionId=rekognition_collection_id, Image={ 'S3Object': { 'Bucket': bucket_name, 'Name': key, } }, ExternalImageId=user_id, DetectionAttributes=['DEFAULT'] )
Deploy Your Own
If you’d like to deploy your own version, I recommend familiarzing yourself with the following technologies:
- Serverless Framework - Used for the majority of the lambdas in the project. The configuration for deployment can be found in the serverless.yaml file.
- AWS Serverless Application Model - Used for the DeepLens Greengrass code due to a small limitation around packaging up subfolders within one monorepo.
- AWS CLI - Ensure that your AWS CLI is setup and configured with your account credentials.
- DeepLens Setup - If you do end up using a DeepLens, run through the setup guide.
Once you’ve familiarized yourself, head on over to the MechanicalRock/virtual-concierge repository and checkout the README for detailed instruction.
If you’re interested in the possibilities of deploying AWS IoT Greengrass or Serverless workflows get in touch!
And we’re hiring!
Attribution
Implementation of the guess, unknown & train code was based on the work by Sander van de Graaf in his project Doorman.
Recommend
-
29
README.md
-
60
Automated web application attacks are terminally limited by the number of HTTP requests they can send. It's impossible to know how man...
-
44
在本演示中我将介绍Turbo Intruder插件的基本功能及相关的demo测试。Turbo Intruder是一个从头开始构建的并充分考虑其执行速度的研究级 开源 Burp Suite扩展。此外我还讨论...
-
32
安装靶场 链接:https://pan.baidu.com/s/19X0oC63oO2cQKK6UL5xgOw 提取码:yq7f 下载完成放入网站根目录 ...
-
7
Athelas launches Concierge: monitor your psychiatry patients remotely and grow revenue with home visits.
-
8
Mar 29, 2016 - 10 minute read - Comments - Burp
-
7
Nintendo launches free Switch Concierge service for newbies A one-on-one video chat with a Nintendo rep By
-
5
The world’s first deep learning enabled video camera for developers ...
-
9
@bentphilipsonBent PhilipsonBent Philipson is the founder the consulting firm, Philosophy Care.
-
3
Deeplens deep-learning enabled wireless video camera It...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK