Target detection method, device, computer equipment and readable storage medium

Through the depth-separable convolutional attention encoding and decoding unit, combined with label supervision and sigmoid function, the problem of low recognition accuracy of infrared weak and small targets in infrared images is solved, and efficient recognition of infrared small and weak targets is achieved.

CN118247492BActive Publication Date: 2024-08-30XIAN ORDNANCE IND TECH IND DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410619491.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-08-30
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

Existing data-driven algorithms have low recognition accuracy for infrared weak and small targets in infrared images, especially the long-distance feature capture effect is poor, resulting in poor separation of infrared small and weak targets in the background.

Method used

The attention encoding unit and decoding unit based on depth-separable convolution are used, combined with the label supervision unit and sigmoid function, to enhance the channel and spatial correlation of the feature map and improve the recognition accuracy through alternating encoding and decoding processes.

Benefits of technology

The recognition accuracy of infrared weak and small targets in infrared images is significantly improved. Through the alternating encoding and decoding process of depth label supervision and feature maps, the recognition ability of infrared weak and small targets is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118247492B
    Figure CN118247492B
Patent Text Reader

Abstract

The present application discloses a target detection method, device, computer equipment and readable storage medium, which relates to the field of target detection technology and solves the problem that the recognition accuracy of infrared weak targets in infrared images is low when using a data-driven algorithm. The method includes: alternately encoding the features of the infrared image according to an attention encoding unit based on deep separable convolution to obtain a first feature map and a second feature map, then fusing the first feature map with the label based on a label supervision unit to obtain a third feature map with label information, then alternately decoding the third feature map with label information and the second feature map with the target channel number using an attention decoding unit based on deep separable convolution to obtain a decoded feature map, and finally using a sigmoid function to give a target detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of target detection, and more specifically, relates to a target detection method, device, computer equipment and readable storage medium. Background Art

[0002] With the rapid development of computer networks, infrared small target detection technology has also developed rapidly. Infrared small target detection technology can accurately detect and identify target objects with low heat signals or small sizes in infrared images. With this technology, even those potential targets that appear insignificant in infrared images, such as human bodies, vehicles, and drones, can be effectively discovered. Infrared small target detection is widely used in military reconnaissance, security monitoring, unmanned driving, border patrols and other fields, providing important support for improving security and real-time response capabilities. Accurate infrared small target detection can enhance the ability to identify specific targets and help people better understand and respond to potential risks or threats in complex environments.

[0003] Data-driven algorithms, such as convolutional neural networks (CNNs) or other deep learning architectures, extract high-level features from input infrared images through multi-level convolution, pooling, and full connection operations. Such algorithms have good robustness and accuracy, can effectively handle changes in target size and shape, and can handle multiple targets at the same time. However, due to the insufficient ability of the above neural network to capture long-distance features, the model has a poor effect in separating infrared dim targets from the background, that is, the recognition accuracy of infrared dim targets in infrared images is low. Summary of the invention

[0004] In view of this, the present invention provides a target detection method, device, computer equipment and readable storage medium, the main purpose of which is to solve the problem of low recognition accuracy of infrared weak targets in infrared images using data-driven algorithms.

[0005] According to the first aspect of the present application, a target detection method is provided, comprising:

[0006] In response to a target detection request, an infrared image carried by the target detection request is obtained, and a target detection algorithm is determined, wherein the target detection algorithm includes an attention encoding unit based on a depthwise separable convolution, a label supervision unit, an attention decoding unit based on a depthwise separable convolution, and a sigmoid function connected in sequence, and the infrared image includes a small infrared target;

[0007] Alternately encoding the features of the infrared image according to the attention encoding unit based on the depthwise separable convolution, to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels;

[0008] Based on the label supervision unit, the first feature map and the label are merged to obtain a third feature map with label information;

[0009] Based on the third feature map with label information and the second feature map with the target number of channels, alternately decode using the attention decoding unit based on depthwise separable convolution to obtain a decoded feature map;

[0010] The decoded feature map is processed using the sigmoid function to obtain a detection result with infrared weak small target information.

[0011] Optionally, the attention encoding unit based on depthwise separable convolution includes a dual convolution encoding head and a plurality of attention encoding subunits, wherein the dual convolution encoding head is connected to an input end of a first attention encoding subunit among the plurality of attention encoding subunits, and each of the plurality of attention encoding subunits is connected to an adjacent attention encoding subunit;

[0012] The feature of the infrared image is alternately encoded according to the attention encoding unit based on the depthwise separable convolution to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels, including:

[0013] Encoding the infrared image twice using the dual convolutional encoding head to obtain a first intermediate feature map with a first number of channels, wherein the dual convolutional encoding head includes two depth-separable convolutional layers;

[0014] Processing the first intermediate feature map based on the first attention encoding subunit among the multiple attention encoding subunits to obtain a second intermediate feature map with a second number of channels, inputting the second intermediate feature map into the second attention encoding subunit, and obtaining a first output feature map with first cross-dimensional information between the channel and the space, continuing to use the second attention encoding subunit to process the second intermediate feature map to obtain a third intermediate feature map with a third number of channels, and obtaining a second output feature map with second cross-dimensional information between the channel and the space, repeating the above operation until the last attention encoding subunit among the multiple attention encoding subunits completes the processing task;

[0015] Determine that a final intermediate feature map with a target number of channels output by the last attention encoding subunit is the second feature map;

[0016] The first feature map is determined based on an output feature map output by each attention encoding subunit having cross-dimensional information between channels and spaces.

[0017] Optionally, each attention encoding subunit includes a triple attention extraction module, a maximum pooling layer, and a depthwise separable convolutional layer connected in sequence;

[0018] The following operations are performed on each attention encoding subunit: based on the triplet attention extraction module in the attention encoding subunit, the input intermediate feature map with a first preset number of channels is processed to obtain a feature map with cross-dimensional information between channels and space, the feature map with cross-dimensional information between channels and space is used as the output feature map, and the feature map with cross-dimensional information between channels and space is downsampled by the maximum pooling layer in the attention encoding subunit to obtain a feature map of a transformed size, and the channels of the feature map of the transformed size are widened by the depthwise separable convolutional layer in the attention encoding subunit to obtain an intermediate feature map with a second preset number of channels, wherein the first preset number of channels is less than the second preset number of channels.

[0019] Optionally, the label supervision unit includes a plurality of label supervision modules; and the fusing the first feature map with the label based on the label supervision unit to obtain a third feature map with label information includes:

[0020] Extracting a plurality of output feature maps having cross-dimensional information between channels and spaces from the first feature map, wherein each output feature map serves as an input feature map of a label supervision module;

[0021] The following operations are performed on each label supervision module: determining an input label corresponding to the label supervision module, and determining an input feature map corresponding to the label supervision module, and fusing the input label and the input feature map based on the label supervision module to obtain a feature map with label information, wherein the input label corresponding to the label supervision module has an associated relationship with the input label corresponding to the label supervision module adjacent to the label supervision module;

[0022] A plurality of feature maps having label information are combined to obtain the third feature map.

[0023] Optionally, the attention decoding unit based on depthwise separable convolution includes a conversion triplet attention extraction module, a plurality of attention decoding subunits, and a dual convolution decoding head, the input ends of the plurality of attention decoding subunits are connected to the conversion triplet attention extraction module, the output ends of the plurality of attention decoding subunits are connected to the dual convolution decoding head, and each of the plurality of attention decoding subunits is connected to its adjacent attention decoding subunit;

[0024] The third feature map based on the label information and the second feature map with the target number of channels are alternately decoded using the attention decoding unit based on the depthwise separable convolution to obtain a decoded feature map, including:

[0025] Processing the second feature map having the target number of channels using the conversion triplet attention extraction module to obtain a transit feature map having transit cross-dimensional information between space and channels;

[0026] Extracting multiple feature maps with label information from the third feature map, each feature map with label information is used as an input feature map of an attention decoding subunit;

[0027] Based on the first attention decoding subunit among the multiple attention decoding subunits, the transit feature map and the corresponding feature map with label information are processed to obtain a first decoded feature map with first target cross dimension information between space and channel, and the attention decoding subunit adjacent to the first attention decoding subunit is continued to process the first decoded feature map and the corresponding feature map with label information to obtain a second decoded feature map with second target cross dimension information between space and channel, and the above operation is repeated until the last attention decoding subunit among the multiple attention decoding subunits completes the processing task;

[0028] Determine a target decoding feature map output by the last attention decoding sub-unit, which has final cross-dimensional information between space and channels, and decode the target decoding feature map twice using the dual convolution decoding head to obtain the decoded feature map, wherein the dual convolution decoding head includes two depth-separable convolutional layers.

[0029] Optionally, each attention decoding subunit includes a bilinear interpolation module, a channel splicing module, a depthwise separable convolutional layer, and a triplet attention extraction module connected in sequence;

[0030] The following operations are performed on each attention decoding sub-unit: based on the bilinear interpolation module in the attention decoding sub-unit, the decoding feature map with the first preset target cross-dimensional information between space and channel output by the previous adjacent triple attention extraction module is up-sampled to obtain a decoding feature map, the feature map with label information corresponding to the attention decoding sub-unit is determined, based on the channel splicing module in the attention decoding sub-unit, the feature map with label information and the decoding feature map are channel-spliced ​​to obtain a spliced ​​feature map, the depth-wise separable convolutional layer in the attention decoding sub-unit is used to widen the channel of the spliced ​​feature map to obtain a feature map after widening the channel, and the triple attention extraction module in the attention decoding sub-unit is used to process the feature map after widening the channel to obtain a decoding feature map with the second preset target cross-dimensional information between space and channel, and the amount of information of the second preset target cross-dimensional information is greater than the amount of information of the first preset target cross-dimensional information.

[0031] Optionally, before determining the target detection algorithm, the method further includes:

[0032] Determine an initial target detection algorithm, wherein the initial target detection algorithm includes an initial attention encoding unit based on depthwise separable convolution, an initial label supervision unit, an initial attention decoding unit based on depthwise separable convolution, and a sigmoid function connected in sequence;

[0033] Acquire an image training set, wherein the image training set includes a plurality of training images, and each training image includes at least one infrared dim small target;

[0034] The image training set is used to train the initial attention encoding unit based on depthwise separable convolution, the initial label supervision unit, and the initial attention decoding unit based on depthwise separable convolution in the initial target detection algorithm to obtain the target detection algorithm, wherein the target detection algorithm includes the trained attention encoding unit based on depthwise separable convolution, the trained label supervision unit, the trained attention decoding unit based on depthwise separable convolution, and the sigmoid function connected in sequence.

[0035] According to a second aspect of the present application, there is provided a target detection device, comprising:

[0036] An acquisition module is used to respond to a target detection request, acquire an infrared image carried by the target detection request, and determine a target detection algorithm, wherein the target detection algorithm includes an attention encoding unit based on a depthwise separable convolution, a label supervision unit, an attention decoding unit based on a depthwise separable convolution, and a sigmoid function connected in sequence, and the infrared image includes a small infrared target;

[0037] An encoding module, configured to alternately encode the features of the infrared image according to the attention encoding unit based on the depthwise separable convolution, to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels;

[0038] A fusion module, used for fusing the first feature map with the label based on the label supervision unit to obtain a third feature map with label information;

[0039] A decoding module, configured to perform alternate decoding based on the third feature map with label information and the second feature map with the target number of channels using the attention decoding unit based on the depthwise separable convolution to obtain a decoded feature map;

[0040] The processing module is used to process the decoded feature map using the sigmoid function to obtain a detection result with infrared weak target information.

[0041] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0042] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0043] Through the above technical scheme, the present application provides a target detection method, device, computer equipment and readable storage medium. The present application alternately encodes the features of the infrared image through the attention encoding unit based on deep separable convolution in the target detection algorithm to perform feature enhancement and information aggregation, and uses the label supervision unit to fuse the feature map with the label, increase the semantic information of the feature map to complete deep label supervision, and then alternately decodes through the attention decoding unit based on deep separable convolution to further widen the channel of the feature map, and further enrich the correlation between the channel and the space, effectively aggregate the long-distance context dependency in the encoding and decoding process, and finally obtains the final feature map with rich semantic information, rich correlation between the channel and the space, and rich channel information, and then judges the target position through the sigmoid function and outputs the detection result containing the target position. Through the above process, the infrared weak target in the infrared image can be accurately identified, thereby effectively improving the recognition accuracy of the infrared weak target in the infrared image.

[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0046] Figure 1 A flow chart of a target detection method provided by an embodiment of the present application is shown;

[0047] Figure 2 A flowchart of another target detection method provided by an embodiment of the present application is shown;

[0048] Figure 3 A schematic diagram showing the structure of a target detection algorithm of another target detection method provided by an embodiment of the present application is shown;

[0049] Figure 4 A schematic diagram showing the structure of a triplet attention extraction module of another target detection method provided in an embodiment of the present application is shown;

[0050] Figure 5 A schematic diagram of the structure of a label supervision module of another target detection method provided in an embodiment of the present application is shown;

[0051] Figure 6 A detection technology flow chart of another target detection method provided in an embodiment of the present application is shown;

[0052] Fig. 7A A schematic diagram of the structure of a target detection device provided in an embodiment of the present application is shown;

[0053] Figure 7B A schematic diagram of the structure of a target detection device provided in an embodiment of the present application is shown;

[0054] Figure 8 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0056] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0057] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0058] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0059] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0060] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0061] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0062] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0063] The present application embodiment provides a target detection method, such as Figure 1 As shown, including:

[0064] 101. In response to a target detection request, an infrared image carried in the target detection request is acquired, and a target detection algorithm is determined.

[0065] In an embodiment of the present application, the target detection algorithm is an optimal target detection algorithm obtained through pre-training, and the target detection algorithm includes an attention encoding unit based on deep separable convolution, a label supervision unit, an attention decoding unit based on deep separable convolution, and a sigmoid function connected in sequence. After receiving a target detection request, an infrared image carried by the target detection request is extracted from the target detection request, and the infrared image includes infrared weak targets as well as other targets and backgrounds. Infrared weak targets can be understood as target objects with lower thermal signals or smaller sizes.

[0066] 102. The features of the infrared image are alternately encoded according to the attention coding unit based on the depthwise separable convolution to obtain a first feature map with cross-dimensional information between channels and space, and a second feature map with a target number of channels.

[0067] In an embodiment of the present application, the depthwise separable convolution uses a depthwise separable convolution with a convolution kernel size of 3×3. The depthwise separable convolution can expand the number of channels of the infrared image and effectively enrich the channel information of the feature map. After determining the target detection algorithm, the features of the infrared image can be alternately encoded according to the attention coding unit based on the depthwise separable convolution in the target detection algorithm to perform feature enhancement and information aggregation to obtain a first feature map with cross-dimensional information between channels and space. At the same time, a second feature map with the target number of channels will also be obtained.

[0068] 103. Based on the label supervision unit, the first feature map and the label are fused to obtain a third feature map with label information.

[0069] In an embodiment of the present application, the attention encoding unit based on the depth-separable convolution in step 102 will output two feature maps, one is a first feature map with rich cross-dimensional information between channels and spaces, and the other is a second feature map with rich target channel numbers. The key to infrared weak target detection is to capture deep semantic information. Therefore, the label supervision unit is used to fuse the first feature map with rich cross-dimensional information between channels and spaces and the label to obtain a third feature map with label information, that is, the third feature map has rich semantic information. It should be noted that the label supervision unit accepts two inputs, one is the first feature map, and the other is the label. This label can be understood as a position label. The position label has been configured in the label supervision unit during training for calculating the loss function. The specific form of the position label is a binary map of a single channel of the label. For example, if the size of the first feature map is C×H×W, the size of the fused third feature map is (C+1)×H×W. The label supervision unit can also be understood as splicing the label and the feature map according to the channel dimension and outputting the feature map after the fusion label.

[0070] 104. Based on the third feature map with label information and the second feature map with the target number of channels, an attention decoding unit based on depthwise separable convolution is used to perform alternate decoding to obtain a decoded feature map.

[0071] In an embodiment of the present application, corresponding to the alternating encoding of the attention encoding unit based on depthwise separable convolution, an alternating decoding unit is also required in the target detection algorithm, that is, an attention decoding unit based on depthwise separable convolution, which performs alternating decoding based on the third feature map with label information and the second feature map with the target number of channels obtained previously, to obtain a decoded feature map using the attention decoding unit based on depthwise separable convolution.

[0072] 105. Use the sigmoid function to process the decoded feature map to obtain the detection result with infrared weak target information.

[0073] In the embodiment of the present application, the decoded feature map is processed using the sigmoid function to obtain a detection result with infrared weak target information, that is, the target position is determined by the sigmoid function and a binary image containing the target position is output. In the binary image, the value of the target is 1 and the value of the background area is 0. The sigmoid function is:

[0074] ,

[0075] in, F final is the decoded feature map.

[0076] The method provided in the embodiment of the present application alternately encodes the features of the infrared image through an attention encoding unit based on deep separable convolution in the target detection algorithm to perform feature enhancement and information aggregation, and uses a label supervision unit to fuse the feature map with the label, increase the semantic information of the feature map to complete deep label supervision, and then alternately decodes through an attention decoding unit based on deep separable convolution to further widen the channel of the feature map and further enrich the correlation between the channel and the space, effectively aggregate the long-distance context dependency in the encoding and decoding process, and finally obtains a final feature map with rich semantic information, rich correlation between the channel and the space, and rich channel information, and then uses a sigmoid function to judge the target position and output a detection result containing the target position. Through the above process, infrared weak targets in infrared images can be accurately identified, thereby effectively improving the recognition accuracy of infrared weak targets in infrared images.

[0077] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation of this embodiment, the embodiment of the present application provides another target detection method, such as Figure 2As shown, the method includes:

[0078] 201. Train the initial target detection algorithm to obtain a target detection algorithm.

[0079] In an embodiment of the present application, it is necessary to first obtain an initial target detection algorithm, which includes four units, namely, an initial attention encoding unit based on depthwise separable convolution, an initial label supervision unit, an initial attention decoding unit based on depthwise separable convolution, and a sigmoid function connected in sequence; then, an image training set is obtained, which includes multiple training images, and each training image includes at least one infrared dim target; finally, the image training set is used to train the initial attention encoding unit based on depthwise separable convolution, the initial label supervision unit, and the initial attention decoding unit based on depthwise separable convolution in the initial target detection algorithm to obtain a target detection algorithm, which includes a trained attention encoding unit based on depthwise separable convolution, a trained label supervision unit, a trained attention decoding unit based on depthwise separable convolution, and a sigmoid function connected in sequence.

[0080] 202. In response to a target detection request, acquire an infrared image carried in the target detection request, and determine a target detection algorithm.

[0081] In an embodiment of the present application, the target detection algorithm includes an attention encoding unit based on deep separable convolution, a label supervision unit, an attention decoding unit based on deep separable convolution, and a sigmoid function connected in sequence. The attention encoding unit based on deep separable convolution also includes a dual convolution encoding head and multiple attention encoding subunits. The dual convolution encoding head is connected to the input end of the first attention encoding subunit among the multiple attention encoding subunits, and each of the multiple attention encoding subunits is connected to its adjacent attention encoding subunit. The label supervision unit includes multiple label supervision modules. The attention decoding unit based on deep separable convolution includes a conversion triplet attention extraction module, multiple attention decoding subunits, and a dual convolution decoding head. The input end of the multiple attention decoding subunits is connected to the conversion triplet attention extraction module, the output end of the multiple attention decoding subunits is connected to the dual convolution decoding head, and each of the multiple attention decoding subunits is connected to its adjacent attention decoding subunit.

[0082] 203. The features of the infrared image are alternately encoded according to the attention coding unit based on the depthwise separable convolution to obtain a first feature map with cross-dimensional information between channels and space, and a second feature map with a target number of channels.

[0083] In the embodiments of the present application, Figure 3As shown in the figure, the dual convolutional encoding head includes two depth-wise separable convolutional layers. The depth-wise separable convolutional layer can select a depth-wise separable convolution with a convolution kernel size of 3×3. The dual convolutional encoding head encodes the infrared image twice, and the number of channels of the infrared image is initially widened through the two encodings. Finally, the first intermediate feature map with the first number of channels is obtained, which effectively enriches the channel information of the first intermediate feature map. The first intermediate feature map is expressed as:

[0084] ,

[0085] ,

[0086] in, F 0 is the first intermediate feature map, DWConv 3 is a depth-separable convolution with a kernel size of 3×3. I in is the input infrared image, R is the field of real numbers, C 0 is the number of channels of the first intermediate feature map, H is the height of the first intermediate feature map, W is the width of the first intermediate feature map.

[0087] Afterwards, the first attention encoding subunit among the multiple attention encoding subunits processes the first intermediate feature map to obtain a second intermediate feature map with a second number of channels, the second intermediate feature map is to be input into the second attention encoding subunit, and a first output feature map with first cross-dimensional information between channels and space is obtained, the second attention encoding subunit is continued to process the second intermediate feature map to obtain a third intermediate feature map with a third number of channels, and a second output feature map with second cross-dimensional information between channels and space is obtained, and the above operation is repeated until the last attention encoding subunit among the multiple attention encoding subunits completes the processing task. For example, the number of attention encoding subunits is 4, and the top first attention encoding subunit processes the first intermediate feature map. After processing, the number of channels increases, and cross-dimensional interaction is achieved between channels and space, and two feature maps are output, namely the second intermediate feature map and the first output feature map. The two feature maps are somewhat different. Although the number of channels and the dimensional interaction features between space and channels in each feature map are enhanced, the two have different focuses. The first output feature map focuses on the dimensional interaction features between channels and space, and the second intermediate feature map focuses on channel information. After that, the second intermediate feature map is input into the second attention encoding subunit, which will continue to process the second intermediate feature map to obtain a third intermediate feature map with a third number of channels and a second output feature map with the second cross dimension information between the channel and the space. It should be noted that after being processed by the second attention encoding subunit, the channel information will be further enhanced, and the dimensional interaction characteristics between the channel and the space will also be further enhanced. Then the third intermediate feature map is input into the third attention encoding subunit, which will continue to process the third intermediate feature map to obtain a fourth intermediate feature map with a fourth number of channels and a third output feature map with the third cross dimension information between the channel and the space. Finally, the fourth intermediate feature map is input into the last attention encoding subunit, which will continue to process the fourth intermediate feature map. After processing, the final intermediate feature map with the target number of channels, that is, the second feature map, is obtained, and the fourth output feature map with the fourth cross dimension information between the channel and the space is also obtained. It should be noted that the above-mentioned first output feature map, second output feature map, third output feature map and fourth output feature map are all used as input features of the label supervision unit, that is, the first feature map.

[0088] Furthermore, each attention encoding subunit also includes a triple attention extraction module, a maximum pooling layer, and a depthwise separable convolution layer connected in sequence. Since the structure of each attention encoding subunit is the same, one attention encoding subunit is used for illustration. Since the previous layer of the triple attention (TRA) extraction module is a depthwise separable convolution layer, the triple attention extraction module processes the feature map with the first preset number of channels output by the depthwise separable convolution layer of the previous layer. Triple attention (TRA) can effectively realize cross-dimensional interaction, such as Figure 4 As shown in Figure 1, it consists of three branches, each of which is responsible for capturing the cross-dimensionality between the spatial dimension and the channel dimension of the input. For example, given an input tensor of shape (C0×H×W), each branch is responsible for aggregating the cross-dimensional interaction features between the spatial dimension H or W and the channel dimension C0; by simply arranging the input tensors in each branch F 0, through dimension transformation F 0 for preprocessing:

[0089] ,

[0090] ,

[0091] ,

[0092] in, F HCW , F WHC , F CHW They respectively represent the feature maps after the height H, width W and number of channels C0 of the feature map are transformed from each other.

[0093] Then use max pooling and spatial pooling to pass the tensor to achieve cross-dimensional interaction features:

[0094] ,

[0095] in, f maxpool represents the maximum pooling function, f avgpool represents the average pooling function, , , They represent the feature maps after maximum pooling and spatial pooling respectively.

[0096] Subsequently, attention weights are generated through a deep convolutional layer with a kernel size of 3×3, a batch normalization layer, and a sigmoid activation layer. Figure 4In the above formula, the deep convolutional layer, batch normalization layer and sigmoid activation layer are integrated together, collectively referred to as DBS. f DBS1 is the function corresponding to the depth convolution layer, f DBS2 is the function corresponding to the batch normalization layer, f DBS3 is the function corresponding to the sigmoid activation layer.

[0097] ,

[0098] in, Represents the function corresponding to the deep convolution layer f DBS1 The output feature map, Represents the function corresponding to the batch normalization layer f DBS2 The output feature map, Represents the function corresponding to the sigmoid activation layer f DBS3 Output feature map.

[0099] Then it is arranged back to the original input shape and averaged to get the final output F ti .

[0100] ,

[0101] in, i Indicates i attention encoding subunits, Represents the rotation function reverse rotation.

[0102] It should be noted that the triplet attention (TRA) extraction module is a plug-and-play module that is lightweight and efficient. It can effectively represent the correlation between channels and spaces globally, thereby effectively aggregating long-distance context dependencies in the encoding and decoding process.

[0103] Furthermore, after being processed by the triplet attention extraction module, a feature map with cross-dimensional information between channels and spaces is obtained. On the one hand, this feature map with cross-dimensional information between channels and spaces can be used as the input of the label supervision unit. On the other hand, the feature map with cross-dimensional information between channels and spaces is input into the maximum pooling layer. The maximum pooling layer downsamples the feature map after attention feature extraction and uses a depth-separable convolution with a convolution kernel size of 3×3 to further widen the channel information, that is,

[0104] ,

[0105] Repeat the above steps to downsample and horizontally encode the input features four times in a row to obtain feature maps of different sizes. F ti ( i =0,1,2,3), as the input of the label supervision unit. It should be noted that the downsampling operation involves the size transformation of the image, and other attention encodings are called horizontal encodings, that is, the image size is not transformed.

[0106] It should be noted that the first preset channel number is smaller than the second preset channel number, and the first preset channel number and the second preset channel number are respectively one of the first channel number to the target channel number, for example, the first channel number, the second channel number, the third channel number and the fourth channel number (target channel number).

[0107] 204. Based on the label supervision unit, the first feature map and the label are fused to obtain a third feature map with label information.

[0108] In the embodiments of the present application, the key to infrared small target detection is to capture deep semantic information. Therefore, the feature map with rich cross-dimensional information between channels and spaces is subjected to deep label supervision. Infrared small targets generally have only a few pixels, so it is meaningless to say that they are "people" or "drones". Therefore, the small target detection algorithm is essentially a target segmentation model, and the labels used can be understood as binary images containing the target position. After the labels are fused, they will be used as part of the feature map for subsequent feature extraction and calculation. The label supervision unit in the present application includes multiple label supervision modules, such as Figure 3 As shown in , the number of label supervision modules is 4, which is consistent with the number of attention encoding subunits, as shown in Figure 5 As shown, the label supervision module accepts two inputs: features F ti and tags L i ;

[0109] ,

[0110] ,

[0111] in, i =0,1,2,3, C i Features F ti The number of channels, H i Features F ti Height, W i FeaturesF ti Width.

[0112] It should be noted that the label input to the label supervision module is configured in the network at the beginning of training and is used to calculate the loss function. The specific form of the label is a binary image of a single channel of the label.

[0113] Since there are four label supervision modules in the label supervision unit, the relationship between the next label supervision module and the current label supervision module is:

[0114] ,

[0115] in, i =1,2,3; that is, the average pooling layer is used to adjust the original label L 0, so that it completely matches the scale of the low-level features. This original label is the label that is input to the network at the beginning. The label and the feature map are concatenated according to the channel dimension, and then the feature map is restored to the size of the feature map through deep convolution.

[0116] Specifically, it can be seen from the above content that each output feature map is used as an input feature map of a label supervision module. Taking a label supervision module as an example, first determine the label corresponding to the label supervision module, and determine the input feature map corresponding to the label supervision module, and then fuse the input label and input feature map based on the label supervision module to obtain a feature map with label information. Each label supervision module outputs a feature map with label information, and these feature maps with label information constitute the third feature map.

[0117] 205. Based on the third feature map with label information and the second feature map with the target number of channels, an attention decoding unit based on depthwise separable convolution is used to perform alternate decoding to obtain a decoded feature map.

[0118] In an embodiment of the present application, an attention decoding unit based on depthwise separable convolution includes a conversion triplet attention extraction module, multiple attention decoding sub-units, and a dual convolution decoding head. The input ends of the multiple attention decoding sub-units are connected to the conversion triplet attention extraction module, the output ends of the multiple attention decoding sub-units are connected to the dual convolution decoding head, and each of the multiple attention decoding sub-units is connected to its adjacent attention decoding sub-unit.

[0119] Specifically, Figure 3As shown, the second feature map with the target number of channels is processed by the conversion triplet attention extraction module to obtain a transfer feature map with transfer cross-dimensional information between space and channels. The conversion triplet attention (TRA-1) extraction module here plays a transfer role, that is, as a further attention feature extraction for encoding to decoding conversion; multiple feature maps with label information are extracted from the third feature map, and each feature map with label information is used as an input feature map of an attention decoding subunit; based on the first attention decoding subunit among the multiple attention decoding subunits, the transfer feature map and the corresponding feature map with label information are processed to obtain a first decoded feature map with the first target cross-dimensional information between space and channels, and the attention decoding subunit adjacent to the first attention decoding subunit continues to process the first decoded feature map and the corresponding feature map with label information to obtain a second decoded feature map with the second target cross-dimensional information between space and channels, and the above operation is repeated until the last attention decoding subunit among the multiple attention decoding subunits completes the processing task. Determine the target decoding feature map with the final cross-dimensional information between space and channels output by the last attention decoding subunit F out0 , and use the dual convolution decoding head to decode the target decoding feature map twice to obtain the decoded feature map, that is, the output feature F final ,in,

[0120] ,

[0121] It should be noted that the dual convolutional decoding head includes two depth-wise separable convolution layers, and the depth-wise separable convolution is a depth-wise separable convolution with a convolution kernel size of 3 × 3. For example, the number of attention decoding subunits can be 4, which is consistent with the number of label supervision modules.

[0122] Furthermore, each attention decoding subunit includes a bilinear interpolation module, a channel splicing module, a depth-separable convolutional layer, and a triple attention extraction module connected in sequence. Figure 3 As shown, an attention decoding subunit is used for illustration. The bilinear interpolation module receives the decoded feature map with the first preset target cross dimension information between space and channel output by the previous triplet attention extraction module, and upsamples the feature map. For example, given the input feature F in , the feature map is upsampled by bilinear interpolation to obtain the output feature F out ,in,

[0123] ,

[0124] .

[0125] It should be noted that bilinear interpolation is a commonly used image interpolation method, which is used to estimate the pixel values ​​at other locations at known discrete sampling points. The principle of bilinear interpolation is based on the idea of ​​linear interpolation, but interpolation is performed in two dimensions:

[0126] ,

[0127] Among them, P represents the point to be interpolated, Q represents the four positioning points, and w represents the linear interpolation weight between the point to be interpolated and the four positioning points. After each upsampling, the feature is compressed through a deep convolution layer with a convolution kernel size of 3×3, and the upsampled feature map is obtained. F outi ,in,

[0128] ,

[0129] ,

[0130] in, F ini represents the input feature map, f 3×3 represents a depth-wise separable convolution with a kernel size of 3, f bilinear Represents an interpolation function.

[0131] Furthermore, the feature map with label information corresponding to the attention decoding sub-unit is determined by upsampling the decoded feature map, and the channel splicing module in the attention decoding sub-unit is used to perform channel splicing on the feature map with label information and the decoding feature map to obtain the spliced ​​feature map, and the depthwise separable convolutional layer in the attention decoding sub-unit is used to widen the channel of the spliced ​​feature map to obtain the feature map after the widened channel, and the triplet attention extraction module in the attention decoding sub-unit is used to process the feature map after the widened channel to obtain a decoding feature map with the second preset target cross-dimensional information between space and channel.

[0132] It should be noted that the above description takes an attention decoding sub-unit as an example. This attention decoding sub-unit can be the first, the second, the third, and so on. The amount of information of the above-mentioned second preset target cross-dimensional information must be greater than the amount of information of the first preset target cross-dimensional information.

[0133] 206. The decoded feature map is processed using the sigmoid function to obtain a detection result with infrared weak target information.

[0134] The above embodiments are summarized as follows. Figure 6As shown, for the input infrared image, the features of the infrared image are encoded twice by a double convolutional encoding head to obtain the first intermediate feature map, and then the triple attention (TRA) extraction module is used to extract the attention features to obtain a feature map with rich dimensional cross-features between channels and spaces. On the one hand, the feature map is output, and on the other hand, it is used as the input of the maximum pooling layer. The feature map is downsampled by the maximum pooling layer to obtain a feature map with further widened channels. The attention feature extraction of the triple attention (TRA) extraction module and the downsampling of the maximum pooling layer are repeated 4 times in total. Through each attention feature extraction of the triple attention (TRA) extraction module and the downsampling of the maximum pooling layer, 4 feature maps with rich cross-dimensional information between spaces and channels are output; these 4 feature maps are used as the input of the label supervision unit, and 4 feature maps with rich label information are obtained through the label supervision unit. After the last repeated downsampling of the maximum pooling layer, a feature map with the target number of channels is output. This feature map inputs the conversion triplet Attention (TRA-1) extraction module, through this conversion triplet attention extraction module to further extract attention features, to obtain the transfer feature map; then, through the bilinear interpolation module to upsample the transfer feature map, to obtain the decoding feature map, through the channel splicing module to splice the decoding feature map and the corresponding feature map with rich label information, to obtain the spliced ​​feature map, and then use the depth separable convolution layer to further widen the spliced ​​feature map, to obtain the feature map after widening the channel, and use the triplet attention (TRA) extraction module to further extract attention features from the feature map after widening the channel, to obtain a feature map with rich cross-dimensional information between space and channels, repeat the upsampling of the bilinear interpolation module, the channel splicing of the channel splicing module, and the attention feature extraction of the triplet attention (TRA) extraction module, a total of 4 times, and finally output the target decoding feature map with the final cross-dimensional information between space and channels, and use the dual convolution decoding head to decode the target decoding feature map twice to obtain the decoded feature map. Finally, the decoded feature map is processed by the sigmoid function to obtain the detection result with infrared weak target information.

[0135] The method provided in the embodiment of the present application alternately encodes the features of the infrared image through an attention encoding unit based on deep separable convolution in the target detection algorithm to perform feature enhancement and information aggregation, and uses a label supervision unit to fuse the feature map with the label, increase the semantic information of the feature map to complete deep label supervision, and then alternately decodes through an attention decoding unit based on deep separable convolution to further widen the channel of the feature map and further enrich the correlation between the channel and the space, effectively aggregate the long-distance context dependency in the encoding and decoding process, and finally obtains a final feature map with rich semantic information, rich correlation between the channel and the space, and rich channel information, and then uses a sigmoid function to judge the target position and output a detection result containing the target position. Through the above process, infrared weak targets in infrared images can be accurately identified, thereby effectively improving the recognition accuracy of infrared weak targets in infrared images.

[0136] Further, as Figure 1 The specific implementation of the method is as follows: Fig. 7A As shown, an embodiment of the present invention provides a target detection device, including: an acquisition module 701, an encoding module 702, a fusion module 703, a decoding module 704 and a processing module 705.

[0137] The acquisition module 701 is used to respond to a target detection request, acquire an infrared image carried by the target detection request, and determine a target detection algorithm, wherein the target detection algorithm includes an attention encoding unit based on a depthwise separable convolution, a label supervision unit, an attention decoding unit based on a depthwise separable convolution, and a sigmoid function connected in sequence, and the infrared image includes a small infrared target;

[0138] The encoding module 702 is used to alternately encode the features of the infrared image according to the attention encoding unit based on the depthwise separable convolution to obtain a first feature map with cross-dimensional information between channels and spaces, and a second feature map with a target number of channels;

[0139] The fusion module 703 is used to fuse the first feature map with the label based on the label supervision unit to obtain a third feature map with label information;

[0140] The decoding module 704 is used to alternately decode the third feature map with label information and the second feature map with target number of channels using the attention decoding unit based on depthwise separable convolution to obtain a decoded feature map;

[0141] The processing module 705 is used to process the decoded feature map using the sigmoid function to obtain a detection result with infrared weak small target information.

[0142] In a specific application scenario, the encoding module 702 is also used for the attention encoding unit based on deep separable convolution, including a dual convolution encoding head and multiple attention encoding sub-units, the dual convolution encoding head is connected to the input end of the first attention encoding sub-unit among the multiple attention encoding sub-units, and each attention encoding sub-unit in the multiple attention encoding sub-units is connected to its adjacent attention encoding sub-unit; the features of the infrared image are alternately encoded according to the attention encoding unit based on deep separable convolution to obtain a first feature map with cross-dimensional information between channels and space, and a second feature map with a target number of channels, including: using the dual convolution encoding head to encode the infrared image twice to obtain a first intermediate feature map with a first number of channels, wherein the dual convolution encoding head includes two deep separable convolution layers; based on the multiple attention encoding sub-units The first attention encoding subunit in the element processes the first intermediate feature map to obtain a second intermediate feature map with a second number of channels, which is input into the second attention encoding subunit, and a first output feature map with a first cross-dimensional information between channels and space is obtained. The second attention encoding subunit continues to process the second intermediate feature map to obtain a third intermediate feature map with a third number of channels, and a second output feature map with a second cross-dimensional information between channels and space. The above operation is repeated until the last attention encoding subunit among the multiple attention encoding subunits completes the processing task; the final intermediate feature map with the target number of channels output by the last attention encoding subunit is determined to be the second feature map; the first feature map is determined based on the output feature map with the cross-dimensional information between channels and space output by each attention encoding subunit.

[0143] In a specific application scenario, the encoding module 702 is also used for each attention encoding subunit, including a triple attention extraction module, a maximum pooling layer, and a depthwise separable convolution layer connected in sequence; the following operations are performed on each attention encoding subunit: based on the triple attention extraction module in the attention encoding subunit, the input intermediate feature map with a first preset number of channels is processed to obtain a feature map with cross-dimensional information between channels and space, and the feature map with cross-dimensional information between channels and space is used as the output feature map, and the feature map with cross-dimensional information between channels and space is downsampled by using the maximum pooling layer in the attention encoding subunit to obtain a feature map of a transformed size, and the channels of the feature map of the transformed size are widened by the depthwise separable convolution layer in the attention encoding subunit to obtain an intermediate feature map with a second preset number of channels, and the first preset number of channels is less than the second preset number of channels.

[0144] In a specific application scenario, the fusion module 703 is also used for the label supervision unit to include multiple label supervision modules; the first feature map and the label are fused based on the label supervision unit to obtain a third feature map with label information, including: extracting multiple output feature maps with cross-dimensional information between channels and spaces from the first feature map, wherein each output feature map serves as an input feature map of a label supervision module; performing the following operations on each label supervision module: determining the input label corresponding to the label supervision module, and determining the input feature map corresponding to the label supervision module, fusing the input label and the input feature map based on the label supervision module to obtain a feature map with label information, wherein the input label corresponding to the label supervision module has an association relationship with the input label corresponding to an adjacent label supervision module on the label supervision module; combining multiple feature maps with label information to obtain the third feature map.

[0145] In a specific application scenario, the decoding module 704 is also used in the attention decoding unit based on deep separable convolution, which includes a conversion triplet attention extraction module, multiple attention decoding sub-units, and a dual convolution decoding head. The input ends of the multiple attention decoding sub-units are connected to the conversion triplet attention extraction module, and the output ends of the multiple attention decoding sub-units are connected to the dual convolution decoding head. Each of the multiple attention decoding sub-units is connected to its adjacent attention decoding sub-unit; the third feature map with label information and the second feature map with the target number of channels are alternately decoded using the attention decoding unit based on deep separable convolution to obtain a decoded feature map, including: using the conversion triplet attention extraction module to process the second feature map with the target number of channels to obtain a transit feature map with transit cross-dimensional information between space and channels; extracting multiple feature maps with label information from the third feature map, each with label information as an input feature map of an attention decoding subunit; based on the first attention decoding subunit among the multiple attention decoding subunits, the transit feature map and the corresponding feature map with label information are processed to obtain a first decoded feature map with a first target cross-dimensional information between space and channel, and the attention decoding subunit adjacent to the first attention decoding subunit continues to process the first decoded feature map and the corresponding feature map with label information to obtain a second decoded feature map with a second target cross-dimensional information between space and channel, and the above operation is repeated until the last attention decoding subunit among the multiple attention decoding subunits completes the processing task; determine the target decoded feature map with the final cross-dimensional information between space and channel output by the last attention decoding subunit, and use the dual convolution decoding head to decode the target decoded feature map twice to obtain the decoded feature map, wherein the dual convolution decoding head includes two depth-separable convolutional layers.

[0146] In a specific application scenario, the decoding module 704 is also used for each attention decoding subunit, including a bilinear interpolation module, a channel stitching module, a depth-separable convolution layer and a triple attention extraction module connected in sequence; the following operations are performed on each attention decoding subunit: based on the bilinear interpolation module in the attention decoding subunit, the decoding feature map with the first preset target cross-dimensional information between the space and the channel output by the previous adjacent triple attention extraction module is upsampled to obtain a decoding feature map, the feature map with label information corresponding to the attention decoding subunit is determined, based on the channel stitching module in the attention decoding subunit, the feature map with label information and the decoding feature map are channel-spliced ​​to obtain a spliced ​​feature map, the channel of the spliced ​​feature map is widened by the depth-separable convolution layer in the attention decoding subunit to obtain a feature map after the widened channel, and the feature map after the widened channel is processed by the triple attention extraction module in the attention decoding subunit to obtain a decoding feature map with the second preset target cross-dimensional information between the space and the channel, and the information amount of the second preset target cross-dimensional information is greater than the information amount of the first preset target cross-dimensional information.

[0147] In specific application scenarios, such as Figure 7B As shown, the device also includes: a training module 706.

[0148] The training module 706 is used to determine an initial target detection algorithm, which includes an initial attention encoding unit based on depthwise separable convolution, an initial label supervision unit, an initial attention decoding unit based on depthwise separable convolution, and a sigmoid function connected in sequence; obtain an image training set, which includes multiple training images, and each training image includes at least one infrared dim target; use the image training set to train the initial attention encoding unit based on depthwise separable convolution, the initial label supervision unit, and the initial attention decoding unit based on depthwise separable convolution in the initial target detection algorithm to obtain the target detection algorithm, which includes a trained attention encoding unit based on depthwise separable convolution, a trained label supervision unit, a trained attention decoding unit based on depthwise separable convolution, and the sigmoid function connected in sequence.

[0149] The device provided in the embodiment of the present application alternately encodes the features of the infrared image through the attention encoding unit based on deep separable convolution in the target detection algorithm to perform feature enhancement and information aggregation, and uses the label supervision unit to fuse the feature map with the label, increase the semantic information of the feature map to complete deep label supervision, and then alternately decodes through the attention decoding unit based on deep separable convolution to further widen the channel of the feature map, and further enrich the correlation between the channel and the space, effectively aggregate the long-distance context dependency in the encoding and decoding process, and finally obtains the final feature map with rich semantic information, rich correlation between the channel and the space, and rich channel information, and then judges the target position through the sigmoid function and outputs the detection result containing the target position. Through the above process, the infrared weak small target in the infrared image can be accurately identified, thereby effectively improving the recognition accuracy of the infrared weak small target in the infrared image.

[0150] It should be noted that for other corresponding descriptions of the functional units involved in the target detection device provided in the embodiment of the present invention, reference can be made to Figure 1 and Fig. 7A , Figure 7B The corresponding description in will not be repeated here.

[0151] In an exemplary embodiment, see Figure 8 , and also provides a computer device, which includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the target detection method in the above embodiment.

[0152] A computer-readable storage medium stores a computer program, which implements the steps of the target detection method when executed by a processor.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus necessary general hardware platforms. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0154] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.

[0155] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0156] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.

[0157] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A target detection method, It is characterized in that include: In response to a target detection request, an infrared image carried by the target detection request is obtained, and a target detection algorithm is determined, wherein the target detection algorithm includes an attention encoding unit based on a depthwise separable convolution, a label supervision unit, an attention decoding unit based on a depthwise separable convolution, and a sigmoid function connected in sequence, and the infrared image includes a small infrared target; Alternately encoding the features of the infrared image according to the attention encoding unit based on the depthwise separable convolution, to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels; Based on the label supervision unit, the first feature map and the label are merged to obtain a third feature map with label information; Based on the third feature map with label information and the second feature map with the target number of channels, alternately decode using the attention decoding unit based on depthwise separable convolution to obtain a decoded feature map; The decoded feature map is processed by using the sigmoid function to obtain a detection result having infrared weak small target information; The label supervision unit includes a plurality of label supervision modules, and the first feature map and the label are fused based on the label supervision unit to obtain a third feature map with label information, including: Extracting a plurality of output feature maps having cross-dimensional information between channels and spaces from the first feature map, wherein each output feature map serves as an input feature map of a label supervision module; The following operations are performed on each label supervision module: determining an input label corresponding to the label supervision module, and determining an input feature map corresponding to the label supervision module, and fusing the input label and the input feature map based on the label supervision module to obtain a feature map with label information, wherein the input label corresponding to the label supervision module has an associated relationship with the input label corresponding to the label supervision module adjacent to the label supervision module; A plurality of feature maps having label information are combined to obtain the third feature map.

2. The target detection method according to claim 1, It is characterized in that The attention encoding unit based on depthwise separable convolution includes a dual convolution encoding head and a plurality of attention encoding subunits, wherein the dual convolution encoding head is connected to an input end of a first attention encoding subunit among the plurality of attention encoding subunits, and each of the plurality of attention encoding subunits is connected to an adjacent attention encoding subunit; The feature of the infrared image is alternately encoded according to the attention encoding unit based on the depthwise separable convolution to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels, including: Encoding the infrared image twice using the dual convolutional encoding head to obtain a first intermediate feature map with a first number of channels, wherein the dual convolutional encoding head includes two depth-separable convolutional layers; Processing the first intermediate feature map based on the first attention encoding subunit among the multiple attention encoding subunits to obtain a second intermediate feature map with a second number of channels, inputting the second intermediate feature map into the second attention encoding subunit, and obtaining a first output feature map with first cross-dimensional information between the channel and the space, continuing to use the second attention encoding subunit to process the second intermediate feature map to obtain a third intermediate feature map with a third number of channels, and obtaining a second output feature map with second cross-dimensional information between the channel and the space, repeating the above operation until the last attention encoding subunit among the multiple attention encoding subunits completes the processing task; Determine that a final intermediate feature map with a target number of channels output by the last attention encoding subunit is the second feature map; The first feature map is determined based on an output feature map output by each attention encoding subunit having cross-dimensional information between channels and spaces.

3. The target detection method according to claim 2, It is characterized in that Each attention encoding subunit consists of a triple attention extraction module, a maximum pooling layer, and a depth-wise separable convolutional layer connected in sequence; The following operations are performed on each attention encoding subunit: based on the triplet attention extraction module in the attention encoding subunit, the input intermediate feature map with a first preset number of channels is processed to obtain a feature map with cross-dimensional information between channels and space, the feature map with cross-dimensional information between channels and space is used as the output feature map, and the feature map with cross-dimensional information between channels and space is downsampled by the maximum pooling layer in the attention encoding subunit to obtain a feature map of a transformed size, and the channels of the feature map of the transformed size are widened by the depthwise separable convolutional layer in the attention encoding subunit to obtain an intermediate feature map with a second preset number of channels, wherein the first preset number of channels is less than the second preset number of channels.

4. The target detection method according to claim 1, It is characterized in that The attention decoding unit based on depthwise separable convolution includes a conversion triplet attention extraction module, a plurality of attention decoding subunits, and a dual convolution decoding head, wherein the input ends of the plurality of attention decoding subunits are connected to the conversion triplet attention extraction module, the output ends of the plurality of attention decoding subunits are connected to the dual convolution decoding head, and each of the plurality of attention decoding subunits is connected to its adjacent attention decoding subunit; The third feature map based on the label information and the second feature map with the target number of channels are alternately decoded using the attention decoding unit based on the depthwise separable convolution to obtain a decoded feature map, including: Processing the second feature map having the target number of channels using the conversion triplet attention extraction module to obtain a transit feature map having transit cross-dimensional information between space and channels; Extracting multiple feature maps with label information from the third feature map, each feature map with label information is used as an input feature map of an attention decoding subunit; Based on the first attention decoding subunit among the multiple attention decoding subunits, the transit feature map and the corresponding feature map with label information are processed to obtain a first decoded feature map with first target cross dimension information between space and channel, and the attention decoding subunit adjacent to the first attention decoding subunit is continued to process the first decoded feature map and the corresponding feature map with label information to obtain a second decoded feature map with second target cross dimension information between space and channel, and the above operation is repeated until the last attention decoding subunit among the multiple attention decoding subunits completes the processing task; Determine a target decoding feature map output by the last attention decoding sub-unit, which has final cross-dimensional information between space and channels, and decode the target decoding feature map twice using the dual convolution decoding head to obtain the decoded feature map, wherein the dual convolution decoding head includes two depth-separable convolutional layers.

5. The target detection method according to claim 4, It is characterized in that Each attention decoding subunit consists of a bilinear interpolation module, a channel splicing module, a depthwise separable convolutional layer, and a triplet attention extraction module connected sequentially; The following operations are performed on each attention decoding sub-unit: based on the bilinear interpolation module in the attention decoding sub-unit, the decoding feature map with the first preset target cross-dimensional information between space and channel output by the previous adjacent triple attention extraction module is up-sampled to obtain a decoding feature map, the feature map with label information corresponding to the attention decoding sub-unit is determined, based on the channel splicing module in the attention decoding sub-unit, the feature map with label information and the decoding feature map are channel-spliced ​​to obtain a spliced ​​feature map, the depth-wise separable convolutional layer in the attention decoding sub-unit is used to widen the channel of the spliced ​​feature map to obtain a feature map after widening the channel, and the triple attention extraction module in the attention decoding sub-unit is used to process the feature map after widening the channel to obtain a decoding feature map with the second preset target cross-dimensional information between space and channel, and the amount of information of the second preset target cross-dimensional information is greater than the amount of information of the first preset target cross-dimensional information.

6. The target detection method according to claim 1, It is characterized in that Before determining the target detection algorithm, the method further includes: Determine an initial target detection algorithm, wherein the initial target detection algorithm includes an initial attention encoding unit based on depthwise separable convolution, an initial label supervision unit, an initial attention decoding unit based on depthwise separable convolution, and a sigmoid function connected in sequence; Acquire an image training set, wherein the image training set includes a plurality of training images, and each training image includes at least one infrared dim small target; The image training set is used to train the initial attention encoding unit based on depthwise separable convolution, the initial label supervision unit, and the initial attention decoding unit based on depthwise separable convolution in the initial target detection algorithm to obtain the target detection algorithm, wherein the target detection algorithm includes the trained attention encoding unit based on depthwise separable convolution, the trained label supervision unit, the trained attention decoding unit based on depthwise separable convolution, and the sigmoid function connected in sequence.

7. A target detection device, It is characterized in that include: An acquisition module is used to respond to a target detection request, acquire an infrared image carried by the target detection request, and determine a target detection algorithm, wherein the target detection algorithm includes an attention encoding unit based on a depthwise separable convolution, a label supervision unit, an attention decoding unit based on a depthwise separable convolution, and a sigmoid function connected in sequence, and the infrared image includes a small infrared target; An encoding module, configured to alternately encode the features of the infrared image according to the attention encoding unit based on the depthwise separable convolution, to obtain a first feature map having cross-dimensional information between channels and spaces, and a second feature map having a target number of channels; A fusion module, used for fusing the first feature map with the label based on the label supervision unit to obtain a third feature map with label information; A decoding module, configured to perform alternate decoding based on the third feature map with label information and the second feature map with the target number of channels using the attention decoding unit based on the depthwise separable convolution to obtain a decoded feature map; A processing module, used to process the decoded feature map using the sigmoid function to obtain a detection result with infrared weak target information; The label supervision unit includes multiple label supervision modules; the fusion module is also used to: extract multiple output feature maps with cross-dimensional information between channels and spaces from the first feature map, wherein each output feature map serves as an input feature map of a label supervision module; perform the following operations on each label supervision module: determine the input label corresponding to the label supervision module, and determine the input feature map corresponding to the label supervision module, and fuse the input label and the input feature map based on the label supervision module to obtain a feature map with label information, wherein the input label corresponding to the label supervision module has an association relationship with the input label corresponding to an adjacent label supervision module on the label supervision module; combine multiple feature maps with label information to obtain the third feature map.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Medical image retrieval network training method, medical image retrieval network application method and electronic equipment

    CN115757844A

  • Remote sensing image saliency target detection method

    CN118015332A