The impact of coronavirus has encouraged communities to implement social distancing. Many of us still need to go outside for essential shopping and exercise. Grocery stores have now restricted the number of customers within the store. At popular stores, there have been reports of people waiting for hours to get inside. This is especially difficult for parents with children who may have left them at home. Also, people are going out to popular parks causing overcrowding at these locations and have made it difficult to keep our social distance. Our ultimate goal is to help people make the best decisions on where to go shopping with the least amount of lines and also which parks to visit. This can also be used to notify local authorities if the crowds at parks do not decrease.

What it does

We aim to resolve these issues by monitoring density/number of people detected by our camera in a given location. The camera takes a photo, sends it via LTE over Soracom Air to our AWS Sagemaker endpoint powered by AWS Marketplace. By using the Human Detector model, it counts the number of people in the picture. Using AWS SNS, an email is triggered when the amount of people in the picture is over 2. This number can be adjusted as needed.

Currently, this camera is pointed at the front of our office, but could easily be used in the following scenarios:

Scenario 1: Detecting lines at grocery stores Scenario 2: Overcrowding at parks Scenario 3: Notifying local authorities of Overcrowding

How we built it

Architecture: Using a lambda deployed with AWS Greengrass on a Raspberry Pi, we are able to run logic on the device to get an image from the device’s camera. We then send that image to the Sagemaker Endpoint where our Human Detector model is hosted for inference. Once we receive the predictions back, the same lambda sends them to Soracom’s Unified Endpoint to let Soracom handle the data from there. We also send a copy of the image to Soracom Harvest Files.

Once the data has reached Soracom over the secure cellular connection, we have chosen to display the data using Soracom Lagoon. Our integration with AWS simultaneously allows us to easily send the data to AWS IoT. We have then set up AWS SNS to send an email with the resulting prediction. A DynamoDB table could also be used in AWS to receive this data as well to do further processing.

Hardware (Soracom S+ Camera)

  • Raspberry Pi
  • Raspberry Pi Camera
  • Cellular LTE Hat
  • Cellular Modem (Mini PCIe
  • Cellular Antenna
  • Enclosure
  • Soracom Air SIM Card

Cloud Services

  • AWS Greengrass
  • AWS SageMaker
  • AWS Lambda
  • AWS DynamoDB
  • Soracom Funnel
  • Soracom Harvest
  • Soracom Napter
  • Soracom Lagoon

Challenges we ran into

We ran into challenges initially getting AWS IoT Greengrass deployed on our Raspberry Pi. We went through a few pain points where we needed to make sure we had the correct OS version installed and the correct version of Python.

Accomplishments that we're proud of

We are proud of how quickly and efficiently we were able to work as a team. From coming up with an idea for our project to execution of that idea, we were able to work together to accomplish our goals.

What we learned

This project has served the team as a great learning opportunity to see first hand how to incorporate products from the AWS Marketplace into our ideas.

What's next for Social Distance Detector

We would like to make better use of the technology and make the data we gather available to more people. If we can have cameras setup at different stores or parks, we can use the data to analyze the density in a location. We can create thresholds to determine if the density is high, medium or low. Using that data, we can create a website or an app that will tell you the crowd level at each store or park. Also, if a park stays at high density for a certain duration, we can set up an automated email or text message to notify the local authorities.

+ 2 more
Share this project: