# Multi-Target Detection Algorithm for Fusion Images Based on an Attention Mechanism
## 3 Dataset Creation
### Image Collection
#### 3.1.2 Using Style Transfer Technology  
Style transfer is an image generation technique that combines the semantic content of one image with the appearance style of another to produce a new image, typically implemented using deep learning. In this paper, infrared and visible-light images differ substantially in visual characteristics. Given that visible-light images are easier to acquire,  
\begin{table}
\begin{tabular}{l c c c c c} \hline
**Dataset** & **TNO** & **Roadscene** & **Multispectral** & **M3 FD** & **LLVIP** \\ \hline Number of Image Pairs & 251 & 221 & 2999 & 4200 & 15,488 \\ Image Resolution & \(768\times 576\) & \(768\times 576\) & \(768\times 576\) & \(1024\times 768\) & \(1920\times 1080\) \\ Color Visible Light & No & Yes & Yes & Yes & Yes \\ Shooting Method & Static Horizontal & Driving Process & Driving Process & Multi-view & Surveillance \\ Number of Targets & Few & Few & Many & Many & Numerous \\ Annotated Target Files & No & No & Yes & Yes & Yes \\ \hline \end{tabular}
\end{table}
Table 2: Comparison of datasets.  
Figure 1: LLVIP dark environment dataset.  
we leverage style transfer to generate pseudo-infrared images from visible-light inputs. This approach enables the creation of additional training data to enhance model performance. During training, the style transfer process typically involves the following steps:  
* Reference image selection: A content image and a style image are selected. The content image provides the structural and semantic information, while the style image defines the visual appearance.
* Feature extraction: A pre-trained deep convolutional neural network extracts features from both images. Content features such as shapes and contours and style features such as textures and colors are captured from intermediate layers.
* Loss function definition: Two losses are defined--content loss, which measures the difference in content features, and style loss, which evaluates the similarity of style features using Gram matrix correlations.
* Optimization: The generated image is iteratively updated via gradient descent to minimize a weighted sum of the content and style losses.
* Image generation: Upon convergence, the resulting image preserves the semantic structure of the content image while exhibiting the visual style of the style image.  
We trained a Pix2 Pix [24] model to translate visible-light images into synthetic infrared-style images using a conditional GAN framework. After training, the generator produces thermal-like outputs that resemble real infrared images in appearance and structure. This approach addresses the lack of paired multimodal data and supports downstream tasks like target detection. As illustrated in Figure 2, each row shows a visible image (left), a real infrared image (middle), and a generated infrared-style image (right), enabling direct comparison. The selected scenes such as foggy weather, grasslands, and urban areas, reflect typical conditions in civilian surveillance. The results show that Pix2 Pix effectively captures thermal patterns and scene structure, proving useful for data augmentation in IR-VIS fusion.  
Figure 2: Style transfer results using Pix2 Pix.  
Using the aforementioned methods, a dataset for image fusion was constructed. It contains over 4000 pairs of visible and infrared images, featuring targets such as pedestrians, cars, and buses. The images cover various weather conditions, including daytime, dusk, and nighttime, as well as diverse backgrounds such as forest and urban scenes. The acquisition angles also vary, including vehicle-mounted frontal views, stationary frontal views, and overhead surveillance perspectives. The partial pictures are shown in Figure 3. The first row of images is infrared images, and the second row is visible-light images.  
By combining these two metrics, this paper provides a targeted evaluation of the fusion performance in terms of both information preservation and structural consistency.