# Multi-Target Detection Algorithm for Fusion Images Based on an Attention Mechanism
## 3 Dataset Creation
### Fusion Result  
The image fusion result of the algorithm in this section is shown in Figure 5, where the columns from left to right are the visible-light image, infrared image, and fused image.  
In infrared and visible image fusion tasks, although existing studies often employ multiple objective evaluation metrics to comprehensively assess the fusion performance, this paper focuses on two representative indicators: Structural Similarity Index (SSIM) and entropy (EN).  
EN measures the amount of information contained in an image. A higher entropy value indicates richer information content, suggesting that the fused image effectively preserves detailed features from both the infrared and visible source images. Entropy is defined as  
\[\text{EN}=-\sum_{i=0}^{L-1}p_{i}\log_{2}p_{i} \tag{1}\]  
where  
* \(L\) is the total number of gray levels in the image;
* \(p_{i}\) is the probability of the \(i\)-th gray level, i.e., the normalized histogram of the image.  
Figure 4: Generator and discriminator loss curves during training.  
This measure quantifies the information content in the fused image. A higher entropy value suggests that the image has better information retention from both infrared and visible sources.  
SSIM evaluates the similarity between the fused image and the source images in terms of structure, luminance, and contrast. It serves as a perceptually relevant metric that reflects the structural fidelity of the fusion result. In infrared and visible image fusion tasks, SSIM is defined as follows:  
\[\text{SSIM}_{ABF}=\frac{1}{2}(\text{SSIM}_{AF}+\text{SSIM}_{BF}) \tag{2}\]  
Here, \(\text{SSIM}_{AF}\) denotes the structural similarity between the source image \(A\) and fused image \(F\), and \(\text{SSIM}_{BF}\) denotes the similarity between the source image \(B\) and fused image \(F\).  
The SSIM between two images is calculated as  
\[\text{SSIM}_{AF}=\frac{(2\mu_{A}\mu_{F}+C_{1})(2\sigma_{AF}+C_{2})}{(\mu_{A}^{2 }+\mu_{F}^{2}+C_{1})(\sigma_{A}^{2}+\sigma_{F}^{2}+C_{2})} \tag{3}\]  
\[\text{SSIM}_{BF}=\frac{(2\mu_{B}\mu_{F}+C_{1})(2\sigma_{BF}+C_{2})}{(\mu_{B}^{ 2}+\mu_{F}^{2}+C_{1})(\sigma_{B}^{2}+\sigma_{F}^{2}+C_{2})} \tag{4}\]  
In these equations,  
* \(\mu_{A}\), \(\mu_{B}\), and \(\mu_{F}\) are the mean intensities of images \(A\), \(B\), and \(F\) respectively;
* \(\sigma_{A}^{2}\), \(\sigma_{B}^{2}\), and \(\sigma_{F}^{2}\) are the variances of the corresponding images;
* \(\sigma_{AF}\) and \(\sigma_{BF}\) denote the covariance between image pairs \(A\), \(F\) and \(B\), \(F\) respectively;
* \(C_{1}\) and \(C_{2}\) are small constants introduced to avoid instability when denominators are close to zero. In this paper, both are set to 0 for simplification.  
SSIM takes into account luminance, contrast, and structural similarity between images. A higher SSIM value indicates better fusion performance. To validate the effectiveness of the proposed fusion method, The results are summarized in Table 3. It can be observed that the proposed method achieves higher entropy, suggesting richer information content, while maintaining competitive structural similarity compared to DIDFuse [26].  
In general, the fused image of the algorithm proposed in this section has an overall dark tone, highlighting the contour of the target information. The fused image can retain the information in the source image, such as the formation of high intensity and vehicle target information in the infrared image, and the environmental detail information in the visible-light image.  
Figure 5: Algorithm fusion results.