Abstract
Most camera lens systems are designed in isolation, separately from downstream computer vision methods. Recently, joint optimization approaches that design lenses alongside other components of the image acquisition and processing pipeline -- notably, downstream neural networks -- have achieved improved imaging quality or better performance on vision tasks. However, these existing methods optimize only a subset of lens parameters and cannot optimize glass materials given their categorical nature. In this work, we develop a differentiable spherical lens simulation model that accurately captures geometrical aberrations. We propose an optimization strategy to address the challenges of lens design -- notorious for non-convex loss function landscapes and many manufacturing constraints -- that are exacerbated in joint optimization tasks. Specifically, we introduce quantized continuous glass variables to facilitate the optimization and selection of glass materials in an end-to-end design context, and couple this with carefully designed constraints to support manufacturability. In automotive object detection, we report improved detection performance over existing designs even when simplifying designs to two- or three-element lenses, despite significantly degrading the image quality.
Introduction
Traditionally, the design of optical systems and the development of computer vision algorithms have existed in separate silos. Optical engineers focus on minimizing geometric aberrations and maximizing human-perceived image quality, typically measured by metrics like "spot size" or MTF (Modulation Transfer Function). Conversely, computer vision researchers often treat the camera as a fixed "black box" that provides images for training neural networks.
This separation creates a fundamental misalignment: what is "optimal" for a human viewer is not necessarily optimal for a machine learning model. While differentiable optics have recently emerged to bridge this gap, previous approaches were limited. They often focused solely on lens geometry (surface curves) while ignoring the discrete, categorical nature of glass materials. As shown in the comparison below, existing differentiable models often lack the ability to optimize glass materials or handle complex manufacturing constraints efficiently.
Methodology
To enable end-to-end optimization of the entire imaging pipeline, the authors developed a fully differentiable spherical lens simulation model that captures complex geometrical aberrations.
Differentiable Ray Tracing and Glass Optimization
The core of the system is a ray-tracing engine based on Snell’s Law, implemented within an automatic differentiation framework. A major technical hurdle in lens design is the discrete nature of glass catalogs (e.g., the Ohara catalog). To optimize these categorical variables using gradient-based methods, the authors introduced Quantized Continuous Glass Variables. During the backward pass, glass is treated as a continuous variable; however, it is "snapped" to the nearest real-world catalog entry during the forward pass. A "gradient step-through" operator allows the optimizer to effectively "jump" between different glass types.
Addressing Aberrations and Constraints
Lenses with significant aberrations often exhibit "pupil shift," where rays do not hit the intended aperture. The authors implemented a ray-aiming correction step to ensure accurate simulation of low-cost, high-aberration lenses. Furthermore, the system optimizes a joint loss function that combines object detection (OD) performance with manufacturing constraints, ensuring that the resulting lens designs are physically realizable by preventing lens elements from overlapping or becoming too thin.
Key Results and Insights
The researchers evaluated their pipeline using the BDD100K and Udacity Autonomous Driving datasets. The results challenge long-held assumptions in optical design.
Optical Quality vs. Task Performance
The most significant finding is that task-specific optimization can lead to lenses that perform better on AI tasks despite having objectively "worse" optical quality. For instance, an optimized lens achieved a higher Mean Average Precision (mAP) than a traditionally designed baseline, even though its average spot size was nearly double (136 μm vs 80 μm). The optimizer effectively "sacrifices" image quality in the periphery to sharpen regions where objects are most likely to appear.
Efficiency and Simplification
By allowing the optimizer to select glass materials and geometry simultaneously, the authors demonstrated that simpler, cheaper lens designs can match the performance of more complex ones. A jointly optimized two-element lens achieved 32.0 mAP on the BDD100K dataset, outperforming a baseline lens designed with traditional metrics (30.3 mAP). This suggests that end-to-end synergy allows neural networks to learn to compensate for specific hardware limitations, enabling the use of lower-cost optics in autonomous systems.
Conclusion and Future Work
This work demonstrates the power of co-designing hardware and software. By making the lens design process fully differentiable—including glass material selection—the authors have opened a new path for creating task-specific imaging systems. While currently limited to spherical surfaces, future extensions could incorporate aspheric lenses or diffractive optical elements. The ultimate goal remains the physical manufacturing and real-world validation of these "AI-first" optical systems.
Summary updated