Infrared sea surface target detection method based on global and local fusion attention
The infrared sea surface target detection method through global and local fusion attention, combined with the GLFA-Block module and the adaptive multi-scale feature fusion encoder, solves the problem of feature extraction in infrared sea surface target detection and achieves more accurate and stable infrared sea surface target detection. .
Patent Information
- Application Number
- CN202410806688.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing infrared sea surface target detection methods are difficult to effectively extract the characteristic information of infrared targets when dealing with complex environments such as dense fog and sea clutter, resulting in limited detection accuracy and stability, especially when the target scale changes greatly during long-distance imaging. , increasing the occurrence of false detections and missed detections.
An infrared sea surface target detection method based on global and local fusion attention is used to extract deep features through the GLFA-Block module composed of a global and local information extraction unit, an information fusion unit and a multi-layer perceptron, and combined with an adaptive multi-scale feature fusion encoder , capture the global context and local detail information of the image, realize the fusion of multi-scale features and convert the decoder into target detection results.
It improves the feature extraction capability of infrared sea surface targets, enhances detection accuracy and stability, can better handle infrared sea surface targets in complex marine environments, and improves detection accuracy and stability in complex environments.
Smart Images

Figure CN118644663A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to an infrared sea surface target detection method based on global-local fusion attention. Background Art
[0002] With the continuous increase in maritime activities and the rapid development of maritime trade, marine safety issues have become the focus of international attention. Infrared sea surface target detection technology has shown great application potential in the maritime field due to its reliable nighttime detection capability, longer detection distance and all-weather working characteristics. The introduction of this technology will significantly improve the efficiency of maritime safety management and provide strong technical support for maritime navigation safety, maritime rescue, environmental monitoring and coastline monitoring.
[0003] Although infrared sea surface target detection technology has many advantages, it still faces many challenges in practical applications. Factors such as dense fog and sea clutter may lead to limited feature information, blurred edges, and lack of texture details in infrared target images, which increases the difficulty of detection. In addition, the vast sea area causes the scale of targets in infrared images to vary greatly. Especially in long-distance imaging, many targets will become small targets, increasing the occurrence of false detection and missed detection.
[0004] In view of the above-mentioned difficulties in infrared sea surface target detection, deep learning-based infrared sea surface target detection methods usually introduce attention mechanisms to enhance the salient features of infrared targets and suppress background noise to enhance target information. However, existing attention mechanisms, such as squeeze excitation (SE) channel attention and convolutional block attention module (CBAM), have limited detection accuracy and stability when applied to infrared sea surface target detection. SE channel attention uses global average pooling to extract channel weight information of the image to strengthen the target feature channel and suppress redundant channels. However, the local details of the spatial position are ignored, which hinders the enhancement of infrared target features. CBAM enhances image feature representation from both channel and spatial dimensions. However, when processing channel and spatial attention information, CBAM faces the problem of information alignment, which limits the infrared feature extraction capability. Summary of the invention
[0005] The purpose of the present invention is to provide an infrared sea surface target detection method based on global-local fusion attention to improve feature extraction capability and realize accurate target detection.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] An infrared sea surface target detection method based on global-local fusion attention includes the following steps:
[0008] Obtain infrared sea surface images for preprocessing;
[0009] The preprocessed infrared sea surface image is input into the backbone network based on global-local fusion attention to perform deep feature extraction and obtain multi-scale feature information;
[0010] Inputting the multi-scale feature information into an adaptive multi-scale feature fusion encoder for intra-scale interaction and adaptive cross-scale fusion to obtain multi-scale fusion feature information;
[0011] Query selection is used to select fused feature information from multi-scale fused feature information as an initial object query, and a decoder is used to convert the initial object query into a target detection result.
[0012] Furthermore, the pre-processing step comprises:
[0013] The infrared sea surface image is adaptively scaled to transform the size into a uniform length and width.
[0014] Furthermore, the backbone network based on global local fusion attention includes a Stem module, a GLFA-Block module and a DWConv module. The backbone network based on global local fusion attention adopts 5 stages to perform deep feature extraction to obtain multi-scale feature information. The specific steps include:
[0015] Based on the preprocessed infrared sea surface image, using the Stem module to perform the first stage of deep feature extraction and output the first stage of feature information;
[0016] Based on the feature information of the first stage, the GLFA-Block module is used to extract the deep features of the second stage, and the feature information of the second stage is output;
[0017] Based on the feature information of the second stage, the DWConv module and the GLFA-Block module are used in sequence to extract the deep features of the third stage, and the feature information of the third stage is output;
[0018] Based on the feature information of the third stage, a DWConv module and two GLFA-Block modules are used in sequence to perform deep feature extraction of the fourth stage, and the feature information of the fourth stage is output;
[0019] Based on the feature information of the fourth stage, the DWConv module and the GLFA-Block module are used in sequence to extract the deep features of the fifth stage, and the feature information of the fifth stage is output;
[0020] The feature information of the third stage, the feature information of the fourth stage and the feature information of the fifth stage are used as the multi-scale feature information.
[0021] Furthermore, the GLFA-Block module is a residual network structure, and the execution steps of each GLFA-Block module include:
[0022] Perform multiple consecutive convolution residual operations on the input feature information, and merge the channels of the operation results to obtain feature channel information;
[0023] The feature channel information is compressed through multiple convolution operations, and the GLFA submodule is used to simultaneously obtain and output the global and local feature information.
[0024] Furthermore, the GLFA submodule includes a global-local information extraction unit, an information fusion unit and a multi-layer perceptron, and the execution steps of the GLFA submodule include:
[0025] Based on the global-local information extraction unit, an adaptive global average pooling operation is used to extract global feature information, and adaptive local average pooling operations of different scales are used to extract local feature information. The expressions of the adaptive global average pooling operation and the adaptive local average pooling operation are respectively:
[0026] G=P(X,1)
[0027] L1=Conv(P(X,2))
[0028] L2=Conv(P(X,4))
[0029] Where G is the global feature information, P(·,·) is the adaptive average pooling operation, the number 1 indicates that the two-dimensional image feature is converted into one-dimensional data, X is the input image feature, L1 and L2 are the local feature information, Conv(·) indicates the convolution operation, and the numbers 2 and 4 indicate that the feature information is converted into 2×2 and 4×4 dimensions respectively;
[0030] Based on the information fusion unit, the global feature information and the local feature information are converted into one-dimensional channel data, and stacking and scaling are performed to achieve the fusion of the global feature information and the local feature information, so as to obtain the fused global and local feature information. The expression of the fused global and local feature information is:
[0031] T=Cat(Res(G),Res(L1),Res(L2))
[0032] Where T is the fused global and local feature information, Res(·) is the feature size adjustment, and Cat(·) represents the feature channel connection operation;
[0033] The fused global and local feature information is processed by the multilayer perceptron to obtain the final global and local feature information. The final global and local feature information is expressed as follows:
[0034]
[0035] Where S is the final global and local feature information, FC(·) represents the fully connected operation of the fully connected layer, δ(·) represents the ReLU activation function, and σ(·) represents the Sigmoid function. Represents channel-by-channel multiplication.
[0036] Furthermore, the adaptive multi-scale feature fusion encoder includes an IFIA module and an adaptive feature fusion module, the IFIA module performs intra-scale interaction on the input multi-scale feature information to obtain interactive multi-scale feature information, and the adaptive feature fusion module performs adaptive cross-scale fusion on the interactive multi-scale feature information to obtain multi-scale fusion feature information.
[0037] Furthermore, the IFIA module adopts a multi-head attention mechanism to obtain multi-scale feature information of the interaction during the intra-scale interaction, and the specific operation is as follows:
[0038] Q l =K l =V l =Flatten(S l )
[0039] A l =Reshape(Attn(Q l ,K l ,V l ))
[0040] In the formula, A l is the feature information of the first layer after interaction, Attn(·) represents the multi-head self-attention mechanism, and Reshape(·) represents restoring the feature shape to the same shape as S l The characteristics are consistent, S l is the input layer l feature information, Flatten(·) is the inverse operation of Reshape(·), Q l To query the content, K l is the candidate keyword, V l For actual information.
[0041] Furthermore, the adaptive feature fusion module adopts a training-based method to determine the best fusion strategy and adaptively fuses features at different levels. The specific fusion operation is:
[0042] El =α l ·F 3→l +β l ·F 4→l +γ l ·F 5→l
[0043]
[0044] In the formula, E l Represents the l-layer fusion feature information after multi-scale feature fusion; α l , β l and γ l Represents the adaptive weights learned by network training, adaptively integrating feature information of different scales to satisfy α l ,β l ,γ l ∈[0,1] and α l +β l +γ l =1 condition, α l , β l and γ l The weights are and The softmax function with parameters is obtained. The parameters are back-propagated from the multi-scale feature information {F3, F4, F5} through convolution operations; F n→l It represents the feature information of layer n mapped to layer l, n,l∈{3,4,5}. The mapping operation includes upsampling and downsampling, and the purpose is to align the scale of the features.
[0045] Furthermore, the decoder is composed of multiple layers of stacked Transformer layers, each of which associates the initial object query with multi-scale fused feature information, and further processes it using a self-attention mechanism, and finally outputs a target detection result.
[0046] Furthermore, the target detection result includes the category, bounding box coordinates and confidence level of the infrared sea surface target.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] (1) Through the global-local fusion attention mechanism, the present invention can simultaneously capture the global context information and local detail information in the infrared sea surface image, enhance the edge and texture details of the infrared target, improve the feature extraction capability of the infrared sea surface target, and then achieve more accurate identification and positioning of the infrared sea surface target through multi-scale fusion and decoding.
[0049] (2) The present invention adopts a backbone network based on global-local fusion attention to perform deep feature extraction, which can simultaneously focus on global structural information and local detail information, enhance the edge features of infrared targets, and improve the accuracy and stability of infrared sea surface target detection. The GLFA submodule obtains multi-scale local information by using adaptive average pooling of different scales. In order to enhance the contextual detail information ignored by the block-based local average pooling operation, GLFA introduces convolution operations to enhance the information interaction between blocks, enhance the information exchange between different local areas, and further improve the adaptability of the model to complex infrared sea surface environments.
[0050] (3) The present invention can adaptively adjust the fusion weight according to the feature information of different scales through the adaptive multi-scale feature fusion encoder, so that the model can better handle infrared sea surface targets of different sizes.
[0051] (4) The present invention can improve the accuracy and stability of infrared sea surface target detection in complex marine environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0053] Figure 2 The overall network structure diagram of the present invention;
[0054] Figure 3 It is a structural diagram of the GLFA-Block module of the present invention;
[0055] Figure 4 It is a structural diagram of the GLFA submodule of the present invention;
[0056] Figure 5 It is the IFIA module structure diagram of the present invention;
[0057] Figure 6 It is a comparison chart of the test results of the present invention. DETAILED DESCRIPTION
[0058] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0059] This embodiment provides an infrared sea surface target detection method based on global-local fusion attention, the method comprising: extracting target features of different scales from infrared sea surface images through a backbone network based on global-local fusion attention. Global-local fusion attention consists of global-local information extraction, information fusion and multi-layer perception. An inter-block information exchange module is added after each local information extraction. The backbone network outputs features of different scales as input to an adaptive multi-scale feature fusion encoder. The adaptive multi-scale feature fusion encoder fully fuses multi-scale infrared feature information through intra-scale interaction and adaptive cross-scale fusion. Query selection is used to select features from the encoder output as the initial object query, and the decoder converts the initial object query into a target bounding box and classification confidence. Figure 1 As shown, the specific steps of this method are:
[0060] Step 1: Obtain infrared sea surface images for preprocessing.
[0061] The infrared sea surface images are collected by ship-borne, airborne or shore-based infrared thermal imagers. The collected infrared sea surface images are adaptively scaled to transform the image size into a uniform length and width.
[0062] Step 2: Input the preprocessed infrared sea surface image into the backbone network based on global-local fusion attention for feature extraction to obtain multi-scale feature information.
[0063] The infrared sea surface image is extracted from different levels of deep feature information through a backbone network based on global local fusion attention. The backbone network based on global local fusion attention (GLFA) is mainly composed of the Stem (stem network) module, the GLFA-Block module and the DWConv (depthwise separable convolution) module, such as Figure 2 The backbone network is divided into five stages. The output feature size of the first stage is 1 / 4 of the original image size, and the output feature size of the remaining stages is 1 / 2 of the input feature of the stage. The feature information output by the third, fourth, and fifth stages is used as the input of the adaptive multi-scale feature fusion encoder.
[0064] The GLFA-Block module is a component of the backbone network for global and local fusion attention. It is a residual network structure, such as Figure 3 As shown in the figure, the GLFA-Block module first performs 6 consecutive convolution residual operations on the input features with a convolution kernel of K and a step size of 1, and merges the output features to obtain feature channel information; secondly, it compresses the feature channel information through 2 convolution operations; finally, the GLFA submodule is used to simultaneously obtain global and local feature information to enhance the infrared target feature information.
[0065] The GLFA submodule is mainly composed of a global local information extraction unit, an information fusion unit and a multi-layer perceptron. Figure 4 The specific operation process of the GLFA submodule is as follows:
[0066] (1) The global information extraction unit adopts a global average pooling operation, and the specific operation is as follows:
[0067] G=P(X,1)
[0068] Among them, P(·,·) is the adaptive average pooling operation, and the number 1 means converting the two-dimensional image features into one-dimensional data. is the input image feature.
[0069] By using adaptive average pooling of different scales, multi-scale local information is obtained. In order to enhance the contextual detail information ignored by the block-based local average pooling operation, a convolution operation is introduced to enhance the information interaction between blocks. The specific operations are as follows:
[0070] L1=Conv(P(X,2))
[0071] L2=Conv(P(X,4))
[0072] Conv(·) represents a convolution operation, and the numbers 2 and 4 represent the conversion of feature information into dimensions of 2×2 and 4×4, respectively.
[0073] (2) The information fusion unit first converts the global and local information features into one-dimensional channel data; then, the channel stacks the scaled feature information to achieve the fusion of global and local information, as follows:
[0074] T=Cat(Res(G),Res(L1),Res(L2))
[0075] Among them, Res(·) is the feature size adjustment, and Cat(·) represents the feature channel connection operation.
[0076] (3) The fused features are passed through a multi-layer perceptron to capture the complex relationship between channels and calculate the weight of each channel. Then, each channel of the input feature is multiplied by the corresponding weight and summed to obtain the final output result:
[0077]
[0078] Among them, the multilayer perceptron consists of two fully connected layers, denoted by FC(·); δ(·) represents the ReLU activation function; σ(·) represents the Sigmoid function; Represents channel-by-channel multiplication.
[0079] Step 3: Input the multi-scale feature information into an adaptive multi-scale feature fusion encoder for intra-scale interaction and adaptive cross-scale fusion to obtain multi-scale fusion feature information.
[0080] The adaptive multi-scale feature fusion encoder includes an IFIA (Intra-scale Feature Interaction Attention) module and an adaptive feature fusion module. The IFIA module is first used to perform intra-scale interaction on the input multi-scale features {S3, S4, S5} to obtain multi-scale features {A3, A4, A5}; then, based on the adaptive feature fusion module, a bottom-up, top-down and horizontally connected multi-scale feature fusion method is used to obtain multi-scale features {F3, F4, F5}; finally, adaptive cross-scale fusion is performed to obtain the output {E3, E4, E5}, as shown in Figure 2 shown.
[0081] Specifically, the encoder’s scale interaction uses the IFIA module to perform scale information interaction on the input features of different scales {S3, S4, S5} to obtain multi-scale features {A3, A4, A5}. The IFIA module uses a multi-head self-attention mechanism to enrich the semantic feature information and capture the relevant connections within the features, such as Figure 5 As shown, the specific operations are:
[0082] Q l =K l =V l =Flatten(S l )
[0083] A l =Reshape(Attn(Q l ,K l ,V l ))
[0084] Among them, Attn(·) represents the multi-head self-attention mechanism, and Reshape(·) represents restoring the feature shape to the same shape as S. l The features are the same. Flatten(·) is the inverse operation of Reshape(·). l , K l 、V l Representing query, key and value respectively, they are used for attention calculation between feature maps at the same scale.
[0085] The adaptive feature fusion of the encoder performs multi-scale feature fusion on the multi-scale features {F3, F4, F5} through the adaptive feature fusion module to obtain the multi-scale features {E3, E4, E5}, as shown in Figure 2As shown in the figure, the adaptive feature fusion module determines the best fusion strategy based on the training method and adaptively fuses features at different levels. The specific fusion operation is as follows:
[0086] E l =α l ·F 3→l +β l ·F 4→l +γ l ·F 5→l
[0087] Among them, E l F represents the feature information of layer l after multi-layer feature fusion; n→l Represents the feature information of n-layer feature mapping to l-layer, where n,l∈{3,4,5}; the mapping operation includes upsampling and downsampling, the purpose is to align the scale of the feature; α l , β l and γ l Represents the adaptive weights learned by network training, adaptively integrating feature information at different levels to meet α l ,β l ,γ l ∈[0,1] and α l +β l +γ l =1 condition.
[0088] α l , β l and γ l The weights are and The softmax function with parameters is obtained, where α l The weight is expressed as:
[0089]
[0090] β l and γ l Represents α l Similar to, The parameters are back-propagated from the multi-scale feature information {F3, F4, F5} through convolution operations.
[0091] Step 4: Use query selection to select fused feature information from the multi-scale fused feature information as an initial object query, and use a decoder to convert the initial object query into a target detection result.
[0092] The decoder consists of multiple stacked Transformer layers. Each layer first associates the initial object query with the feature map output by the encoder, and then uses the self-attention mechanism to further process the features. The multi-layer stacking design enables the decoder to gradually refine the initial object query and generate more accurate prediction results. In the last layer of the decoder, the category, bounding box coordinates and confidence of the infrared sea surface target are generated.
[0093] In the above embodiment, step 1 is infrared sea surface image preprocessing, step 2 is infrared sea surface target multi-scale depth feature extraction, step 3 is adaptive multi-scale feature fusion, and step 4 is to obtain infrared sea surface target category and bounding box coordinates. In the actual infrared sea surface target detection process, the sequence of step 1, step 2, step 3 and step 4 can be looped in turn to achieve target detection. In addition, this embodiment needs to train the network model in advance to better complete the target detection process.
[0094] For network training, an infrared maritime data set is used, and the data set is randomly divided into a training set, a validation set, and a test set, accounting for 80%, 10%, and 10% of the data respectively. Due to the limited number of infrared sea surface data sets, this embodiment adopts random color adjustment, random scaling, and random cropping data enhancement methods, which not only enriches the infrared sea surface data set, but also improves the effect of infrared sea surface target detection. For network training, the parameters are set to batchsize 16, the number of iterations is 200 times, the Adam optimizer is used, the basic learning rate is 0.0001, and the weight decay is 0.0001.
[0095] This embodiment performs an infrared sea surface target test on the test set. The test results are as follows: Figure 6 As shown in the figure, the left side is the recognition result of the YOLOv8 algorithm, the middle is the recognition result of the YOLOv9 algorithm, and the right side is the recognition result of this example. Compared with the YOLOv8 and YOLOv9 algorithms, this example can effectively detect infrared sea surface targets with high accuracy in scenes of similar objects, occlusion, targets of different sizes, and small targets at a long distance.
[0096] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0097] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0101] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0102] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An infrared sea surface target detection method based on global-local fusion attention, characterized in that: The following steps are involved: Obtain infrared sea surface images for preprocessing; The preprocessed infrared sea surface image is input into the backbone network based on global-local fusion attention to perform deep feature extraction and obtain multi-scale feature information; Inputting the multi-scale feature information into an adaptive multi-scale feature fusion encoder for intra-scale interaction and adaptive cross-scale fusion to obtain multi-scale fusion feature information; Query selection is used to select fused feature information from multi-scale fused feature information as an initial object query, and a decoder is used to convert the initial object query into a target detection result.
2. The infrared sea surface target detection method based on global-local fusion attention according to claim 1 is characterized in that: The pre-processing step comprises: The infrared sea surface image is adaptively scaled to transform the size into a uniform length and width.
3. The infrared sea surface target detection method based on global-local fusion attention according to claim 1 is characterized in that: The backbone network based on global local fusion attention includes a Stem module, a GLFA-Block module and a DWConv module. The backbone network based on global local fusion attention uses 5 stages to perform deep feature extraction to obtain multi-scale feature information. The specific steps include: Based on the preprocessed infrared sea surface image, using the Stem module to perform the first stage of deep feature extraction and output the first stage of feature information; Based on the feature information of the first stage, the GLFA-Block module is used to extract the deep features of the second stage, and the feature information of the second stage is output; Based on the feature information of the second stage, the DWConv module and the GLFA-Block module are used in sequence to extract the deep features of the third stage, and the feature information of the third stage is output; Based on the feature information of the third stage, a DWConv module and two GLFA-Block modules are used in sequence to perform deep feature extraction of the fourth stage, and the feature information of the fourth stage is output; Based on the feature information of the fourth stage, the DWConv module and the GLFA-Block module are used in sequence to extract the deep features of the fifth stage, and the feature information of the fifth stage is output; The feature information of the third stage, the feature information of the fourth stage and the feature information of the fifth stage are used as the multi-scale feature information.
4. The infrared sea surface target detection method based on global-local fusion attention according to claim 3 is characterized in that: The GLFA-Block module is a residual network structure, and the execution steps of each GLFA-Block module include: Perform multiple consecutive convolution residual operations on the input feature information, and merge the channels of the operation results to obtain feature channel information; The feature channel information is compressed through multiple convolution operations, and the GLFA submodule is used to simultaneously obtain and output the global and local feature information.
5. The infrared sea surface target detection method based on global-local fusion attention according to claim 4 is characterized in that: The GLFA submodule includes a global-local information extraction unit, an information fusion unit and a multi-layer perceptron. The execution steps of the GLFA submodule include: Based on the global-local information extraction unit, an adaptive global average pooling operation is used to extract global feature information, and adaptive local average pooling operations of different scales are used to extract local feature information. The expressions of the adaptive global average pooling operation and the adaptive local average pooling operation are respectively: G=P(X,1) L1=Conv(P(X,2)) L2=Conv(P(X,4)) Where G is the global feature information, P(·,·) is the adaptive average pooling operation, the number 1 indicates that the two-dimensional image feature is converted into one-dimensional data, X is the input image feature, L1 and L2 are the local feature information, Conv(·) indicates the convolution operation, and the numbers 2 and 4 indicate that the feature information is converted into 2×2 and 4×4 dimensions respectively; Based on the information fusion unit, the global feature information and the local feature information are converted into one-dimensional channel data, and stacking and scaling are performed to achieve the fusion of the global feature information and the local feature information, so as to obtain the fused global and local feature information. The expression of the fused global and local feature information is: T=Cat(Res(G),Res(L1),Res(L2)) Where T is the fused global and local feature information, Res(·) is the feature size adjustment, and Cat(·) represents the feature channel connection operation; The fused global and local feature information is processed by the multilayer perceptron to obtain the final global and local feature information. The final global and local feature information is expressed as follows: Where S is the final global and local feature information, FC(·) represents the fully connected operation of the fully connected layer, δ(·) represents the ReLU activation function, and σ(·) represents the Sigmoid function. Represents channel-by-channel multiplication.
6. The infrared sea surface target detection method based on global-local fusion attention according to claim 1 is characterized in that: The adaptive multi-scale feature fusion encoder comprises an IFIA module and an adaptive feature fusion module. The IFIA module performs intra-scale interaction on input multi-scale feature information to obtain interactive multi-scale feature information. The adaptive feature fusion module performs adaptive cross-scale fusion on the interactive multi-scale feature information to obtain multi-scale fusion feature information.
7. The infrared sea surface target detection method based on global-local fusion attention according to claim 6 is characterized in that: The IFIA module uses a multi-head attention mechanism to obtain multi-scale feature information of the interaction during the intra-scale interaction. The specific operation is as follows: Q l =K l =V l =Flatten(S l ) A l =Reshape(Attn(Q l ,K l ,V l )) In the formula, A l is the feature information of the first layer after interaction, Attn(·) represents the multi-head self-attention mechanism, and Reshape(·) represents restoring the feature shape to the same shape as S l The characteristics are consistent, S l is the input layer l feature information, Flatten(·) is the inverse operation of Reshape(·), Q l To query the content, K l is the candidate keyword, V l For actual information.
8. The infrared sea surface target detection method based on global-local fusion attention according to claim 6 is characterized in that: The adaptive feature fusion module adopts a training-based method to determine the best fusion strategy and adaptively fuses features at different levels. The specific fusion operation is as follows: E l =a l ·F 3→l +b l ·F 4→l +g l ·F 5→l In the formula, E l Represents the l-layer fusion feature information after multi-scale feature fusion; α l , β l and γ l Represents the adaptive weights learned by network training, adaptively integrating feature information of different scales to satisfy α l ,β l ,γ l ∈[0,1] and α l +β l +γ l =1 condition, α l , β l and γ l The weights are and The softmax function with parameters is obtained. The parameters are back-propagated from the multi-scale feature information {F3, F4, F5} through convolution operations; F n→l It represents the feature information of layer n mapped to layer l, n,l∈{3,4,5}. The mapping operation includes upsampling and downsampling, and the purpose is to align the scale of the features.
9. The infrared sea surface target detection method based on global-local fusion attention according to claim 1 is characterized in that: The decoder consists of multiple stacked Transformer layers, each of which associates the initial object query with multi-scale fused feature information and further processes it using a self-attention mechanism, ultimately outputting a target detection result.
10. The infrared sea surface target detection method based on global-local fusion attention according to claim 1, characterized in that: The target detection result includes the category, bounding box coordinates and confidence level of the infrared sea surface target.
Citation Information
Patent Citations
Human body abnormal behavior recognition method and system based on mixed attention mechanism
CN113516028A
Target detection model and method for pet standard behavior detection
CN115546901A
DETR model-based mining area track obstacle detection method and system
CN116311168A
Refueling taper sleeve detection method based on multi-scale variable sparse attention
CN116342701A
Pest detection method and model fusing local attention and global attention
CN117876832A
Cited By
Infrared small target detection method based on multi-scale self-attention motion background modeling
CN119478349A
An Infrared Small Target Detection Method Based on Multi-Scale Self-Attention Motion Background Modeling
CN119478349B
Marine target detection method and device based on multi-modal fusion
CN120431322A
A method and device for detecting marine targets based on multimodal fusion
CN120431322B
Infrared ship small target detection method in video stream mode based on multi-frame fusion
CN122244819A
