How kugamaxx/cuke-emlb works
Main Components
• Python Bindings: The “python” directory (with its own CMakeLists.txt and “src”) compiles the core C++ algorithms into Python packages using pybind11. This allows users to run demos (e.g., demo.py, eval_denoisor.py) directly from Python.
• Configuration & Datasets: The “configs” directory contains configuration files (e.g., denoisors.py, datasets.py) that define parameters and settings for the denoising algorithms. The “data” folder provides sample event data (aedat4 files) and is structured to support benchmark evaluation.
• Evaluation Scripts: Files like “demo.py”, “eval_benchmark.py”, and “eval_denoisor.py” serve as entry points for testing, benchmarking, or running a single algorithm.
• DV Modules: Under “modules” there are folders intended to create shared libraries (.so files) that can be integrated with external DV software. This builds additional integration points depending on whether the project is compiled with “-DEMLB_ENABLE_MODULES”.
• External Dependencies: The “external” directory (and the use of submodules such as dv-toolkit) indicates reliance on third-party libraries for handling event-based data and possibly pre-/post-processing support.
Relationships and Interactions
• Data Flow: A typical workflow starts with raw event-based camera data (AEDAT4 files) stored in “data”. The evaluation scripts read these inputs and pass them to the denoising algorithms.
• Processing Layer: The central C++ processing layer contains the implementations of the various denoising techniques. Configuration parameters defined in “configs” are used to adjust algorithm behavior.
• Binding & Integration: Python wrappers in the “python” subdirectory expose the C++ algorithms, allowing the demo and evaluation scripts written in Python to invoke them. Likewise, the DV-specific modules under “modules” provide another integration interface.
• Build & Dependency Setup: The project uses CMake (CMakeLists.txt at different levels) to manage builds. Options such as “-DEMLB_ENABLE_PYTHON” and “-DEMLB_ENABLE_MODULES” let you compile either the Python bindings or the DV software modules respectively.
• External Services: Dependencies like OpenCV, Boost, Eigen, and the dv-toolkit are prerequisites. They are not only built as part of the environment but also indicate external integration points.
Architectural Patterns and Design Principles
• Modularity: Individual denoising algorithms are encapsulated in their respective modules (directory “denoisors”) enabling easy swapping and extension.
• Interoperability: With both C++ and Python interfaces and specific builds for DV integration, the design emphasizes interoperability across different environments and usage scenarios.
Including Technologies and Frameworks
• Languages: C++ (for performance-critical denoising algorithms) and Python (for ease of use in benchmarking and demo scripts).
• Build System: CMake to orchestrate the compilation process.
• Pybind11: For creating Python bindings to the C++ library.
• External Libraries: Boost, OpenCV, Eigen, OpenBLAS, and libtorch (for CUDA support) are key libraries used.
Specific Elements
• Blocks/Components with clear labels:
– Data Source: “Data (AEDAT4 files)” from the “data” folder.
– Configuration: “Configs (denoisors.py, datasets.py)”
– Core Denoising Engine: Represented by the “src” and “include/denoisors” components.
– Python Bindings: “python” layer that wraps the C++ engine.
– DV Modules: “modules” that produce shared libraries for DV software integration.
– Evaluation Scripts: “demo.py”, “eval_benchmark.py”, “eval_denoisor.py”.
– External Dependencies: Libraries and the “external/dv-toolkit”.
• Relationships:
Final Touches
• Every component is clearly labeled and that interactions (like data input, configuration, and build flows) are easy to follow.
• Architectural decisions, such as the use of pybind11 for Python bindings, and the dual build mode (script usage versus DV module compilation).