Skip to content

DeepLens v2.3.0

Choose a tag to compare

@singer-yang singer-yang released this 22 Jun 13:41
· 93 commits to main since this release

DeepLens v2.3.0

This release unifies the lens PSF/render API across all lens types, adds automatic PSF field upsampling for high-resolution sensors, and lands a large correctness/robustness pass on the core (non-square geometry, device handling, NaN guards) backed by a substantial new test suite.

✨ Features

  • Unified lens PSF/render API across GeoLens, HybridLens, DiffractiveLens, DefocusLens, and PSFNetLens. Every lens now exposes the same canonical contract — psf(points, wvln=None, ks=PSF_KS, **kwargs), plus psf_rgb() and render() — so models are interchangeable regardless of concrete type. A new test_lens_api_conformance.py enforces the contract.
  • Automatic PSF field upsampling for large (~4000×4000) sensor resolutions, picking a sensible upsample factor instead of requiring manual tuning.

🐛 Fixes

  • Core pressure-test audit: hardened the simulation core against crashes, non-square (W≠H) sensor/wave geometry, device-placement mismatches, and performance regressions.
  • Non-square wave geometry: pixel-centred grids in ComplexWave factories now respect the [H, W] convention consistently.
  • DOE aperture shape is preserved through the hybrid/diffractive pipeline.
  • Zemax .zmx export: corrected aperture size.
  • Gradient guards: degenerate-but-legal inputs (duplicate interpolation keys, grazing rays, etc.) no longer emit NaN/inf that silently poisoned gradient-based design.

♻️ Refactors

  • ops.py merged into utils.py — the differentiable tensor ops (interp1d, grid_sample_xy, diff_float, diff_quantize) now live alongside the other utilities; deeplens/ops.py is removed.

📦 Data & Chores

  • Sensor datasets reorganized by manufacturer (datasets/sensors/<vendor>/...); added Canon EOS 5D Mark II/III and FLIR BFS sensor profiles.
  • Docs moved to a separate repository (mkdocs.yml / docs/ removed from this repo).

✅ Testing

  • Full suite green: 446 passed on CPU. New regression/coverage files: test_crash_regressions, test_device_selection, test_efficiency, test_nan_guards, test_nonsquare_wave, test_minor_cleanup, test_lens_api_conformance.

Full Changelog: v2.2.0...v2.3.0