TL;DR
This paper introduces the first deep learning-based method to automatically correct perspective distortion in near-range portraits (the "selfie" effect). By predicting a per-pixel flow map rather than fitting a 3D model, the approach successfully restores natural facial proportions and missing features like ears, significantly boosting the performance of downstream tasks like face recognition and 3D reconstruction.
What Problem Does This Paper Address?
When you take a selfie from a short distance (e.g., 25cm), the camera is much closer to your nose than to your ears. This creates perspective distortion: the nose appears disproportionately large, the face looks "squeezed," and the ears often vanish behind the head.
This isn't just a matter of vanity. These artifacts significantly degrade the accuracy of computer vision algorithms—such as facial recognition, landmark detection, and 3D face modeling—which are typically trained on "normal" portraits captured from a distance of about 1.6 meters. Previous attempts to fix this relied on fitting 3D face models to the image, but these often failed because the distortion itself made the initial 3D fitting inaccurate.
Methods
The authors propose a cascaded deep neural network that avoids the "chicken-and-egg" problem of 3D fitting. Their pipeline consists of three main stages:
- Camera Distance Prediction: Since the degree of distortion depends on how close the camera was, the system first estimates the camera-to-subject distance using a classifier.
- FlowNet: Instead of trying to synthesize a new face from scratch (which often results in blurry textures), this network predicts a distortion correction flow map. This map tells the system how to shift every individual pixel in the original image to "un-distort" the face while preserving high-frequency details like skin pores.
- CompletionNet: Warping an image based on flow often leaves "holes" or missing regions (like the ears that were occluded in the original selfie). This network uses a Generative Adversarial Network (GAN) approach to intelligently inpaint these missing features.
Finally, Laplacian blending is used to seamlessly combine the warped original pixels with the synthesized missing parts, ensuring a high-resolution, natural-looking result.
Datasets
Because no existing dataset contained pairs of distorted and undistorted portraits of the same person, the authors created two new ones:
- Synthetic Dataset: They rendered over 50,000 portrait pairs using high-fidelity 3D head scans, varying camera distances (23cm to 160cm), poses, and lighting conditions.
- Real-World "Ground Truth" Dataset: They built a custom hardware rig using a beam splitter (a half-mirror). This allowed two cameras to photograph a subject simultaneously along the same optical axis—one from a near distance (distorted) and one from a far distance (undistorted)—providing perfect pairs for evaluation.
Key Insights and Ideas
- Flow over Synthesis: By using a flow-based displacement map, the model keeps the original pixels wherever possible. This maintains the "identity" and sharp texture of the subject much better than purely generative models.
- Bypassing the 3D Model: The realization that perspective correction can be treated as a 2D warping problem (informed by distance) allows the system to handle extreme distortions where 3D morphable models would simply crash or produce "uncanny valley" results.
- Distance as a Prior: The authors found that providing the estimated camera distance as an input to the FlowNet was critical. Without it, the network struggled to learn the wide variety of possible distortions.
Key Results
The method was tested against the previous state-of-the-art (Fried et al. [25]) and showed substantial improvements:
- Quantitative Accuracy: The average intensity error was reduced from 1.28 (previous SOTA) to 0.39.
- Face Verification: Applying this undistortion as a pre-processing step improved face verification accuracy from 91.37% to 94.73% on distorted images.
- Landmark Detection: The failure rate for landmark detection on extreme portraits dropped from 9.0% to 0% after undistortion.
- 3D Reconstruction: Reconstructing a 3D head from an undistorted image resulted in significantly lower geometric error compared to using the raw distorted selfie.
Limitations and Future Work
While highly effective, the authors note a few areas for improvement:
- Lens Distortion: The current model assumes an "ideal" perspective camera and does not yet account for radial lens distortion (like the "fisheye" effect common on some wide-angle smartphone lenses).
- Temporal Consistency: The current approach processes single frames; extending it to video would require ensuring the undistortion doesn't "jitter" between frames.
- Extreme Occlusions: Very large head poses or significant occlusions (like a hand in front of the face) still pose a challenge for the CompletionNet.
Summary updated