SimFIR: A Simple Framework for Fisheye Image Rectification with Self-supervised Representation Learning

Hao Feng, Wendi Wang, Jiajun Deng, Wengang Zhou, Li Li 0040, Houqiang Li

Abstract

SimFIR is a novel self-supervised framework designed to enhance fisheye image rectification by training a Vision Transformer (ViT) to recognize radial distortion patterns. By utilizing the inherent symmetry of lens distortion as a supervisory signal, the model achieves state-of-the-art performance in both image quality and processing efficiency, overcoming the limitations of traditional geometry-based and direct synthesis methods.

Introduction

Fisheye lenses are indispensable for applications requiring an ultra-wide field of view, such as autonomous driving and 360-degree surveillance. However, the extreme radial distortion they introduce—often described as "bending" the visual world—significantly complicates standard computer vision tasks like object detection and scene understanding.

Rectifying these images is a long-standing challenge. Traditional methods typically rely on detecting straight lines (plumb lines) or multi-view geometry, which often fail in complex or low-texture environments. While recent deep learning approaches attempt to estimate distortion parameters or directly synthesize rectified images, they frequently overlook a fundamental property: fisheye distortion is mathematically regular. It is radially distributed and centrally symmetrical. SimFIR leverages this geometric regularity as a primary feature for representation learning rather than just a post-processing constraint.

Methods

The SimFIR framework operates in two distinct stages, prioritizing the learning of distortion-aware representations through self-supervision.

Stage 1: Self-supervised Pre-training

Instead of relying immediately on labeled data, the authors propose a "distortion-aware" pretext task to teach the model the geometry of the lens.

  1. Patching and Shuffling: A distorted image is divided into patches. These patches are shuffled to ensure the model learns local distortion characteristics rather than absolute spatial coordinates.
  2. The "Distortion Degree" Label: Utilizing a standard fisheye model, each patch is assigned a "distortion degree" based on its radial distance from the image center. This provides a dense, geometrically grounded supervisory signal.
Illustration of distortion degree and position map used for self-supervised learning.
  1. Dual Losses:
    • Contrastive Loss (InfoNCE): The model is trained to cluster representations of patches with similar distortion degrees while separating those with different degrees. This forces the network to focus on the geometric warp rather than semantic content.
  2. Position Loss: A classification task where the model predicts the specific "ring" of distortion to which a patch belongs.

Stage 2: Fine-tuning for Rectification

The pre-trained ViT encoder is integrated into a dedicated rectification pipeline:

  • Flow Prediction Module (FPM): Rather than generating pixels directly, the FPM predicts a "backward warping flow" map. This map specifies where each pixel in the rectified output should sample its color from the distorted input.
  • Boundary Refinement Module (BRM): To address common artifacts like "sawtooth" edges or blurry boundaries, the BRM learns to sharpen these regions and mask out invalid pixels.
The two-stage SimFIR framework: (a) self-supervised pre-training and (b) fine-tuning for rectification.

Datasets and Evaluation

To facilitate training, the authors developed a large-scale synthetic dataset using original images from Place365. They applied a polynomial distortion model to generate 100,000 training and 5,000 evaluation images with varying distortion intensities. The model's robustness was further validated on real-world fisheye captures, demonstrating strong generalization beyond synthetic data.

Key Insights

  • Distortion as Supervision: By treating the physical properties of the lens as a source of free labels, SimFIR can generate virtually infinite training data for geometric representation.
  • Texture Invariance: Contrastive learning enables the model to recognize that different semantic objects (e.g., a tree vs. a building) share the same underlying geometric warp when placed at the same radial distance.
  • Warping vs. Synthesis: The results reinforce that predicting a flow field (warping) is superior to direct image synthesis. Warping preserves original textures and details, avoiding the "hallucinated" artifacts common in GAN-based methods.

Results and Performance

SimFIR establishes new state-of-the-art (SOTA) benchmarks:

  • Quantitative Accuracy: On synthetic tests, it achieved a PSNR of 22.47 and SSIM of 0.86, significantly outperforming previous methods like PCN (20.53 / 0.76).
  • Visual Quality: It reached a Frechet Inception Distance (FID) of 17.23, a major improvement over PCN (30.64), indicating much more natural-looking results.
  • Efficiency: By predicting flow fields at a fixed resolution and interpolating, SimFIR maintains high processing speeds even for 1080p images, making it more practical than heavy image-to-image translation models.

Limitations and Future Work

Currently, the model assumes the distortion center is perfectly aligned with the image center. Real-world sensor misalignment or cropping may require further robustness. Additionally, while the polynomial model is versatile, extreme "ultra-fisheye" lenses may require specialized training data. Future work may extend this self-supervised approach to other geometric tasks, such as document unwarping or wide-angle portrait correction.

Summary updated

BibTeX
@inproceedings{feng2023simfir,
  author = {Hao Feng and Wendi Wang and Jiajun Deng and Wengang Zhou and Li Li and Houqiang Li},
  title = {{SimFIR: A Simple Framework for Fisheye Image Rectification with Self-supervised Representation Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure