MetaFormer: High-fidelity Metalens Imaging via Aberration Correcting Transformers

Byeonghyeon Lee, Youbin Kim, Yongjae Jo, Hyunsu Kim, Hyemi Park, Yangkyu Kim, Debabrata Mandal, Praneeth Chakravarthula, Inki Kim, Eunbyung ParkarXiv 2024

Abstract

Metalens is an emerging optical system with an irreplaceable merit in that it can be manufactured in ultra-thin and compact sizes, which shows great promise in various applications. Despite its advantage in miniaturization, its practicality is constrained by spatially varying aberrations and distortions, which significantly degrade the image quality. Several previous arts have attempted to address different types of aberrations, yet most of them are mainly designed for the traditional bulky lens and ineffective to remedy harsh aberrations of the metalens. While there have existed aberration correction methods specifically for metalens, they still fall short of restoration quality. In this work, we propose a novel aberration correction framework for metalens-captured images, harnessing Vision Transformers (ViT) that have the potential to restore metalens images with non-uniform aberrations. Specifically, we devise a Multiple Adaptive Filters Guidance (MAFG), where multiple Wiener filters enrich the degraded input images with various noise-detail balances and a cross-attention module reweights the features considering the different degrees of aberrations. In addition, we introduce a Spatial and Transposed self-Attention Fusion (STAF) module, which aggregates features from spatial self-attention and transposed self-attention modules to further ameliorate aberration correction. We conduct extensive experiments, including correcting aberrated images and videos, and clean 3D reconstruction. The proposed method outperforms the previous arts by a significant margin. We further fabricate a metalens and verify the practicality of our method by restoring the images captured with the manufactured metalens. Code and pre-trained models are available at https://benhenryl.github.io/Metalens-Transformer.

Introduction

Metalenses represent a paradigm shift in optical engineering, promising to replace traditional, bulky curved glass with ultra-thin metasurfaces. These surfaces utilize sub-wavelength nanostructures to manipulate light, enabling the creation of "flat" cameras for compact devices like AR/VR headsets and smartphones. However, this miniaturization introduces a significant challenge: severe, spatially varying aberrations. Unlike standard lenses where blur might be relatively uniform, metalens distortions change dramatically across the field of view, resulting in hazy, color-fringed images that traditional restoration algorithms fail to correct.

Overview of the metalens imaging pipeline: from the fabricated lens and its nanostructures to the raw aberrated capture and the high-fidelity MetaFormer restoration.

Methodology: The MetaFormer Architecture

To address the unique challenges of metalens imaging, the authors introduce MetaFormer, a Vision Transformer (ViT) framework specifically engineered for non-uniform aberration correction. The architecture features two core innovations:

Multiple Adaptive Filters Guidance (MAFG)

Rather than processing raw distorted images directly, MetaFormer uses 13 distinct Wiener filters to create a set of "pre-cleaned" guidance features. Each filter offers a different balance between noise suppression and detail preservation. A cross-attention mechanism then dynamically selects and blends these features based on the local severity of the aberration, effectively providing the network with a range of "best guesses" to refine for each specific region of the image.

Spatial and Transposed Self-Attention Fusion (STAF)

Restoring metalens images requires both global context (to fix large-scale distortions) and local precision (to recover fine textures). The STAF module runs spatial self-attention and transposed self-attention in parallel, fusing their outputs with learned weights. This allows the model to simultaneously correct broad blurs and restore high-frequency details like edges and fine lines that are typically smudged by the metalens.

Experimental Results and Validation

Quantitative Superiority

MetaFormer sets a new state-of-the-art for metalens restoration. In benchmarks involving non-uniform aberrations, the model achieved a 34.29 dB PSNR, representing a massive 6.45 dB improvement over previous baselines. It significantly outperformed general-purpose restoration transformers like Restormer, which achieved only 27.84 dB.

Real-World Hardware and 3D Reconstruction

The researchers validated their approach by fabricating a custom 500µm diameter metalens. Images captured with this physical hardware were successfully restored, demonstrating the method's practicality beyond simulation. Furthermore, the high-fidelity restoration enabled high-quality 3D reconstruction using 3D Gaussian Splatting (3D-GS), boosting the quality of reconstructed scenes from a nearly unusable 17 dB (raw) to a high-fidelity 25.5 dB (restored).

Microscopic view of the fabricated metalens and its sub-wavelength nanostructures used in real-world validation.

Conclusion

MetaFormer addresses the primary bottleneck of metalens technology: image degradation due to complex, spatially varying aberrations. By combining adaptive filtering with hybrid attention mechanisms, the framework enables high-fidelity imaging from ultra-compact optics. Future work will focus on "blind" deconvolution—where the model doesn't need prior knowledge of the lens specs—and co-designing metalenses specifically optimized for computational restoration, further pushing the boundaries of flat-lens photography.

Summary updated

BibTeX
@misc{lee2024metaformer,
  author = {Byeonghyeon Lee and Youbin Kim and Yongjae Jo and Hyunsu Kim and Hyemi Park and Yangkyu Kim and Debabrata Mandal and Praneeth Chakravarthula and Inki Kim and Eunbyung Park},
  title = {{MetaFormer: High-fidelity Metalens Imaging via Aberration Correcting Transformers}},
  year = {2024},
  eprint = {2412.04591},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.04591},
}
Figure