Differentiable Sensor Layouts for End-to-End Learning of Task-Specific Camera Parameters

Hendrik Sommerhoff, Shashank Agnihotri, Mohamed Emam Saleh, Michael Moeller, Margret Keuper, Bhaskar Choubey, Andreas Kolb · Submission to ICLR 2024 · Rejected

TL;DR

Standard cameras capture the world on a uniform pixel grid, even though most computer vision tasks care far more about specific regions (like the horizon in autonomous driving) than others (like empty sky or road). This paper introduces a differentiable sensor simulation framework that learns non-uniform, task-specific CMOS pixel layouts jointly with downstream neural networks in an end-to-end manner. To prove physical feasibility, the authors validate the approach across classification and segmentation tasks and present a tape-out-ready 0.18µm CMOS integrated circuit design.

What Problem Does This Paper Address?

Modern edge AI systems face strict bandwidth, memory, and energy budgets. To reduce computational cost, vision pipelines commonly downsample high-resolution images uniformly before feeding them into deep neural networks. However, uniform downsampling treats all image regions as equally important, discarding fine details in information-dense regions while preserving redundant pixels in uniform regions.

While recent computational imaging work has explored end-to-end optical design or ISP optimization, designing task-adapted sensor silicon layouts has remained largely unexplored. Prior adaptive sampling approaches either operate as software resizers on already captured high-resolution inputs (defeating sensor-level energy savings) or generate image-dependent superpixels that cannot be manufactured as a static hardware image sensor.

Methods

The authors introduce an analytic, differentiable sensor layout formulation that models pixel geometries and their continuous image formation process:

  • Diffeomorphic Layout Parameterization: The sensor plane $S = [-1, 1]^2$ is parameterized via an invertible, bi-Lipschitz deformation map $\phi(u, \theta)$ acting on standard uniform grid pixels $U_k$. Crucially, $\phi$ preserves neighborhood topology, meaning the captured non-uniform image can be passed directly as a standard 2D tensor into off-the-shelf CNNs without requiring irregular graph neural networks.
  • Differentiable Image Formation: Pixel values are defined as irradiance integrals over deformed pixel areas $A_k(\theta)$ normalized by pixel volume $\operatorname{vol}(A_k(\theta))$.
  • Exact Analytic Gradients via Reynolds Transport Theorem: Differentiating the pixel color with respect to the layout parameters $\theta$ shifts the boundary of integration. The authors evaluate this using Reynolds transport theorem, yielding an interior radiance integral and a boundary flux integral evaluated along $\partial A_k(\theta)$. This formulation avoids requiring spatial gradients of the continuous radiance field.
  • Deformation Families: The paper evaluates two smooth mappings:
  • Rectangular ($\phi_{\text{rect}}$): Separable horizontal and vertical scaling governed by two parameters $(\theta_1, \theta_2)$, which maps cleanly to standard CMOS row/column readout circuits.
  • Curvilinear ($\phi_{\text{curv}}$): Radial deformation placing higher density in circular focal regions.
  • Loss Back-Warping for Image-to-Image Tasks: For tasks like semantic segmentation, network predictions output in the deformed coordinate frame are resampled back to the ground truth grid using $\phi^{-1}$ and nearest-neighbor interpolation before computing the supervision loss.
  • Hardware Circuit Layout: The team designed an actual 4-transistor active pixel sensor (APS) in an $0.18\mu\text{m}$ XFAB CMOS process with pixel pitches varying from $6.53\mu\text{m} \times 5.76\mu\text{m}$ up to $17.91\mu\text{m} \times 10.26\mu\text{m}$.

Datasets

The authors evaluated their pipeline on three standard public benchmarks (no new dataset was introduced):

  • MNIST: Handwritten digit classification evaluated at an ultra-low $4 \times 4$ sensor resolution.
  • Cityscapes: Autonomous driving semantic segmentation (19 classes) benchmarked at $128 \times 64$, $256 \times 128$, and $512 \times 256$ resolutions using PSPNet, SegNeXt, and DeepLabV3+.
  • CelebA: Multi-label facial attribute classification evaluated at $8 \times 8$ and $16 \times 16$ resolutions with ResNet-18.

Key Insights and Ideas

  • Preserving Topology Unlocks Standard Architectures: Because the deformation $\phi$ is bijective and continuous, neighboring pixels remain neighbors. Downstream convolutional networks process the output as a normal dense tensor without knowing the underlying pixels vary in physical size.
  • Exploiting Spatial Scene Priors: In automotive driving (Cityscapes), the learned layout concentrates small, dense pixels along the horizon line and lateral sidewalk regions, allocating coarser pixels to the road and sky.
  • Transferability Across Backbones: A layout optimized using PSPNet transferred directly to SegNeXt and DeepLabV3+ without retraining the layout, achieving substantial gains over uniform baselines. This proves the learned geometry captures dataset- and task-level spatial priors rather than overfitting to a specific network's architecture.
  • Rectangular Beats Curvilinear: Rectangular deformations consistently outperformed curvilinear variants, largely because curvilinear maps struggle to allocate density into outer corners without extreme distortion.

Key Results

  • Cityscapes Segmentation ($256 \times 128$):
  • PSPNet: Improved from 50.76 mIoU (uniform baseline) to 54.08 mIoU with learned rectangular layout ($\phi_{\text{rect}}$).
  • DeepLabV3+: Rose from 55.13 mIoU to 56.68 mIoU.
  • Critical Classes: Disproportionately boosted detection of small, distant objects—per-class IoU for rider improved by up to +7.3% and person by nearly +3%.
  • MNIST ($4 \times 4$ resolution): Digit classification accuracy jumped from 83.63% (uniform) to 90.90% (learned layout), concentrating pixels in the center of the image frame.
  • CelebA ($8 \times 8$ resolution): Attribute accuracy increased modestly from 86.60% to 87.19% ($\theta = (0.32, 0.08)$).

Limitations and Future Work

  • Dependence on Spatial Bias: Non-uniform sensor layouts only provide value when the downstream task exhibits consistent spatial statistics. Datasets lacking spatial bias (e.g., arbitrary unconstrained photography) will not benefit.
  • Expressiveness of Deformation Functions: The evaluated parameterizations use low-dimensional formulations (e.g., 2 parameters for $\phi_{\text{rect}}$), which cannot capture highly localized, complex spatial patterns.
  • Hardware and Sensor Physics Constraints: Larger pixels capture more photons and have different saturation capacities and dynamic ranges compared to smaller pixels. While the authors propose adaptive dual-sampling integration times to counteract varying full-well capacities, fully integrating circuit noise, lens distortion, and optical vignetting into the differentiable simulator remains future work.

Summary updated

BibTeX
@misc{sommerhoff2023differentiable,
  author = {Hendrik Sommerhoff and Shashank Agnihotri and Mohamed Emam Saleh and Michael Moeller and Margret Keuper and Bhaskar Choubey and Andreas Kolb},
  title = {{Differentiable Sensor Layouts for End-to-End Learning of Task-Specific Camera Parameters}},
  year = {2023},
  eprint = {2304.14736},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.14736},
}
Figure