By combining ZED stereo cameras with Echo Dot speakers, you can build a cost-effective AI alarm system to help you maintain social distancing.
As economies gradually reopen globally, we all share a responsibility to keep up the fight against COVID-19. The concept of social distancing is one strategy to maintain safety on-site as we return to work.
For this purpose, we created at Stereolabs a new real time alarm system that combines 3D cameras and artificial intelligence to detect whether or not people are staying far enough apart.
The system works in any type of environment, from small scale office spaces to industrial environments, factories and public spaces. It can send multiple types of alerts such as sound signals, SMS, emails and even Slack notifications.
An alarm is triggered when people pass too close to one another.
One of the challenges in using regular AI cameras for social distancing is that they are not able to infer distances between people in a reliable way. We solve this issue by using a 3D camera with long-range depth perception, and run a neural network on the video and depth stream to detect people in 3D space.
ZED 2 displays visual alerts when people are too close.
We use a ZED 2 wide-angle stereo camera that we connect to a Jetson Nano AI gateway. Processing is done in real-time at the edge, ensuring low latency alerts and data privacy. We add an Amazon Echo Dot speaker to serve as alarm.
The camera detects people and distances using the 3D Object Detection module from the ZED API. Real-world spatial positions (x,y,z) are determined automatically by the 3D camera making the set-up process very easy as it doesn’t require any calibration step contrary to 2D video analytics systems.
The 3D Object Detection application generates an event when the measured distance between two persons fall below 6 feets (2 meters). This event is transmitted to another application running on the Jetson Nano and built with Node-RED which triggers a sound alert on the Echo Dot.
The Node-RED open-source rules engine is a perfect companion for 3D cameras at the edge as it allows to quickly add other types of conditions to limit the amount of voice messages, and has an extensive nodes library that can be used to send alerts such as SMS, email and Slack notifications.
These DIY alarm systems have been set-up in every Stereolabs office where team members are present. To ensure that wherever you are around the world you’re able to build your own smart alarm, we’re sharing the hardware and software used for this project. Here are the hardware and software components used for the alarm: