Code restructure, decouple optics, sensor, and network#108
Merged
singer-yang merged 11 commits intomainfrom Feb 21, 2026
Merged
Code restructure, decouple optics, sensor, and network#108singer-yang merged 11 commits intomainfrom
singer-yang merged 11 commits intomainfrom
Conversation
Co-authored-by: singer-yang <25293821+singer-yang@users.noreply.github.com>
Co-authored-by: singer-yang <25293821+singer-yang@users.noreply.github.com>
…structure Redesign docs around decoupled optics/sensor/network architecture
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request reorganizes and modernizes the DeepLens codebase, focusing on modularizing the optics components, improving import structure, and enhancing documentation. The most significant changes include moving all optics-related code into a dedicated
opticssubpackage, introducing a new configuration module, updating imports throughout the codebase, and rewriting documentation to accurately reflect the new structure.Key changes:
1. Optics Package Refactor and Modularization
GeoLens,HybridLens,DiffractiveLens,PSFNetLens,DeepObj) are now located in thedeeplens/optics/subpackage, with a new__init__.pythat re-exports major classes for easier imports. (deeplens/optics/__init__.py,deeplens/optics/base.py, [1] [2]deeplens/basics.pyis renamed and split intodeeplens/optics/base.py(for theDeepObjclass) anddeeplens/optics/config.py(for configuration constants). (deeplens/optics/base.py,deeplens/optics/config.py, [1] [2]2. Import and Namespace Cleanup
deeplens.opticsor its submodules. This affects demo scripts, the main package__init__.py, and lens classes. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]3. Documentation and Readme Updates
README.md,deeplens/README.md, anddeeplens/optics/README.mdare rewritten to describe the new modular structure, clarify the purpose of each subpackage, and provide accurate file and class listings. (README.md,deeplens/README.md,deeplens/optics/README.md, [1] [2] Ff92ebd4L1)4. Device Initialization Utility
init_device()function is introduced indeeplens/__init__.pyto standardize device selection (CUDA, MPS, or CPU) for DeepLens.5. GeoLens Package Integration
geolens_pkghelper package is now properly namespaced underdeeplens.optics, and all references are updated accordingly. [1] [2]These changes collectively improve the maintainability, clarity, and usability of the DeepLens codebase.