Social Distancing Detector

Detecting and analyzing social distancing violations to curb the transmission of COVID-19 as the economy restarts safely.

Challenge #4 AI4Good Applications

Inspiration

  • According to the world's largest vaccine manufacturer, it would take until the end of 2024 for the vaccines to be available to everyone in the world.
  • While non-pharmaceutical interventions help in preventing transmission, a negative impact on the economy is one of its comorbidities.
  • For instance, many small shop-owners and restaurants across the world have had little to no income for months.
  • Since COVID-19 is here to stay for long, a proper and instantaneous evaluation of NPIs is the need of the hour.
  • We have come up with a solution that measures the violation of social distancing measures across the city that would help the authorities to take relevant decisions to curb the transmission without significantly affecting the local businesses.
  • Come to think of it, our solution can be thought of as the trade-off between smooth functioning of the economy and reduced level of transmission risk.

What it does

  • Based on the video feed of streets, we build a model that detects people who are not at a safe distance from each other.
  • We measure the distance between each bounding box put around people and check the violation of social distancing.
  • Such occurrences are recorded on an hourly basis for every street. By collecting this data, we render a street map with a high risk of transmission that visualizes the areas with a high risk of transmission.
  • From the street map that is obtained, one can determine the stringency of social distancing measures to be put in place for the particular street or area to reduce the risk of transmission.
  • With this data, the authorities can release a notice regarding a particular area asking people to reduce visits over there and also suggest local businesses the safe number of customers to serve at an instance.

How we built it

  1. Firstly, we created a graph that employs an exponential function to depict the growth in new cases with and without social distancing in place.
  2. Secondly, we developed a python script to detect the violations of social distancing from the video feed of streets.
    1. Used OpenCV to detect people in the feed.
    2. Wrote an algorithm to calculate distances between bounding boxes and detect violations w.r.t. feed.
  3. The generalized data collected from the video feed is visualized to determine the areas that have a higher rate of the violation.
  4. This subliminally implants the suggestion that streets with severe violations need more stringent social distancing measures.

Challenges we ran into

  1. Finding resources to arrive at the equation to visualize the growth of new cases with and without social distancing.
  2. Detecting violation in the feed when the video is captured from different angles.
  3. Mapping the distance metric in real-life scenarios to the distance metric in the video feed.

Accomplishments that we're proud of

  1. Linking the social distancing measure to transmission risk and estimate the stringency of intervention based on the streets.
  2. Collecting the data from the video feed and visualizing it to give an idea of further risk.
  3. To be able to set the stringency of a non-pharmaceutical intervention like social distancing.
  4. Anonymization of the collected data by storing only the time and location where the violation occurred, rather than capturing people's faces who violated the social distance.

What we learned

  1. It is indeed possible to reduce the transmission risk by following the right amount of social distancing without the negative economic impact.
  2. While our solution cannot nullify the economic downturn caused by reduced mobility of people, it can certainly alleviate the negative impact on the local businesses.
  3. The data collected from the video feed is utilized to generate a map that provides a good insight in reckoning the probable transmission risk based on each street.

What's next for Pandemic Social Strategy

  1. In the future, we look forward to combining the historic data on top of mobility data to forecast the probable hotspots with confidence.
  2. Since the data is dynamic in nature, the proposed solution can be used for other purposes like infrastructure planning for testing - setting up testing booths and quarantine centers.
  3. Optimizing the stringency of closure based non-pharmaceutical interventions by deploying this solution to schools and workspaces.
  4. Using an advanced algorithm like Faster R-CNN to detect the violation of social distancing.
  5. Create a ratio from the data to measure the risk-adjusted growth of the economy.
  6. Writing scalable code :)

Built With

Share this project:

Updates