Real-Time Physical Distance and Crowd Density Monitoring using Computer Vision

Just as 9/11 brought about sweeping changes in how the airline industry dealt with safety protocols, many industries have been rethinking the workplace of the future in response to COVID-19. For many companies, there has already been a commitment to a monumental shift to work-from-home. For others, such as those which rely on an on-site workforce such as manufacturing, this is not an option.

This is causing employers to constantly balance the benefits and risks of their workforce. As OSHA begins enforcing workplace safety related to COVID-19, it is possible that the CDC guidelines will be considered less like recommendations and more like a baseline requirement for workplace safety during a pandemic.

So how can a manufacturer minimize workers to exposure to a global pandemic such as COVID-19 while running operations productively? The answer in part lies in re-imagining how to take advantage of existing infrastructure that is already in place. In a case study implementation with a Rhode-Island manufacturing company called WaterRower, it started with repurposing an existing security camera system as a simple first step for developing a COVID-19 mitigation response.

Manufacturing Case Study: WaterRower Inc.

Fig.1 Physical Distancing and Crowd Density Application Interface

In 2020, the CEO of WaterRower, like many other Rhode-Island manufacturers, faced one of the country’s highest state COVID-19 infectious rates and his workforce was impacted. Unlike many companies that had declining demand, fitness equipment sales remained robust during the pandemic and the desire was to keep operations open to the extent that workforce safety could be adequately maintained.

Working with OSHA, the RI Department of Health and RI Manufacturing Association, the focus was on COVID-19 mitigation – social distancing, density reduction, controlling site traffic control, and enhanced worker communications as examples. 

Social distancing (maintaining a minimum distance between people of six feet between people) has been one of the most popular and most effective of the CDC recommendations. Furthermore, crowd density reduction (limiting the number of workers in a work area) helps with social distancing adherence.

While Social Distancing is a very effective worker safety mitigation for a pandemic such as COVID-19, measuring and tracking Social Distancing and Crowd Density measures in real-time can be quite difficult. Being able to implement corrective actions and measure improved outcomes tied to worker behavior is highly desired and only possible if this challenge can be addressed. 

To meet this challenge, an analytics-driven approach was developed that consisted of the following:

  1. Repurposed existing security cameras to develop person detection models

Live video feeds of existing security cameras were used to train deep learning models (Using SAS DLPy) to detect people and perform camera calibration to physical reference markers so true physical distances could be measured between two workers.

  1. Streaming models for edge inferencing (e.g. close to the security camera system)

A streaming analytics model was developed using SAS Event Stream Processing. The Streaming model allows for connection to camera system video feeds, real-time processing of the Deep learning model, camera calibration used for distance calculations, camera geo-fencing used for crowd density calculations and social distancing / crowd density alert notifications for local storage.

  1. Edge hardware

SAS partner Supermicro provided edge optimized hardware that included GPU for AI inferencing and enough solid-state memory and local storage to handle multiple camera feeds and requirements for the local application. The SAS Streaming analytics models ran in containers on this edge optimized hardware.

  1. Local Application

A React based application framework provided an intuitive set of dashboards that allowed for tracking social distancing and crowd density alerts over time. Real-time, anonymized alerts shown on the application dashboard (Fig. 1) or on mobile device (fig. 2) provides context to situations that help area managers and the leadership team improve engineering controls and employee communications. An administrative capability was developed to allow for thresholds to be adjusted “on the fly”. This flexibility is especially important in providing the ability to tighten or ease restrictions as warranted.

Fig. 2 – Social Distancing Alert on mobile device

The case study implemented by SAS in collaboration with our partner Supermicro is described and demonstrated in more detail in a presentation delivered at SAS Global Forum 2021. We discuss in depth a real-world implementation for Water Rower Inc, a Rhode Island manufacturer of hand-crafted water rowing machines. Peter King, CEO shares his experience and benefits of this solution.

About SAS in IoT

SAS empowers organizations to create and sustain business value from diverse IoT data and initiatives, whether that data is at the edge, in the cloud, or anywhere in between. Our robust, scalable, and open edge-to-cloud analytics platform delivers deep expertise in advanced analytics – including AI, machine learning, deep learning, and streaming analytics – to help customers reduce risk and boost business performance. Learn more about our industry and technology solutions at

By Paul Venditti, IoT Principal Industry Consultant , SAS