TL;DR
Counting platform crowds from a moving train is notoriously difficult due to severe perspective shifts and camera ego-motion. Phys-3D addresses this by embedding first-principles 3D pinhole camera geometry and train deceleration priors directly into a Kalman filter tracking state. By tracking heads in 3D space rather than 2D pixels, this framework slashes crowd-counting errors on railway platforms to just 2.97% in real time.
What Problem Does This Paper Address?
Accurate crowd counting on railway platforms is vital for passenger safety and efficient train scheduling. While traditional surveillance relies on static, platform-mounted cameras, these systems suffer from limited coverage and severe occlusions. Moving the camera onboard an arriving train provides a forward-looking view of the entire platform, but introduces a host of new computer vision challenges:
- Ego-motion and Deceleration: As the train brakes, the camera undergoes strong negative acceleration. Traditional 2D trackers mistake this camera-induced apparent motion for actual pedestrian movement, causing tracking trajectories to drift and fail.
- Extreme Scale Variation: Distant passengers appear tiny but rapidly scale up as the train approaches.
- Dense Occlusions: In crowded stations, passengers constantly block one another, leading to fragmented tracking paths and duplicate counts.
Existing tracking-by-detection methods (like standard DeepSORT) assume static cameras or linear 2D motion models, making them highly unreliable under these dynamic conditions.
Methods
The authors introduce an end-to-end detect–track–analyze pipeline designed to run in real time on edge hardware.
1. Head-Based Detection & Encoding
Instead of tracking full bodies, which are easily occluded in dense crowds, the system focuses exclusively on human heads. It uses a YOLOv11m detector optimized via two-stage transfer learning. For temporal association, an EfficientNet-B0 network extracts a 128-dimensional appearance embedding from each detected head, allowing the system to re-identify passengers even after brief occlusions.
2. Phys-3D: Physics-Constrained 3D Tracking
The core innovation is the Phys-3D Kalman filter. Instead of tracking the 2D bounding box coordinates $(x, y, a, h)$ in image space, Phys-3D maintains an internal state vector in 3D world space:
$$\mathbf{x}_{\text{Phs3D}} = [X, Y, H, Z, \dot{Z}, \ddot{Z}]^T$$
Where:
- $(X, Y)$ is the person's position on the platform relative to the train.
- $H$ is the head height (assumed to be a constant prior of 0.3 meters in 3D).
- $Z, \dot{Z}, \ddot{Z}$ represent the distance, velocity, and deceleration of the train relative to the passenger.
By using standard pinhole camera geometry, the tracker maps 2D bounding box changes directly to 3D spatial dynamics. Because a person's physical head size remains constant in 3D space, modeling the tracking state this way naturally decouples true pedestrian movement from the train's ego-motion.
3. Virtual Counting Band with Persistence
To convert trajectories into stable counts without the fragility of traditional "line-crossing" triggers, the authors implement geography-anchored Virtual Counting Bands.
A passenger is only counted if their trajectory persists within a designated spatial buffer zone near the image borders for at least $N$ consecutive frames ($N=2$ in their final setup). This temporal persistence window smooths out detection jitter and temporary occlusions.
Datasets
To train and evaluate their system, the authors compiled a comprehensive multi-modal dataset ecosystem:
- Public Datasets: Used CrowdHuman for detector pre-training, alongside sampled subsets from rail-specific datasets like OSDaR 2023 and RailEye3D.
- RailwayPlatformCrowd: A new dataset created by the authors containing 1,660 images and 5,831 manually annotated head bounding boxes across 60 different railway platform scenes.
- MOT-RailwayPlatformCrowdHead (MOT-RPCH): A newly released benchmark specifically for continuous trajectory tracking. It consists of 27 video sequences (24,788 frames, 89,087 bounding boxes, and 885 unique identities) capturing diverse illumination, crowd densities, and occlusion levels from a train's viewpoint.
Key Insights and Ideas
- The Power of 3D State Representation: Shifting the tracking problem from 2D pixel space to 3D physical space allows the system to enforce geometric constraints that are impossible in 2D. For example, scale changes in the image plane are bounded by the physical laws of perspective projection and the train's braking profile.
- Heads Over Bodies: In high-density transit environments, head-based tracking provides significantly higher visibility and localization stability than full-body detection, which degrades rapidly under partial occlusions and motion blur.
- Bands Beat Lines: Traditional line-crossing counting methods are highly brittle when subjected to camera shake or tracking losses. Replacing lines with spatial zones and a temporal persistence window drastically reduces duplicate counts caused by identity switches.
Key Results
The authors evaluated Phys-3D against standard 8D constant-velocity (CV-8D) and 12D constant-acceleration (CA-12D) baselines on the MOT-RPCH dataset:
- Counting Accuracy: Phys-3D achieved a Mean Absolute Percentage Error (MAPE) of 2.97%, vastly outperforming the CV-8D baseline (14.59%) and the CA-12D baseline (6.99%).
- Tracking Stability: It achieved a Multiple Object Tracking Accuracy (MOTA) of 67.19% and an Identity F1 Score (IDF1) of 76.32%, maintaining stable identity preservation with an average of only 24.5 identity switches.
- Efficiency: Through ablation studies on the ReID component, the authors found that an input resolution of $128 \times 128$ pixels sits on the optimal Pareto frontier, delivering 69.5 FPS inference on an NVIDIA T4 GPU at just 9 MFLOPs.
Limitations and Future Work
Despite its strong performance, the authors note that the current MOT-RPCH dataset lacks extreme environmental conditions, such as nighttime illumination or adverse weather (heavy rain, snow), which could degrade visual head detections.
To address this, future work will focus on expanding data diversity via domain randomization and simulation-based pre-training. Additionally, the authors plan to explore multi-modal sensing—integrating LiDAR, radar, or thermal imaging—to ensure all-weather reliability and extend the system to multi-camera fusion across the entire train.
Summary updated