## 3 Method
### Frequency-Adaptive Fusion Module (FAF)
#### 3.1.2 Implementation Details  
The implementation of the FAF module adopts a hierarchical architecture to balance computational efficiency and expressive power. Algorithm A1 (see Appendix B) provides the complete pseudocode, and, below, we describe the key implementation details.  
**Module Architecture.** The FAF module contains four main components.  
* **Learnable Wavelet Decomposition**: A set of wavelet kernels (16 for each scale) implemented using \(3\times 3\) convolutional layers. Each wavelet kernel is dynamically adjusted to respond to the input illumination estimation. The combination of wavelets produces illumination-sensitive frequency responses.
* **Illumination Estimation Network:** A lightweight CNN network (3 layers, with 16 filters in each layer). Global average pooling followed by a single-layer MLP. The output illumination estimation range is 0.1-15 lux.
* **Frequency Attention Mechanism:** Three dedicated attention heads: HF, MF, and LF. Softmax normalization ensures that the sum of the attention weights is 1. Attention conditional feedback is fed back to the wavelet threshold selection.
* **Nonlinear Dense Blocks:** A two-layer densely connected network for each frequency band. Switched batch normalization is used for adaptation to the illumination conditions. Residual connections ensure the flow of gradients.  
**Parameter Initialization**
* To ensure convergence stability, we use the following initialization strategy: \(\alpha_{base}=2.0\), \(\beta_{base}=0.5\) (calibrated based on the physical noise model).
* The wavelet kernels are initialized using the he_normal distribution. The attention weights are initialized as a uniform distribution: \(\{A_{HF},A_{MF},A_{LF}\}=\{0.33,0.34,0.33\}\).
* The scale parameter \(\lambda\) is set to 0.1.  
**Computational Optimization.** To achieve real-time performance, we apply several optimizations. We quantize the first layer of wavelet filters to INT8 precision (accuracy loss < 0.3%). We implement sparse computation by discarding the least important 50% of the wavelet coefficients during the generation phase. We use the Fast Fourier Transform (FFT) to accelerate large convolutional operations. We apply gradient checkpointing to reduce memory usage.  
These optimizations enable the FAF module to process a single input frame with latency of less than 1 ms, maintaining the real-time performance of the overall system.  
* **Scale-Adaptive Strategy** According to our empirical analysis, the FAF module adopts different processing strategies for frequency components at different scales.  
* **High-frequency components (P4)**: Apply the strongest noise suppression (high \(\alpha_{t}\), low \(\beta_{t}\)).
* **Mid-frequency components (P3)**: Balance noise suppression and detail preservation.
* **Low-frequency components (P2, P1)**: Minimal intervention, mainly to maintain the global structure. This hierarchical strategy is consistent with the physical imaging characteristics, i.e., high-frequency noise manifests more strongly at lower scales. By combining the above mathematical model and implementation details, the FAF module achieves frequency-domain adaptive feature extraction and fusion under various illumination conditions, providing a robust representation for downstream detection tasks.