Automatic Social Distance Estimation From Images: Performance Evaluation, Test Benchmark, and Algorithm

Mert Seker, Anssi Männistö, Alexandros Iosifidis, Jenni RaitoharjuarXiv 2021

TL;DR

Researchers have introduced the KORTE benchmark, a new dataset and evaluation protocol designed to measure social distancing in everyday photographs rather than just fixed surveillance feeds. Alongside this, they proposed a robust algorithm that combines YOLOv4 and OpenPose to estimate 3D interpersonal distances from a single uncalibrated image, achieving a 92% detection rate with a 28.9% average distance error.

What Problem Does This Paper Address?

While the COVID-19 pandemic spurred a wave of "social distance monitoring" tools, most rely on fixed surveillance setups with pre-calibrated cameras. This approach fails when analyzing "in-the-wild" media or personal photo collections where camera angles, focal lengths, and sensor sizes vary wildly.

Furthermore, the authors argue that existing evaluation methods are flawed. Most current systems treat social distancing as a binary classification problem (safe vs. unsafe). This is too coarse for social science research (proxemics) and masks significant estimation errors—for instance, a system might correctly flag a "violation" but be off by several meters in its actual distance calculation. The field lacked a standardized benchmark with high-fidelity ground truth for single-image distance estimation.

Methods

The authors propose a multi-stage pipeline for automatic social distance estimation:

  1. Detection & Filtering: The system first runs YOLOv4 to identify bounding boxes for people. These boxes are then passed to OpenPose to extract 25 skeletal keypoints. By using both models, the system effectively filters out false positives (e.g., a backpack mistaken for a person by one model but not the other).
  2. Geometric Estimation: Using a pinhole camera model, the algorithm translates 2D pixel coordinates into 3D space. This requires two known parameters: the camera’s focal length and sensor size.
  3. Anthropometric Anchors: To solve for depth without a stereo setup, the method relies on average adult body proportions for three keypoint pairs:
  4. Pupillary distance (63 mm)
    • Shoulder width (389 mm)
    • Torso length (444 mm)
  5. Robust Selection: The algorithm assumes these body parts are parallel to the camera's sensor plane. Since this isn't always true (e.g., a person turned sideways), the system calculates distances for all three pairs and selects the one that places the person closest to the camera. This heuristic minimizes errors caused by foreshortening.

Datasets

The paper introduces the KORTE Social Distance Estimation Benchmark, which includes:

  • 96 high-resolution images: 63 outdoor (standing) and 33 indoor (sitting around tables).
  • Varied setups: Photos were taken by a professional photojournalist using two different camera models and seven focal lengths (16mm to 300mm).
  • Ground Truth: Unlike previous datasets that estimate positions from bounding boxes, KORTE features manually measured 3D coordinates for every person and camera position, using floor tiles and measuring tapes for precision.
Fig. 2: Birdseye view of the outdoor photo shoot. The ground truth locations of the people and cameras are given in blue and red dots, respectively.

Key Insights and Ideas

  • The "Closest Estimate" Heuristic: The most clever part of the algorithm is how it handles orientation. If a person turns, their apparent shoulder width in pixels decreases, which would lead the math to "push" them further away in 3D space. By always picking the estimate that places the person closest to the camera, the algorithm naturally favors the body part most parallel to the lens.
  • Torso is King: The torso length proved to be the most reliable metric for distance estimation in full-body shots because it is less affected by the person's horizontal rotation (yaw) compared to shoulders or eyes.
  • Beyond Binary Metrics: The authors advocate for Average Percentual Distance Error as a primary metric. They demonstrate that F1-scores for "safe/unsafe" classification vary wildly depending on the chosen threshold (e.g., 1m vs 2m), making them a poor proxy for actual algorithmic accuracy.

Key Results

The combined method (using eyes, shoulders, and torso) outperformed single-metric approaches:

  • Detection Rate: 92% overall.
  • Distance Accuracy: 28.9% average error across all images.
  • Environment Performance: The system was remarkably consistent between indoor (28.90% error) and outdoor (28.87% error) settings, though detection was slightly harder indoors due to occlusions from furniture.
Fig. 4: Example photos from the test dataset. The upper row has photos from the outdoor photo shoot taken from all camera positions C0 (left) to C2 (right) and the lower row has photos from the indoor photo shoot taken from all camera positions C0 (left) to C3 (right).

Limitations and Future Work

  • Metadata Dependency: The method requires knowing the focal length and sensor size. While often available in EXIF data, it limits the tool's use on images where this metadata has been stripped.
  • The "Average Adult" Assumption: The algorithm currently uses fixed body proportions. This leads to significant errors when children are in the frame. Future work could involve age/gender estimation to adaptively adjust these proportions.
  • Extreme Angles: The "parallel to sensor plane" assumption breaks down in overhead shots (high pitch angles). The authors suggest that future iterations could automatically estimate the camera's pitch to correct for these perspective distortions.

Summary updated

BibTeX
@misc{seker2021automatic,
  author = {Mert Seker and Anssi Männistö and Alexandros Iosifidis and Jenni Raitoharju},
  title = {{Automatic Social Distance Estimation From Images: Performance Evaluation, Test Benchmark, and Algorithm}},
  year = {2021},
  eprint = {2103.06759},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.06759},
}
Figure