Infrared small target detection method based on bidirectional attention aggregation mechanism
By adopting the bidirectional attention aggregation mechanism and the target detection network model of Taylor center differential residual block in infrared small target detection, the problem of low detection accuracy in the existing technology is solved, and higher detection accuracy and edge information are achieved. reserve.
Patent Information
- Application Number
- CN202210658277.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-10
AI Technical Summary
Existing infrared small target detection methods based on deep learning have shortcomings in detection accuracy. In particular, the features extracted by the network are not precise and complete enough, and they lack attention to the edge of the target, resulting in low detection accuracy.
A target detection network model based on a bidirectional attention aggregation mechanism is adopted. Through the first branch and the second branch arranged in parallel, the bidirectional attention aggregation block in the first branch extracts feature information from the row and column directions, and the bidirectional attention aggregation block in the second branch extracts feature information from the row and column directions. Taylor-centered differential residual blocks aggregate edge information to form more refined and complete features to improve detection accuracy.
It effectively improves the accuracy of infrared small target detection. Experimental results show that the intersection-over-union ratio (IoU) is significantly improved and the detection accuracy is improved.
Smart Images

Figure CN114882322B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of digital image processing, and relates to a method for detecting small targets in infrared images, and specifically to a method for detecting small infrared targets based on a two-way attention aggregation mechanism, which can be used for maritime rescue. Background Art
[0002] Infrared small target detection is a technology that uses computer technology to detect targets from infrared images. Infrared small target detection has a wide range of applications, such as traffic management and maritime rescue. Compared with general target detection, infrared small targets have the following characteristics: there is a lot of noise and clutter in the background of infrared images, and the target is easily submerged in the background, resulting in low contrast and low signal-to-noise ratio; due to the long distance from the camera to the object, the infrared target usually only occupies about one to ten pixels in the image; depending on the target type, the shape and size of the target will vary in different scenes and situations. In order to detect infrared small targets, researchers have proposed several methods based on image processing and machine learning, including methods based on filtering, based on the human visual system, and based on low-rank representation. However, these traditional methods have some limitations: they cannot suppress complex background noise, resulting in high detection error rate and unstable performance.
[0003] With the success of deep learning in many fields, researchers have applied it to the field of infrared small target detection and achieved effective results. For example, the Beijing Institute of Environmental Characteristics proposed an infrared small target intelligent recognition method based on a progressive hierarchical fusion network in its patent application "Infrared small target intelligent recognition method based on progressive hierarchical fusion network" (patent application number: 202111498806.4, application publication number: CN113989474A). The method uses an adversarial neural network image fusion architecture to perform pixel-level fusion on dual-band infrared images to obtain a fused image; the network middle layer extracts deep features from the fused image to obtain a first feature; the first feature is screened and synthesized with the infrared single-band deep feature to achieve infrared data feature-level fusion to obtain a second feature; the first feature and the second feature are input into the detection module for target detection operation to obtain a first detection result and a second detection result; the network output layer assigns a credibility value to the first detection result and the second detection result through the weight factor obtained by neural network training, and performs decision-level fusion; the output obtains the infrared small target detection result. This invention has the advantage of fast calculation speed, but the features extracted by the network are not detailed and complete enough, and lack attention to the edges of the target, resulting in low detection accuracy. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides an infrared small target detection method based on a bidirectional attention aggregation mechanism, which is used to solve the problem of low detection accuracy of the existing infrared small target detection method based on deep learning.
[0005] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0006] (1) Obtain training sample set and test sample set:
[0007] Obtain K infrared images of size H×H containing different targets, and use the Sobel operator to perform edge detection on each infrared image. Then, mark the targets in each infrared image and its corresponding infrared edge image. Then, combine M infrared images and their corresponding infrared edge images, as well as the labels of each image, to form a training sample set R. 1 , the remaining KM infrared images and their corresponding infrared edge images, as well as the labels of each image, form the test sample set E 1 , where K ≥ 1000, H ≥ 256,
[0008] (2) Constructing a target detection network model O based on a bidirectional attention aggregation mechanism:
[0009] Construct a target detection network model O based on a bidirectional attention aggregation mechanism and including a first branch and a second branch arranged in parallel; the first branch includes a Stem block, a first and a second residual block, a first transposed convolutional layer, a first bidirectional attention aggregation block, a second transposed convolutional layer, a second bidirectional attention aggregation block, and a head network connected in sequence; the second branch includes three Taylor center difference residual blocks, a second Taylor center difference residual block, and a third Taylor center difference residual block connected in sequence; wherein the Stem block includes a pooling layer and multiple convolutional layers; the first residual block includes a nonlinear activation layer and multiple convolutional layers; the second residual block includes a nonlinear activation layer and multiple convolutional layers; the bidirectional attention aggregation block includes multiple bottleneck structures, multiple variable convolutional layers, and multiple nonlinear activation layers; the head network includes multiple convolutional layers; the Taylor center difference residual block includes multiple convolutional layers and multiple nonlinear activation layers;
[0010] (3) Iteratively train the target detection network model O:
[0011] (3a) The number of initial iterations is s, the maximum number of iterations is Q, Q ≥ 10000, and the target detection network model of the sth iteration is O s , and let s = 0, O s =O;
[0012] (3b) From the training sample set R 1In the above, l training samples are randomly selected as the input of the target detection network model O. The first branch and the second branch process l infrared image samples and l infrared edge image samples respectively to obtain the target detection results of l training samples.
[0013] (3c) Update the parameters of the network model based on the bidirectional attention aggregation mechanism to obtain the network model of this iteration;
[0014] (3d) Determine whether s≥S holds true. If so, obtain the trained target detection network model O*. Otherwise, set s=s+1 and execute step (3b);
[0015] (4) Obtain infrared image target detection results:
[0016] The test sample set E is used as the input of the trained target detection network model O* for forward propagation to obtain the infrared small target detection results corresponding to all test samples.
[0017] Compared with the prior art, the present invention has the following advantages:
[0018] The network model based on the bidirectional attention aggregation mechanism constructed by the present invention includes a first branch and a second branch arranged in parallel. In the process of training the model and obtaining infrared small target detection results, the bidirectional attention aggregation block in the first branch can extract the feature information of the target from both row and column directions according to low-level features to obtain more refined and complete high-level features, which is helpful to accurately locate the target. The Taylor center difference residual block in the second branch can aggregate edge information from different levels, which is helpful to retain the target edge. Experimental results show that the present invention can effectively improve the accuracy of infrared small target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart for realizing the present invention;
[0020] Figure 2 A schematic diagram of the structure of the target detection network model based on the bidirectional attention aggregation mechanism constructed by the present invention;
[0021] Figure 3 It is a schematic diagram of the structure of a bidirectional attention aggregation block according to an embodiment of the present invention;
[0022] Figure 4 Schematic diagram of the structure of the Taylor center difference residual block according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0024] Reference Figure 1, the present invention comprises the following steps:
[0025] Step 1) Obtain training sample set and test sample set:
[0026] Obtain K infrared images of size H×H containing different targets, and use the Sobel operator to perform edge detection on each infrared image. Then, mark the targets in each infrared image and its corresponding infrared edge image. Then, combine M infrared images and their corresponding infrared edge images, as well as the labels of each image, to form a training sample set R. 1 , the remaining KM infrared images and their corresponding infrared edge images, as well as the labels of each image, form the test sample set E 1 , where K ≥ 1000, H ≥ 256, In this embodiment, K=1000, M=600, and H=256.
[0027] Step 2) Construct a target detection network model O based on a bidirectional attention aggregation mechanism, whose structure is as follows Figure 2 As shown;
[0028] Construct a target detection network model O based on a bidirectional attention aggregation mechanism and including a first branch and a second branch arranged in parallel; the first branch includes a Stem block, a first and a second residual block, a first transposed convolutional layer, a first bidirectional attention aggregation block, a second transposed convolutional layer, a second bidirectional attention aggregation block, and a head network connected in sequence; the second branch includes three Taylor center difference residual blocks, a second Taylor center difference residual block, and a third Taylor center difference residual block connected in sequence; wherein the Stem block includes a pooling layer and multiple convolutional layers; the first residual block includes a nonlinear activation layer and multiple convolutional layers; the second residual block includes a nonlinear activation layer and multiple convolutional layers; the bidirectional attention aggregation block includes multiple bottleneck structures, multiple variable convolutional layers, and multiple nonlinear activation layers; the head network includes multiple convolutional layers; the Taylor center difference residual block includes multiple convolutional layers and multiple nonlinear activation layers;
[0029] The first branch: the Stem block includes the first convolutional layer, the second convolutional layer, the third convolutional layer, and the pooling layer connected in sequence; the first residual block includes the fourth convolutional layer, the first non-linear activation layer, and the fifth convolutional layer connected in sequence; the second residual block includes the sixth convolutional layer, the second non-linear activation layer, and the seventh convolutional layer connected in sequence; the bidirectional attention aggregation block includes the third branch, the fourth branch, and the fifth branch connected in parallel, wherein the third branch includes the first bottleneck structure, the first deformable convolutional layer, and the third non-linear activation layer connected in sequence, the fourth branch includes the bottleneck structure, the fifth branch includes the second bottleneck structure, the second deformable convolutional layer, and the fourth non-linear activation layer, wherein the bottleneck structure includes multiple convolutional layers, the head network includes the sixth branch, the seventh branch, and the eighth branch arranged in parallel, the sixth branch includes the eighth convolutional layer and the ninth convolutional layer connected in sequence, the seventh branch includes the tenth convolutional layer and the eleventh convolutional layer connected in sequence, and the eighth branch includes the twelfth convolutional layer connected in sequence , the thirteenth convolution layer, the specific parameters are: the convolution kernel size of the first convolution layer, the fourth convolution layer, the fifth convolution layer, the sixth convolution layer, and the seventh convolution layer is 3*3, the step size is 2, the convolution kernel size of the second convolution layer, the third convolution layer, and the tenth convolution layer is 3*3, the step size is 1, the convolution kernel size of the eighth convolution layer is 1*1, the convolution kernel size of the twelfth convolution layer is 5*5, the ninth convolution layer, the eleventh convolution layer, and the thirteenth convolution layer are all empty convolutions, the convolution kernel size is 3*3, and the expansion kernel size is 5*5. The expansion rates are 1, 3, and 5 respectively. The convolution kernel size of the first transposed convolution layer and the second transposed convolution layer is 3*3, the step size is 2, the pooling layer adopts maximum pooling, the first nonlinear activation layer and the second nonlinear activation layer are implemented using the ReLU function, the third nonlinear activation layer and the fourth nonlinear activation layer are implemented using the Sigmoid function, the convolution kernel size of the first deformable convolution layer is k*1, and the convolution kernel size of the second deformable convolution layer is 1*k, where k>1, and k=3 in this embodiment;
[0030] The structure of the bidirectional attention aggregation block in this embodiment is as follows: Figure 3 As shown;
[0031] Since low-level features usually contain details of the object that are not present in high-level features, a bidirectional attention aggregation block is designed to refine high-level features to facilitate the reconstruction of object shapes and edges. The bidirectional attention aggregation block consists of two parallel attention modules, each of which generates an attention map along one direction (i.e., row or column direction) and uses the attention map to calculate high-level features respectively. Finally, the focused features are added together as the output of the block. This process can be expressed as:
[0032] a TOAA =TOAA(a low ,a high )=a row+a column (1)
[0033] Where TOAA(·) represents the mapping function learned by the bidirectional attention aggregation block, a low and a high Represent low-level features and high-level features respectively, a row and a column Respectively represent the attention feature maps in the row and column directions, which can be obtained by the following formula:
[0034] a row =S(F r (F b (a low )))F b (a high )+F b (a low ) (2)
[0035] a row =S(F c (F b (a low )))F b (a high )+F b (a low ) (3)
[0036] Where S(·) represents the Sigmoid function, F b (·) represents a bottleneck structure, which consists of two 1*1 convolution kernels. This bottleneck structure can filter out redundant high-frequency noise while retaining useful features. r represents a deformable convolution with a kernel size of 1*k in the row direction, and F c Represents a deformable convolution with a kernel size of k*1 in the column direction. The bidirectional attention aggregation mechanism enables the network to extract shape information from two directions based on low-level features, thereby guiding the refinement of high-level features.
[0037] The second branch: the number of convolutional layers in the Taylor center difference residual block is 6, and the number of nonlinear activation layers is 3. The specific structure of the Taylor center difference residual block is the fourteenth convolutional layer, the fifth nonlinear activation layer, the fifteenth convolutional layer, the sixteenth convolutional layer, the sixth nonlinear activation layer, the seventeenth convolutional layer, the eighteenth convolutional layer, the seventh nonlinear activation layer, and the nineteenth convolutional layer connected in sequence. The specific parameters are: the convolution kernel size of the fourteenth convolutional layer, the fifteenth convolutional layer, the sixteenth convolutional layer, the seventeenth convolutional layer, the eighteenth convolutional layer, and the nineteenth convolutional layer is 3*3, and the fifth nonlinear activation layer, the sixth nonlinear activation layer, and the seventh nonlinear activation layer are all implemented by the ReLU function;
[0038] The structure of the Taylor center difference residual block in this embodiment is as follows: Figure 4 As shown;
[0039] Infrared targets are usually small and dark, and infrared images always contain a lot of noise and clutter. Low contrast and low signal-to-noise ratio make it difficult for the network to extract the complete edge information of the target. To solve this problem, the present invention designs a Taylor central difference residual block based on the Taylor central difference equation, which can aggregate edge information from different levels and help obtain fine target edges. The specific process is:
[0040]
[0041] Where u is the target that depends on the input variable x, the above formula can be rewritten as:
[0042]
[0043] The left side of the equation is defined as the change of u from step j-2 to step j+1. This process can be approximated by a neural module, denoted as δf(x). Therefore, the above formula can be rewritten as:
[0044]
[0045] Then use Δu j and Δu j-1 Indicates u j and u j-1 The residual and u j-1 and u j-2 Therefore, the above formula can be written as:
[0046]
[0047] The present invention designs a Taylor central difference residual block to implement equation (7), where δf(x) can be implemented with two convolutional layers and one ReLU layer.
[0048] Step 3) Iteratively train the target detection network model O:
[0049] Step 3a) Initialize the number of iterations to s, the maximum number of iterations to Q, Q ≥ 10000, and the target detection network model of the sth iteration is O s , and let s = 0, O s =O;
[0050] Step 3b) will be from the training sample set R 1 In the above, l training samples are randomly selected as the input of the target detection network model O. The first branch and the second branch process l infrared image samples and l infrared edge image samples respectively to obtain the target detection results of l training samples.
[0051] Step 3b1) Input the infrared image sample into the first branch, and the Stem block extracts the features of the infrared image layer by layer to obtain the feature map x 1 , the first residual block is from the feature map x 1 Extract local features x 2 , the second residual block is used for the local feature x 2 To refine, the first transposed convolutional layer is used to refine the local features x 3 Upsample to get the global feature x 4 , the first bidirectional attention aggregation block obtains the global feature x 4 Extract high-level features x 5 , and with the local feature x 2 Add to get the feature map x 6 , the second transposed convolutional layer performs the feature map x 6 Upsample to get the feature map x 7 , the second bidirectional attention aggregation block is based on the feature map x 7 Extract high-level features and obtain feature map x 8 , the feature map x 8 With the feature map x 1 Add together to get the feature map x 9 ;
[0052] Step 3b2) Input the infrared edge image sample into the second branch, and the first Taylor center difference residual block performs a calculation on the infrared edge image sample and the local feature x after refinement in the first branch. 3 Perform feature fusion, and the second Taylor center difference residual block performs feature fusion on the fused feature map x 10 and the feature map x in the first branch 6 Perform feature fusion, and the third Taylor center difference residual block performs feature fusion on the fused feature map x 11 and the feature map x in the first branch 9 Perform feature fusion to obtain the target detection results of l infrared edge image samples;
[0053] Step 3b3) The target detection results of l infrared edge image samples are passed through a nonlinear activation layer and combined with the feature map x in the first branch. 9 Perform element-by-element multiplication and add the feature map after element-by-element multiplication to the feature map x 9 Add element by element to get the feature map x 13 , the feature map x 13 Through the head network in the first branch, the target detection results of l infrared image samples are obtained.
[0054] Step 3c) updating the parameters of the network model based on the bidirectional attention aggregation mechanism to obtain the network model of this iteration;
[0055] Step 3d) Determine whether s≥S is true. If so, obtain the trained target detection network model O*. Otherwise, set s=s+1 and execute step 3b);
[0056] Step 4) Obtain infrared image target detection results:
[0057] The test sample set E is used as the input of the trained target detection network model O* for forward propagation to obtain the infrared small target detection results corresponding to all test samples.
[0058] The technical effect of the present invention can be further illustrated by the following simulation experiment:
[0059] Simulation conditions and contents:
[0060] The hardware platform of the simulation experiment is: the processor is Intel(R) Core i9-9900K CPU, the main frequency is 3.6GHz, the memory is 32GB, and the graphics card is NVIDIA GeForce RTX 2080Ti. The software platform of the simulation experiment is: Ubuntu 16.04 operating system, Python version is 3.7, and Pytorch version is 1.7.1. Experiments were conducted on the IRSTD-1k dataset and the NUAA-SIRST dataset. NUAA-SIRST contains 427 infrared images, while IRSTD-1k contains 1000 infrared images. For each dataset, it is divided into a training set and a test set in a ratio of 6:4.
[0061] The intersection over union (IoU) of the prior art on the IRSTD-1k dataset is 75.39%, and the intersection over union (IoU) of the present invention on the IRSTD-1k dataset is 80.04%. The results are listed in Table 1. The intersection over union (IoU) of the prior art on the NUAA-SIRST dataset is 74.37%, and the intersection over union (IoU) of the present invention on the NUAA-SIRST dataset is 79.07%. The results are listed in Table 2. Compared with the prior art, the detection accuracy is significantly improved.
[0062] Table 1
[0063] method Prior Art The present invention Intersection and Union 75.39% 80.04%
[0064] Table 2
[0065] method Prior Art The present invention Intersection and Union 74.37% 79.07%
Claims
1. A method for infrared small target detection based on bidirectional attention aggregation mechanism, It is characterized in that The following steps are involved: (1) Obtain training sample set and test sample set: Obtain K infrared images of size H×H containing different targets, and use the Sobel operator to perform edge detection on each infrared image. Then, mark the targets in each infrared image and its corresponding infrared edge image. Then, combine M infrared images and their corresponding infrared edge images, as well as the labels of each image, to form a training sample set R. 1 , the remaining KM infrared images and their corresponding infrared edge images, as well as the labels of each image, form the test sample set E 1 , where K ≥ 1000, H ≥ 256, (2) Constructing a target detection network model O based on a bidirectional attention aggregation mechanism: Construct a target detection network model O based on a bidirectional attention aggregation mechanism and including a first branch and a second branch arranged in parallel; the first branch includes a Stem block, a first and a second residual block, a first transposed convolutional layer, a first bidirectional attention aggregation block, a second transposed convolutional layer, a second bidirectional attention aggregation block, and a head network connected in sequence; the second branch includes three Taylor center difference residual blocks connected in sequence; wherein the Stem block includes a pooling layer and a plurality of convolutional layers; the first residual block includes a nonlinear activation layer and a plurality of convolutional layers; the second residual block includes a nonlinear activation layer and a plurality of convolutional layers; the bidirectional attention aggregation block includes a plurality of bottleneck structures, a plurality of variable convolutional layers, and a plurality of nonlinear activation layers; the head network includes a plurality of convolutional layers; the Taylor center difference residual block includes a plurality of convolutional layers and a plurality of nonlinear activation layers; (3) Iteratively train the target detection network model O: (3a) The number of initial iterations is s, the maximum number of iterations is Q, Q ≥ 10000, and the target detection network model of the sth iteration is O s , and let s = 0, O s =O; (3b) From the training sample set R 1 In the algorithm, l training samples are randomly selected as the input of the target detection network model O. The first branch and the second branch process l infrared image samples and l infrared edge image samples respectively to obtain the infrared small target detection results of l training samples. (3c) Update the parameters of the network model based on the bidirectional attention aggregation mechanism to obtain the network model of this iteration; (3d) Determine whether s≥S holds true. If so, obtain the trained target detection network model O*. Otherwise, set s=s+1 and execute step (3b); (4) Obtain infrared image target detection results: The test sample set E is used as the input of the trained target detection network model O* for forward propagation to obtain the infrared small target detection results corresponding to all test samples.
2. According to claim 1, the infrared small target detection method based on the bidirectional attention aggregation mechanism, It is characterized in that The network model O based on the bidirectional attention aggregation mechanism described in step (2), wherein: The first branch: the Stem block includes the first convolutional layer, the second convolutional layer, the third convolutional layer, and the pooling layer connected in sequence; the first residual block includes the fourth convolutional layer, the first non-linear activation layer, and the fifth convolutional layer connected in sequence; the second residual block includes the sixth convolutional layer, the second non-linear activation layer, and the seventh convolutional layer connected in sequence; the bidirectional attention aggregation block includes the third branch, the fourth branch, and the fifth branch connected in parallel, wherein the third branch includes the first bottleneck structure, the first deformable convolutional layer, and the third non-linear activation layer connected in sequence, the fourth branch includes the bottleneck structure, the fifth branch includes the second bottleneck structure, the second deformable convolutional layer, and the fourth non-linear activation layer, wherein the bottleneck structure includes multiple convolutional layers, the head network includes the sixth branch, the seventh branch, and the eighth branch arranged in parallel, the sixth branch includes the eighth convolutional layer and the ninth convolutional layer connected in sequence, the seventh branch includes the tenth convolutional layer and the eleventh convolutional layer connected in sequence, and the eighth branch includes the tenth convolutional layer connected in sequence. The specific parameters are as follows: the convolution kernel size of the first convolution layer, the fourth convolution layer, the fifth convolution layer, the sixth convolution layer, and the seventh convolution layer is 3*3, with a step size of 2; the convolution kernel size of the second convolution layer, the third convolution layer, and the tenth convolution layer is 3*3, with a step size of 1; the convolution kernel size of the eighth convolution layer is 1*1; the convolution kernel size of the twelfth convolution layer is 5*5; the ninth convolution layer, the eleventh convolution layer, and the thirteenth convolution layer are all hollow convolutions, with convolution kernel sizes of 2*3 and 1*1. The convolution kernel size of the first and second transposed convolution layers is 3*3, and the step size is 2. The pooling layer uses the maximum pooling. The first and second nonlinear activation layers are implemented using the ReLU function. The third and fourth nonlinear activation layers are implemented using the Sigmoid function. The convolution kernel size of the first deformable convolution layer is k*1, and the convolution kernel size of the second deformable convolution layer is 1*k, where k>1. The second branch: the number of convolutional layers in the Taylor center difference residual block is 6, and the number of non-linear activation layers is 3. The specific structure of the Taylor center difference residual block is the fourteenth convolutional layer, the fifth non-linear activation layer, the fifteenth convolutional layer, the sixteenth convolutional layer, the sixth non-linear activation layer, the seventeenth convolutional layer, the eighteenth convolutional layer, the seventh non-linear activation layer, and the nineteenth convolutional layer connected in sequence. The specific parameters are: the convolution kernel size of the fourteenth convolutional layer, the fifteenth convolutional layer, the sixteenth convolutional layer, the seventeenth convolutional layer, the eighteenth convolutional layer, and the nineteenth convolutional layer is 3*3, and the fifth non-linear activation layer, the sixth non-linear activation layer, and the seventh non-linear activation layer are all implemented by ReLU function.
3. According to claim 1, the infrared small target detection method based on the bidirectional attention aggregation mechanism, It is characterized in that Step (3b) will be described in the training sample set R 1 In the example, l training samples are randomly selected as the input of the target detection network model O. The first branch and the second branch process l infrared image samples and l infrared edge image samples respectively. The specific implementation steps are as follows: (3b1) Input the infrared image sample into the first branch, and the Stem block extracts the features of the infrared image layer by layer to obtain the feature map x 1 , the first residual block is from the feature map x 1 Extract local features x 2 , the second residual block is used for the local feature x 2 To refine, the first transposed convolutional layer is used to refine the local features x 3 Upsample to get the global feature x 4 , the first bidirectional attention aggregation block obtains the global feature x 4 Extract high-level features x 5 , and with the local feature x 2 Add to get the feature map x 6 , the second transposed convolutional layer performs the feature map x 6 Upsample to get the feature map x 7 , the second bidirectional attention aggregation block is based on the feature map x 7 Extract high-level features and obtain feature map x 8 , the feature map x 8 With the feature map x 1 Add together to get the feature map x 9 ; (3b2) The infrared edge image samples are input into the second branch, and the first Taylor center difference residual block performs a computation on the infrared edge image samples and the local features x after refinement in the first branch. 3 Perform feature fusion, and the second Taylor center difference residual block performs feature fusion on the fused feature map x 10 and the feature map x in the first branch 6 Perform feature fusion, and the third Taylor center difference residual block performs feature fusion on the fused feature map x 11 and the feature map x in the first branch 9 Perform feature fusion to obtain the target detection results of l infrared edge image samples; (3b3) The target detection results of l infrared edge image samples are passed through a nonlinear activation layer and combined with the feature map x in the first branch. 9 Perform element-by-element multiplication and add the feature map after element-by-element multiplication to the feature map x 9 Add element by element to get the feature map x 13 , the feature map x 13 Through the head network in the first branch, the target detection results of l infrared image samples are obtained.
4. According to claim 1, the infrared small target detection method based on the bidirectional attention aggregation mechanism, It is characterized in that The parameter update of the network model based on the bidirectional attention aggregation mechanism described in step (3d) is implemented as follows: (3d1) Using Dice loss function L Dice , and calculate the loss value of the first branch through the l target detection results generated by each infrared image sample and the l labels in its training sample set At the same time, the cross entropy loss function L BCE With the Dice loss function L Dice The loss value L of the second branch is calculated by the l edge target detection results generated by each infrared edge image sample and the l labels in its corresponding training sample set. Edge : in, represents the output image obtained by the first branch, y represents the label of the infrared image sample in the training sample set, represents the output image obtained by the second branch, and x represents the label of the infrared edge image sample in the training sample set; (3d2) The loss function of the first branch And the loss function L of the second branch Edge The sum of L s As a network model s The loss function of L s For the weight parameter ω in the network s And the bias parameter b s The partial derivative of and Then according to Yes s , b s Update and obtain the network model of this iteration.
