Social distancing is one of the most effective ways to slow the spread of COVID-19. Since WHO declared COVID-19 a pandemic, our team started working on the open-source Smart Social Distancing application to take a step forward to combat COVID-19. We went from idea to product in a week and released the first version of the Smart Social Distancing application in late March. Since then, we have been working hard to add new features to the Smart Social Distancing application and improve its performance to help people return to work safely.
How it works
The Smart Social Distancing application uses AI to detect social distancing violations in real-time. It works with the existing cameras installed at any workplace, hospital, school, or elsewhere.
To ensure users’ privacy, the Smart Social Distancing application avoids transmitting the videos over the internet to the Cloud. Instead, it is designed to be deployed on small, low-power edge devices that process the data locally. As mentioned by Google Developers blog, the Smart Social Distancing application uses edge devices such as Coral to monitor social distancing in real-time in a privacy preserving manner.
Furthermore, this application anonymizes the video and does not store any personal data. Only statistical information, such as the number of violations, the time and place at which each violation happened, and the distance between people in each video frame will be stored on the storage.
We have applied some model optimization techniques, such as model quantization, to deploy the pedestrian detection models on edge devices with limited memory. These optimized models can run on edge AI accelerators for real-time inference.
The Smart Social Distancing application uses some techniques to measure the real-world distances between persons in the video stream. These techniques, including a camera calibration method and two calibration-less algorithms, take the camera perspective into account to accurately calculate real-world distances.
The statistical information will be accessible to the user through a web-GUI interface. Moreover, a logger system is implemented to save the results to local storage. The statistical data can give decision-makers better insights into how social distancing guidelines are being met.
We have used Docker to containerize the Smart Social Distancing application and make it easy to run on different platforms. You can now run the Smart Social Distancing application on several devices, such as:
We have trained and tested some state-of-the-art models to detect pedestrians in the Smart Social Distancing application. You can explore different models on each device by following the Smart Social Distancing setup guide on our GitHub repository. If you want to learn more about the implementation details, check out the Smart Social Distancing tutorial on our website.