Skip to content

DeepLens v2.5.5

Latest

Choose a tag to compare

@singer-yang singer-yang released this 30 Sep 16:03
· 8 commits to main since this release

DeepLens is a differentiable optical lens simulator for computational imaging and optical design.

This patch release:

  • F-number targets are now physical. set_target_fov_fnum sets the F-number through the ray-traced entrance pupil rather than the stop radius. set_fnum brackets the stop radius and then bisects it. It raises ValueError or RuntimeError on an invalid or unreachable target and restores the original stop radius, including stops above max_height().
  • More robust real FoV. calc_fov sweeps the field from on-axis, interpolates the first angle that reaches the sensor half-diagonal, and stops at the peak image height when the image folds back before the corner. A partly vignetted, freshly optimized lens is no longer reported with an inflated FoV.
  • Tighter geometry constraints. loss_bound samples each surface pair only over their shared radius, plus each surface's own rim, so aspheric sags are never extrapolated past a surface's aperture.
  • Ray throughput in spot analysis. analysis_spot now reports a per-field throughput, the fraction of sampled rays that reach the sensor. A lost field no longer looks like a perfect zero-radius spot.
  • Faster aspheres. Aspheric sag and its derivatives are evaluated in Horner form. Values and gradients are unchanged, checked against explicit powers for degrees 0–10 in fp32 and fp64.
  • Zemax export keeps catalog glass names. Glasses from Zemax-known catalogs export as GCAT/GLAS names. Plastics and optimized materials still export as model glass.
  • Restored lens data. datasets/lenses/camera/rf35mm_f1.8.json had been empty since it was added. It is rebuilt from US 2019/0113711 Example 1 (EFL 36.0 mm, F/1.885, 63.2° diagonal).
  • Script fixes. scripts/2_autolens_rms.py saves the curriculum result before any step that can raise, and logs the achieved FoV as diagonal degrees.
  • Fixes the dead docs badge and stale script paths in the README. Makes the test suite independent of the shell locale.

Install with Python 3.12:

python -m pip install --upgrade deeplens-core==2.5.5

For NVIDIA CUDA 12.8:

python -m pip install --upgrade deeplens-core==2.5.5 torch==2.10.0+cu128 torchvision==0.25.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128

Validation: all 672 tests passed with CUDA enabled on an NVIDIA A100 80GB using Python 3.12.14, PyTorch 2.10.0+cu128, and torchvision 0.25.0+cu128. Ruff lint/format and Twine metadata checks passed.

Full changelog