DeepLens is an open-source differentiable ray tracing framework for automated optical design, end-to-end optics-network co-design, and computational photography. DeepLens enables researchers and engineers to build custom optical systems and end-to-end imaging pipelines with fully differentiable optimization.
Please contact Xinge Yang ([email protected]) for any questions, assistance, or collaboration.
- We now have a slack group. Welcome to join the discussion via this link.
- DeepLens is finall published on Nature Communications, check it here!
- We now have a WeChat group. Please contact Xinge Yang (singeryang1999) to join the discussion!
DeepLens aims to combines deep learning and optical design to create:
- More powerful optical design algorithms enhanced by deep learning.
- Next-generation computational cameras integrating optical encoding with deep learning decoding.
DeepLens differs from others in the following aspects:
- Open-source ray tracer with accuracy aligned with commercial software.
- Differentiable optimization providing outstanding design capabilities.
- Image simulation for camera sensors and image signal processing (ISP), enabling end-to-end optics-network co-design.
Additional features available via request or collaboration:
- Memory-efficient ray-tracing capable of handling millions of rays on a desktop machine, with strategies to scale up further.
- Physical optics simulation including phase and polarization tracing.
- Neural representation to represent camera lenses as networks.
- Complex optical systems including non-sequential and non-coaxial optical models.
- Large-scale optimization with multi-GPU parallelization.
Fully automated lens design from scratch. Try it at AutoLens!
Lens-network co-design from scratch using final images (or classification/detection/segmentation) as objective.
A surrogate network for fast (aberration + defocus) image simulation.
Design hybrid refractive-diffractive lenses with a new ray-wave model.
Here are two methods to use deeplens in your research:
Clone this repo and write your code inside it.
git clone deeplens
cd deeplens
python 0_hello_deeplens.py
python your_optical_design_pipeline.py
deeplens/
│
├── deeplens/
│ ├── optics/ (core functions for optical components)
| ├── network/ (image restoration and implicit representation networks)
| ├── geolens.py (refractive lensgroup using ray tracing)
| ├── diffraclens.py (diffractive lensgroup using wave propagation)
| └── your_own_optical_system.py (your own optical system)
│
├── ... (other files)
├── 0_hello_deeplens.py (main scripts)
└── your_optical_design_pipeline.py (your own optical design pipeline)
Clone the repo and install deeplens as a python package.
git clone deeplens
pip install -e ./deeplens
Then in your code:
import deeplens
lens = deeplens.GeoLens(filename='./lenses/cellphone80deg.json')
DeepLens is first developed by Dr. Congli Wang (previously named dO), then developed and maintained by Xinge Yang. If you use DeepLens in your research, please cite the corresponding papers:
- [TCI 2022] dO: A differentiable engine for deep lens design of computational imaging systems. Paper, BibTex
- [NatComm 2024] Curriculum Learning for ab initio Deep Learned Refractive Optics. Paper, BibTex
- [SiggraphAsia 2024] End-to-End Hybrid Refractive-Diffractive Lens Design with Differentiable Ray-Wave Model. Paper, BibTex
(If you donot want to list your paper here, we can remove it.)