Fisheye lenses are essential in surveillance and autonomous driving due to their massive field-of-view, but they introduce extreme radial distortion. While deep learning has made strides in "unwarping" these images, most models are brittle—they work for specific distortion levels they were trained on but fail when faced with different lens hardware or camera settings.
The Challenge of Generalization
The core challenge in fisheye rectification is generalization. Most existing models learn a fixed mapping between a distorted input and a rectified output. However, distortion varies in intensity depending on the lens. If a model trained on high-level distortion encounters a lower level, it often over-corrects, creating new artifacts.
Traditionally, solving this required either retraining for every lens or using controllable restoration techniques designed for uniform issues like noise. However, fisheye distortion is spatially varying—stronger at the edges than the center—making standard controllable methods ineffective.
Methods: The QueryCDR Framework
The authors propose QueryCDR (Query-based Controllable Distortion Rectification), a novel framework that enables controllable rectification using a single model. It introduces three main innovations:
- Distortion-aware Learnable Query Mechanism (DLQM): Instead of using a simple scalar to define rectification strength, DLQM uses learnable "queries" representing latent spatial relationships for different distortion levels. Users can interpolate between queries (e.g., $0.5 \times Q_1 + 0.5 \times Q_2$) to achieve smooth, continuous control.
- Controllable Convolution Modulating Block (CCMB): Used in high-resolution layers, these CNN-based blocks blend original features with "controlled" features to ensure local textures and sharp details are preserved during unwarping.
- Controllable Attention Modulating Block (CAMB): Based on Transformers, these blocks handle middle layers to capture long-range dependencies, which is crucial for maintaining global geometric structure.
The network follows a U-Net-like architecture and employs a two-stage training strategy: coarse-grained pre-training on a large single-distortion dataset, followed by fine-grained tuning on varying distortion levels.
Datasets and Evaluation
The model was evaluated on synthetic datasets generated from COCO and Places2, using a four-parameter polynomial model to simulate nine distinct degrees of fisheye distortion ($d_1$ to $d_9$). Real-world utility was further validated using the Woodscape dataset and other practical fisheye images.
Key Insights and Results
- Spatial Control: By using queries instead of scalars, the model applies different rectification strengths to the center versus the periphery, addressing the spatially varying nature of fisheye distortion.
- Hybrid Architecture: CCMBs preserve texture while CAMBs maintain global geometry, resulting in sharp textures and straight lines.
- Zero-Shot Interpolation: The model handles intermediate distortion levels (e.g., "Level 4.5") even if it wasn't specifically trained on them, thanks to the continuous latent space of the queries.
QueryCDR sets a new state-of-the-art, achieving an average PSNR of 20.32 dB and SSIM of 0.676 on the COCO dataset, significantly outperforming previous models like SimFIR. Qualitatively, it effectively straightens curved lines while avoiding the "wavy" artifacts common in other methods.
Limitations and Future Work
Currently, QueryCDR requires the user to provide the correct distortion level as an input. A logical next step is auto-control: developing a sub-network to automatically estimate distortion from the input image. Additionally, bridging the gap between synthetic polynomial models and complex real-world lens physics remains an ongoing challenge for the field.
Summary updated