# Spectral Information Divergence-Driven Diffusion Networks for Hyperspectral Target Detection
## 3 Proposed Method
### Double-Branch Adaptive Coarse Detection (DBACD)  
The limited availability of target spectra presents a significant challenge for deep network training. Conversely, the abundance of background samples in HSI offers new opportunities for target detection by leveraging the differences between background samples and targets. By reconstructing diverse background samples, the model effectively learns the background distribution characteristics, while the reconstructed target remains significantly different from the background samples. However, previous studies often use a fixed threshold to initially select background samples, which lacks adaptability to dataset distributions, performs poorly across different datasets, and demonstrates limited robustness. In this regard, this paper proposes a Double-Branch Adaptive Coarse Detection method, which can better divide the background samples and target samples. As shown in Figure 2, the comparison between the proposed method and the traditional coarse detection is shown. Inspired by integrated learning, this paper combines two coarse detection algorithms CEM and MF adaptively determines the threshold for separating background and target samples based on the relationship between the mean and variance of the coarse detection results. Given the input hyperspectral matrix as \(\mathcal{H}\in\mathbb{R}^{h\times w\times L}\) and a prior spectral information as \(\mathbf{d}\in\mathbb{R}^{L\times 1}\), the output value of the CEM is  
\[\mathbf{D}_{\text{CEM}}=\mathbf{w}^{\mathcal{T}}\mathcal{H}=\frac{\mathbf{d}^{ \mathcal{T}}\mathbf{R}^{-1}}{\mathbf{d}\mathbf{R}^{-1}\mathbf{d}^{\mathcal{T} }}\mathcal{H} \tag{3}\]  
where \(\mathbf{R}=(1/n\mathcal{H}\mathcal{H}^{T})\) is the inter-correlation tensor and \(\mathcal{D}_{CEM}\in\mathbb{R}^{h\times w\times 1}\). And the tensor \(\mathcal{D}_{CEM}\in\mathbb{R}^{h\times w\times 1}\) unfolds as matrix \(\mathbf{D}_{CEM}\in\mathbb{R}^{h\times w}\). CEM minimizes the filter capacity under predefined conditions by employing a FIR linear filter design. The Match Filter (MF) [54] method mainly models the background variation by using the mean vector \(\mathbf{\mu_{MF}}\) and covariance matrix \(\Sigma_{\mathbf{MF}}\). The output value of the MF, \(\mathbf{D_{MF}}\in\mathbb{R}^{h\times w}\) is:  
\[\mathbf{D}_{MF}=\frac{(\mathbf{d}-\mathbf{\mu_{MF}})^{\mathbf{T}}\Sigma_{MF}^ {-1}(\mathbf{H}-\mathbf{\mu_{MF}})}{(\mathbf{d}-\mathbf{\mu_{MF}})^{\mathbf{T }}\Sigma_{MF}^{-1}(\mathbf{d}-\mathbf{\mu_{MF}})} \tag{4}\]  
Figure 1: An illustration of the proposed HSI target detection method. These two methods have their own advantages and disadvantages, and we adopt the idea of integrated learning here, so that \(\mathbf{D}_{CEM}\) and \(\mathbf{D}_{MF}\) are jointly coarse detected in the second order. The values of pixels that are similar to the a prior spectra are highlighted by the coarse detection. However, traditional methods typically use a fixed threshold for binarization, often leading to the misclassification of numerous background samples and insufficient learning of background characteristics. This paper adopts a method to adaptively determine the threshold value based on the mean and standard deviation of the image. The threshold \(th\) is defined as \(th=\mu_{1}+3\times\sigma_{1}\), where \(\mu_{1}\) represents the mean of coarse detection map and \(\sigma_{1}\) denotes the standard deviation of the coarse detection map. The coarse detection maps processed through CEM and MF are fused using the coarse detection fusion factor \(\iota\), The fusion result is expressed as:  
\[\hat{\mathbf{D}}=\iota\times\mathbf{D}_{CEM}+(1-\iota)\times\mathbf{D}_{MF} \tag{5}\]  
where \(\hat{\mathbf{D}}\) represents the fused coarse detection map, serving as a crucial component in subsequent target detection processes. After binarizing the images generated by the two coarse detections, the target and background values converge to 1 and 0, respectively.