Reverse Perspective Network for Perspective-Aware Object Counting

Yifan Yang, Guorong Li, Zhe Wu, Li Su, Qingming Huang, Nicu Sebe

Introduction

In computer vision tasks like crowd or vehicle counting, perspective distortion remains a significant obstacle. Due to the geometry of camera capture, objects near the lens appear substantially larger than those near the horizon. Standard Convolutional Neural Networks (CNNs) typically employ fixed-size kernels (e.g., 3x3 filters), making it mathematically difficult for a single filter to accurately recognize and count a person who is 5 pixels tall in the background alongside one who is 50 pixels tall in the foreground.

Previous attempts to solve this involved "multi-column" networks with varying filter sizes or generating noisy perspective maps. However, these methods are often computationally expensive or require labor-intensive manual annotations. The Reverse Perspective Network (RPN) offers a different approach: instead of increasing model complexity, it geometrically warps the input image to normalize object sizes before they reach the counting regressor.

The Reverse Perspective Network (RPN)

The authors propose a two-stage pipeline that effectively "flattens" the 3D scene into a 2D representation where objects maintain a uniform scale, regardless of their original distance from the camera.

Comparison between the original perspective image and the warped image produced by the RPN, showing normalized object scales.

Core Components

  1. Perspective Estimator: A lightweight module that analyzes image features to predict a perspective factor ($\alpha$).
  2. Coordinate Transformer: Utilizing elliptic geometry, this component warps the image by "stretching" the compressed space near the horizon and "shrinking" the space near the lens. The result is a "Warped Image" where objects have roughly uniform scales.
  3. Unsupervised Meta-Learning: Because ground-truth perspective data is rarely available, the RPN is trained using the Reptile meta-learning algorithm. It optimizes the warping by minimizing the variance of object density across image rows, essentially learning to make the image look uniform without explicit labels.

Adversarial Residual Learning

Even with geometric normalization, extremely congested areas remain difficult to count. To address this, the authors introduced an adversarial framework. This system forces the model to "pay more attention" to regions where it consistently makes errors, effectively augmenting the ground truth during training to highlight and resolve these hard-to-count clusters.

Datasets and Evaluation

The model was evaluated on standard benchmarks like ShanghaiTech (Part A & B), WorldExpo10, and UCSD. Additionally, the authors introduced the Unmanned Aerial Vehicle Vehicle Counting (UAVVC) dataset.

Comparison of intra-frame scale variance across datasets, highlighting the extreme scale variations in the proposed UAVVC dataset.

UAVVC contains 50 scenarios and 32,770 bounding boxes, specifically designed to feature "fierce" scale variations caused by the varying altitudes and angles of drone cameras. As shown in the distribution analysis, the scale variance in UAVVC is significantly higher than in existing datasets like CARPK or PUCPR+.

Key Results and Insights

  • State-of-the-Art Performance: The RPN achieved the lowest Mean Absolute Error (MAE) on ShanghaiTech Part A (61.2) and Part B (8.1) at the time of publication.
  • Robustness to Scale: On the high-variance UAVVC dataset, the RPN significantly outperformed standard baselines like CSRNet, reducing MAE from 50.63 to 13.21 in the most challenging scenes.
  • Efficiency: By normalizing the data at the input stage, the actual counting regressor can remain a simple, single-column network, reducing overall computational overhead compared to multi-column architectures.

Conclusion

The Reverse Perspective Network demonstrates that geometric normalization is often more efficient than forcing a network to learn scale-invariance through brute force. By drawing inspiration from art styles that remove the vanishing point, the RPN provides a robust, unsupervised solution for high-accuracy object counting in complex, perspective-heavy environments.

Summary updated

BibTeX
@inproceedings{yang2020reverse,
  author = {Yifan Yang and Guorong Li and Zhe Wu and Li Su and Qingming Huang and Nicu Sebe},
  title = {{Reverse Perspective Network for Perspective-Aware Object Counting}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00443},
}
Figure