globaldatanetmenu

.Blurring Pictures with Amazon Rekognition

Nov 10th 2020-3 min read

Our usecase :

We were working on a serverless web application built with AWS Amplify, that required to blur workers and License Plates - for data protection regulations - from Images that some cameras produced. Images were produced every 5min from around 200 cameras. Between the options we had to build this solution, we found many third party solutions available for AI based face detection, but isn't there an easier and most importantly CHEAPER solution? Without SageMaker or any servers.. ? YES

What are Amazon Rekognition and Custom Labels?

Amazon Rekognition :

Amazon Rekognition makes it easy to add image to your applications using proven, highly scalable, deep learning technology that requires no machine learning expertise to use.

Amazon Rekognition Custom Labels :

Amazon Rekognition Custom Labels allow you to identify objects and scenes in images that are specific to your business needs. For our usecases the labels were : Persons and License Plates. The issue with Rekognition Custom Labels is its price : 4,44$ per hour for ireland region. That explains why we didn't use it for live blurring, but we used instead normal Rekognition, and once a day ( around 1h per day, depending of number of images ) we use Custom Labels with batch processing to improve our blurring.

Why use Amazon Rekognition Custom Labels :

After several testing for the pictures our cameras were producing, we faced a challenge that the persons ( actually workers in construction sites ) were not always recognized by Amazon rekognition because of their pose, equipment, etc... We had to train a new model with Amazon rekognition Custom Labels for workers but also License Plates ( since Rekognition don't offer License Plates in its default labels ):

  • Rekognition Custom Labels offers a new way of building models that requires no Machine Learning knowledge :
Custom Labels
  • This evaluation summary shows the results of testing our trained model with the test dataset we provided. This helps understand the overall performance of the model:

Custom Labels

Our Solution's Architecture :

In our solution's architecture we had the following components:

  • Lambda 1 triggered by dynamodb at image creation blurs Persons with Amazon Rekognition.
  • Lambda 2 was triggered by a CloudWatch Event once a day and queries images to be blurred again for the day. Creates SQS Messages and starts the Rekognition Custom Labels.
  • Lambda 3 triggered by SQS, blurs Persons and License Plates with Amazon Rekognition Custom Labels, Stops the Custom labels when the queue is empty.

Solution Architecture

Conclusion :

Depending on your usecase, Amazon Rekognition is often enough for your objects/scenes detections, but if you have a very specific Label you want to detect: You can use Rekognition Custom Labels by training the model for your exact Label, but watchout for the pricing : Use our solution! Blur pictures live with Amazon Rekognition and once a day, improve your blurring. I want to finish this post by saying that I was pleasantly surprised that without any previous Machine Learning knowledge I was able to implement such a solution. 🚀

globaldatanetCloud Development, Optimization & Automation

.Navigation

.Social

  • follow globaldatanet on instagram
  • follow globaldatanet on facebook
  • follow globaldatanet on twitter
  • follow globaldatanet on linkendin
  • follow globaldatanet on twitch
  •  listen to our serverless world podcast
  • follow globaldatanet's tech rss feed
  • follow globaldatanet at github
© 2024 by globaldatanet. All Right Reserved
Your privacy is important to us!

We use cookies on our website. Some of them are essential,while others help us to improve our online offer.
You can find more information in our Privacy policy