Target detection method, device, equipment, medium and computer program product
Through the combination of feature extraction module, three-dimensional attention module and feature pyramid network, the problems of insufficient semantic information and complex background interference in remote sensing image object detection are solved, and the accuracy of remote sensing object detection and the detection effect of small targets are improved.
Patent Information
- Application Number
- CN202211111288.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-09-13
AI Technical Summary
The existing remote sensing image object detection methods have insufficient semantic information of artificial design features and poor robustness. In the feature extraction stage, deep learning-based methods are difficult to effectively deal with difficulties such as complex background, dense small targets, and large target scale differences, resulting in unsatisfactory detection results.
The feature extraction module, three-dimensional attention module and feature pyramid network are used to improve the accuracy of object detection by cropping, feature extraction, multi-scale fusion and recursive fusion of the images to be detected, combined with the classification regression module.
It improves the accuracy of remote sensing object detection, enhances the suppression of complex backgrounds and fine-grained information extraction of small targets, and achieves more efficient object detection.
Smart Images

Figure CN115578611B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning network technology, and in particular to a target detection method, device, equipment, medium and computer program product. Background Art
[0002] Remote sensing image target detection technology is an important component of automatic acquisition of remote sensing information. Its main purpose is to detect and locate the target of interest from remote sensing images. Existing remote sensing target detection methods mainly include the following two types: (1) Traditional remote sensing image target detection methods mainly rely on artificially designed low-level features such as texture and edge of the target to be measured, first obtain candidate regions, then according to task requirements, researchers artificially design low-level features based on prior knowledge, and then use classifiers to obtain target categories; (2) Remote sensing target detection methods based on deep learning, first obtain image features based on convolution operations, then obtain candidate regions based on region selection networks, that is, realize rough positioning of targets and rough classification of targets and backgrounds, and finally extract regional features by mapping the region of interest to the feature map, and finally perform target classification and detection box regression.
[0003] The target detection method (1) above uses artificially designed features, which are complex to implement, contain less semantic information, and are less targeted. Moreover, the artificially designed feature hierarchy is relatively elementary and it is difficult to obtain high-level semantic information. In addition, such features are difficult to effectively deal with complex and diverse remote sensing targets at the same time and have poor robustness. The target detection method (2) has a high model complexity and does not address the difficulties in remote sensing images such as complex backgrounds, dense small targets, and large differences in target scales during the feature extraction stage, resulting in unsatisfactory target detection results. Summary of the Invention
[0004] The present invention provides a target detection method, device, equipment, storage medium and computer program product, which are used to solve the technical problems existing in the existing remote sensing image target detection method.
[0005] The present invention provides a target detection method, which is applied to a target detection system. The target detection system includes a feature extraction module, a three-dimensional attention module, and a feature pyramid network. The target detection method includes:
[0006] Cropping the image to be detected to obtain an image containing the target, and inputting the image containing the target into the feature extraction module to obtain a first image feature of the image containing the target;
[0007] Inputting the features of each layer corresponding to the first image feature into the three-dimensional attention module to obtain a second image feature;
[0008] Inputting the features of each layer corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain a third image feature;
[0009] Determine an object detection result of the image to be detected according to the third image feature.
[0010] According to a target detection method provided by the present invention, the target detection system further includes a recursive fusion module; the step of determining the target detection result of the image to be detected based on the third image feature includes:
[0011] Inputting the first fusion feature and the second fusion feature corresponding to the third image feature into the recursive fusion module;
[0012] The second fusion feature is sequentially subjected to the first convolution and activation function operations to generate an attention map;
[0013] A weighted sum of the first fusion feature and the second fusion feature is calculated according to the attention map, and a target detection result of the image to be detected is determined according to the weighted sum.
[0014] According to a target detection method provided by the present invention, the target detection system further includes a classification regression module; the step of determining the target detection result of the image to be detected based on the weighted sum includes:
[0015] Obtaining the number of prior frames, the number of categories, and prior frame adjustment information corresponding to each weighted sum;
[0016] Inputting the number of prior boxes and the number of categories corresponding to each weighted sum into the first subnet in the classification and regression module to obtain a first detection result;
[0017] Inputting the number of prior boxes corresponding to each weighted sum and the prior box adjustment information into the second subnet in the classification and regression module to obtain a second detection result;
[0018] An object detection result of the image to be detected is determined according to the first detection result and the second detection result.
[0019] According to a target detection method provided by the present invention, the step of inputting the features of each layer corresponding to the first image feature into the three-dimensional attention module to obtain the second image feature includes:
[0020] Determining target neurons and other neurons in a single channel of each layer of features corresponding to the first image feature;
[0021] Determining the importance of the target neuron according to the target neuron and the other neurons;
[0022] A second image feature is obtained according to the importance, the activation function operation, and the XOR operation.
[0023] According to a target detection method provided by the present invention, the target detection system further includes a feature connection module; after the step of inputting the features of each layer corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain the third image feature, the method includes:
[0024] Obtaining the convolution kernel size, convolution void ratio, and convolution padding size corresponding to each branch in the feature connection module;
[0025] Determining a transformed image feature corresponding to the third image feature according to the convolution kernel size, the convolution hole ratio, and the convolution padding size;
[0026] The transformed image feature is connected with the first image feature to complete a recursion.
[0027] According to a target detection method provided by the present invention, the step of cropping the image to be detected to obtain an image containing the target includes:
[0028] According to the preset sliding window and the preset cropping overlap ratio, the image to be detected is cropped to obtain an image containing the target.
[0029] The present invention also provides a target detection device, comprising:
[0030] A first image feature determination module is configured to crop the image to be detected to obtain an image containing a target, and input the image containing the target into a feature extraction module to obtain a first image feature of the image containing the target;
[0031] a second image feature determination module, configured to input the features of each layer corresponding to the first image feature into a three-dimensional attention module to obtain a second image feature;
[0032] a third image feature determination module, configured to input features of each layer corresponding to the second image feature into a feature pyramid network for multi-scale fusion to obtain a third image feature;
[0033] a third image feature recursive fusion module, configured to input the features of each layer corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain a third image feature;
[0034] The target detection module is used to determine the target detection result of the image to be detected based on the third image feature.
[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the target detection methods described above is implemented.
[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the target detection methods described above when executed by a processor.
[0037] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the target detection methods described above.
[0038] The present invention provides a target detection method, apparatus, device, storage medium and computer program product. The target detection method is applied to a target detection system including a feature extraction module, a three-dimensional attention module and a feature pyramid network. First, the image to be detected is cropped to obtain an image containing the target. The image containing the target is input into the feature extraction module to obtain a first image feature corresponding to the image. Then, each layer of features corresponding to the first image feature is input into the three-dimensional attention module to obtain an enhanced second image feature. Then, each layer of features corresponding to the second image feature is input into the feature pyramid network for multi-scale fusion to obtain a third image feature. Finally, the target detection result of the image to be detected is determined based on the third image feature. The accuracy of remote sensing target detection is improved by the target detection system including the feature extraction module, the three-dimensional attention module and the feature pyramid network. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 This is one of the flow charts of the target detection method provided by the present invention;
[0041] Figure 2 It is a network framework diagram of the target detection method provided by the present invention;
[0042] Figure 3 This is the second flow chart of the target detection method provided by the present invention;
[0043] Figure 4 It is a structural schematic diagram of the target detection device provided by the present invention;
[0044] Figure 5It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0045] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0046] The following combination Figure 1-Figure 2 The target detection method of the present invention is described.
[0047] Please refer to Figure 1 , the present invention provides a target detection method, comprising:
[0048] Step 100: cropping the image to be detected to obtain an image containing the target, and inputting the image containing the target into the feature extraction module to obtain a first image feature of the image containing the target;
[0049] Specifically, due to the constraints of hardware computing power and memory size, the target detection method of remote sensing images provided by the present invention adopts a sliding window method to crop the remote sensing image with a large field of view (i.e., the image to be detected in this embodiment), and adopts a cropping overlap rate of n% (n is a positive integer, such as 25) to ensure the integrity of the target on the edge of the image as much as possible. After cropping, an image containing the target is obtained, i.e., the target-containing image in this embodiment, and then the target-containing image is input into a feature extraction module (e.g., a ResNet residual network), and the feature extraction module performs feature extraction on the target-containing image to obtain a first image feature containing the target image.
[0050] Step 200: Input the features of each layer corresponding to the first image feature into the three-dimensional attention module to obtain a second image feature;
[0051] Specifically, each layer of feature maps output by the feature extraction module (i.e., the layers of features corresponding to the first image feature in this embodiment) is followed by a three-dimensional attention module, which derives three-dimensional attention weights for the feature maps without any additional parameters, suppressing the interference of complex backgrounds and enhancing target information, especially the fine-grained information of dense small targets, thereby effectively enhancing target information. Figure 2 The three-dimensional attention module in this embodiment is Figure 2 The "3-D Attenion" in
[15] inserts the three-dimensional attention module between the feature extraction module and the feature pyramid network to suppress background information and eliminate target noise in remote sensing images.
[0052] Step 300: Input each layer of features corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain a third image feature;
[0053] Specifically, the features of each layer corresponding to the second image feature obtained after strengthening the three-dimensional attention module are input into the feature pyramid network for deep secondary recursive fusion to achieve effective feature acquisition of multi-scale remote sensing targets and dense small targets, and obtain the third image feature. The FPN (Feature Pyramid Network) is fed back from top to bottom into the bottom-up process of the feature extraction module, mainly for obtaining semantic information. The recursive feature pyramid is based on FPN. The output of the FPN layer is fed back into the feature extraction module. FPN is executed recursively to obtain a more powerful feature expression. In this article, the bottom-up feature extraction module and FPN will run twice. The third image feature is connected to the first image feature through the feature connection module to complete a recursion. The third image feature is determined again through the second image feature determination module. The third image feature determination module obtains the second multi-scale fused third image feature. The two third image features are fused through the fusion module to obtain the new feature of the image to be detected.
[0054] Step 400: Determine the target detection result of the image to be detected according to the third image feature.
[0055] Specifically, after obtaining the third image feature, the effective layer features corresponding to the third image feature are respectively Figure 2 The "Fusion" in the feature transformation, and through Figure 2 The “Class&Box Subnets” in the image is used for target classification and regression to obtain the target detection results of the image to be detected.
[0056] In this embodiment, the image to be detected is first cropped to obtain an image containing the target, the image containing the target is input into a feature extraction module to obtain a first image feature corresponding to the image, and then the features of each layer corresponding to the first image feature are input into a three-dimensional attention module to obtain an enhanced second image feature, and then the features of each layer corresponding to the second image feature are input into a feature pyramid network for multi-scale fusion to obtain a third image feature. Finally, the target detection result of the image to be detected is determined based on the third image feature. The accuracy of remote sensing target detection is improved by using a target detection system including a feature extraction module, a three-dimensional attention module and a feature pyramid network.
[0057] In one embodiment, the target detection method provided in the embodiments of the present application may further include:
[0058] Step 410: input the first fusion feature and the second fusion feature corresponding to the third image feature into the recursive fusion module;
[0059] Step 420: Apply the second fusion feature to the first convolution and activation function operations in sequence to generate an attention map;
[0060] Step 430: Calculate a weighted sum of the first fusion feature and the second fusion feature according to the attention map, and determine the target detection result of the image to be detected according to the weighted sum.
[0061] Specifically, the target detection system provided by the present invention also includes a recursive fusion module, which inputs the first fusion feature and the second fusion feature corresponding to the third image feature into the recursive fusion module, and generates an attention map by performing convolutional layer and activation function operations on the second fusion feature. The weighted sum of the first fusion feature and the second fusion feature is then calculated through the attention map, and finally the calculated weighted sums are used as the output of the recursive fusion module for subsequent target detection and regression.
[0062] This embodiment calculates the weighted sum of fused features through a recursive fusion module for subsequent target detection and regression.
[0063] Please refer to Figure 3 In one embodiment, the target detection method provided in the embodiment of the present application may further include:
[0064] Step 431, obtaining the number of prior frames, the number of categories, and prior frame adjustment information corresponding to each weighted sum;
[0065] Step 432: Input the number of prior boxes and the number of categories corresponding to each weighted sum into the first subnet in the classification and regression module to obtain a first detection result;
[0066] Step 433: Input the number of prior boxes corresponding to each weighted sum and the prior box adjustment information into the second subnet in the classification and regression module to obtain a second detection result;
[0067] Step 434: Determine the target detection result of the image to be detected based on the first detection result and the second detection result.
[0068] Specifically, after obtaining the third image feature, the effective layer features corresponding to the third image feature are respectively Figure 2The "Class & Box Subnets" in the image are used for target classification and regression. The "Class & Box Subnets" include Class Subnets (i.e., the first subnet in this embodiment) and Box Subnet (i.e., the second subnet in this embodiment). The class subnet uses 4 convolutions of 256 channels and 1 convolution of num_priors x num_classes. Num_priors refers to the number of prior boxes owned by each feature layer, and num_classes refers to the total number of classes (i.e., the number of categories in this embodiment) of targets detected. The box subnet uses 4 convolutions of 256 channels and 1 convolution of num_priors x 4. Num_priors refers to the number of prior boxes owned by the feature layer, and 4 refers to the adjustment of the prior box (i.e., the prior box adjustment information in this embodiment). It should be noted that the class subnet used for each feature layer corresponding to the third image feature is the same; the box subnet used for each feature layer is also the same. The detection result obtained by the first subnet is the first detection result in this embodiment, and the detection result obtained by the second subnet is the second detection result in this embodiment. Finally, the target detection result of the image to be detected is determined based on the first detection result and the second detection result.
[0069] This embodiment obtains the target detection result of the remote sensing image through target classification and regression.
[0070] In one embodiment, the target detection method provided in the embodiments of the present application may further include:
[0071] Step 210: determining target neurons and other neurons in a single channel of each layer of features corresponding to the first image feature;
[0072] Step 220, determining the importance of the target neuron based on the target neuron and the other neurons;
[0073] Step 230: Obtain a second image feature according to the importance, the activation function operation, and the XOR operation.
[0074] Specifically, in order to better realize attention, the importance of each neuron must be evaluated and the energy function shown in the following formula (1) is defined, where t and x i are the target neuron and other neurons in a single channel of the first image feature, respectively; i is the index in the spatial dimension, M is the number of neurons in a single channel; w t and b t are the weights and biases of the transformation; is a hyperparameter; the energy value of each neuron is calculated according to formula (1). The lower the energy value, the greater the difference between the neuron and the surrounding neurons, and the higher its importance.
[0075]
[0076] The first image feature is enhanced according to the above formula (2) to obtain the second image feature, where E is the grouping of all energy values in the channel and spatial dimensions; sigmoid (i.e., the activation function in this embodiment) is used to limit values in E that are too large, and ⊙ is the exclusive-OR operation in this embodiment.
[0077] This embodiment enhances the first image feature by mining the importance of neurons.
[0078] In one embodiment, the target detection method provided in the embodiments of the present application may further include:
[0079] Step 500: Obtain the convolution kernel size, convolution void ratio, and convolution padding size corresponding to each branch in the feature connection module;
[0080] Step 600: determining a transformed image feature corresponding to the third image feature according to the convolution kernel size, the convolution hole ratio, and the convolution padding size;
[0081] Step 700: Connect the transformed image feature with the first image feature to complete a recursion.
[0082] Specifically, the feature connection module in this embodiment is Figure 2 The "ASPP" in the code, or atrous spatial pyramid pooling (ASPP), involves convolving features obtained from the previous layer using dilated convolutions at different sampling rates, effectively extracting information at different scales. While maintaining the same computational conditions, dilated convolutions increase the receptive field without losing information through pooling, allowing each convolutional output to contain information from a wider range of scales.
[0083] The features of each layer corresponding to the third image feature are input into the ASPP module. The ASPP module has four parallel branches. The features of each layer corresponding to the third image feature are input, and the output is spliced along the channel dimension to form the final image feature, i.e., the transformed image feature in this embodiment. The first three parallel branches are the convolution kernel size, the convolution void ratio, and the convolution padding size. The fourth parallel branch is transformed into 1 / n of the third image feature through global average pooling, 1x1 convolution, and ReLU (activation function), where n is a positive integer.
[0084] This embodiment increases the receptive field by inputting the features of each layer corresponding to the third image feature into the dilated spatial pyramid pooling module for feature conversion, so that the output of each convolution operation contains a wider range of information.
[0085] In one embodiment, the target detection method provided in the embodiments of the present application may further include:
[0086] Step 110 : cropping the image to be detected to obtain an image containing the target according to a preset sliding window and a preset cropping overlap ratio.
[0087] Specifically, the target detection method of remote sensing images provided by the present invention adopts a sliding window method (i.e., the preset sliding window in this embodiment) to crop the remote sensing image with a large field of view (i.e., the image to be detected in this embodiment), and adopts a cropping overlap rate of n% (n is a positive integer, for example, 25) (i.e., the preset cropping overlap rate in this embodiment) to ensure the integrity of the target on the edge of the image as much as possible. After cropping, an image containing the target is obtained, i.e., the target-containing image in this embodiment.
[0088] This embodiment crops the image to be detected by using a sliding window and cropping overlap ratio.
[0089] The target detection device provided by the present invention is described below. The target detection device described below and the target detection method described above can be referenced to each other.
[0090] Please refer to Figure 4 The present invention also provides a target detection device, comprising:
[0091] A first image feature determination module 401 is configured to crop the image to be detected to obtain an image containing a target, and input the image containing the target into a feature extraction module to obtain a first image feature of the image containing the target;
[0092] A second image feature determination module 402 is configured to input the features of each layer corresponding to the first image feature into a three-dimensional attention module to obtain a second image feature;
[0093] A third image feature determination module 403 is configured to input the features of each layer corresponding to the second image feature into a feature pyramid network for multi-scale fusion to obtain a third image feature;
[0094] The target detection module 404 is configured to determine a target detection result of the image to be detected according to the third image feature.
[0095] Optionally, the target detection system further includes a recursive fusion module; the target detection module includes:
[0096] a feature fusion unit, configured to input the first fusion feature and the second fusion feature corresponding to the third image feature into the recursive fusion module;
[0097] An attention map generating unit, configured to sequentially perform the first convolution and activation function operations on the second fused features to generate an attention map;
[0098] A recursive result fusion unit is used to calculate the weighted sum of the first fusion feature and the second fusion feature according to the attention map, and determine the third image feature after the recursive fusion according to the weighted sum to implement subsequent target detection.
[0099] Optionally, the target detection system further includes a classification and regression module; and the target detection result determination unit includes:
[0100] An information acquisition unit, configured to acquire the number of prior frames, the number of categories, and prior frame adjustment information corresponding to each weighted sum;
[0101] A first detection result determining unit is configured to input the number of prior boxes and the number of categories corresponding to each weighted sum into the first subnet in the classification and regression module to obtain a first detection result;
[0102] A second detection result determination unit is configured to input the number of prior frames corresponding to each weighted sum and the prior frame adjustment information into the second subnet in the classification and regression module to obtain a second detection result;
[0103] The target detection result determining unit is used to determine the target detection result of the image to be detected based on the first detection result and the second detection result.
[0104] Optionally, the second image feature determination module includes:
[0105] a neuron determination unit, configured to determine target neurons and other neurons in a single channel of each layer of features corresponding to the first image feature;
[0106] an importance determining unit, configured to determine the importance of the target neuron based on the target neuron and the other neurons;
[0107] The second image feature determination unit is configured to obtain a second image feature according to the importance, the activation function operation, and the XOR operation.
[0108] Optionally, the target detection system further includes a feature connection module; and the target detection device further includes:
[0109] A convolution information acquisition module is used to obtain the convolution kernel size, convolution void ratio and convolution filling size corresponding to each branch in the feature connection module;
[0110] a transformed image feature determination module, configured to determine a transformed image feature corresponding to the third image feature according to the convolution kernel size, the convolution void ratio, and the convolution padding size;
[0111] The feature connection module is used to connect the transformed image feature with the first image feature to complete a recursion.
[0112] Optionally, the first image feature determination module includes:
[0113] The image cropping unit is used to crop the image to be detected to obtain an image containing the target according to a preset sliding window and a preset cropping overlap ratio.
[0114] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the target detection method.
[0115] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0116] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the target detection methods provided by the above methods.
[0117] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the target detection method provided by the above methods.
[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes 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 embodiment or certain parts of the embodiments.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A target detection method, characterized in that: The target detection method is applied to a target detection system, which includes a feature extraction module, a three-dimensional attention module, a feature pyramid network and a recursive fusion module; The target detection method comprises: Cropping the image to be detected to obtain an image containing the target, and inputting the image containing the target into the feature extraction module to obtain a first image feature of the image containing the target; Inputting the features of each layer corresponding to the first image feature into the three-dimensional attention module to obtain a second image feature; Inputting the features of each layer corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain a third image feature; determining a target detection result of the image to be detected according to the third image feature; The step of determining the target detection result of the image to be detected according to the third image feature includes: Inputting the first fusion feature and the second fusion feature corresponding to the third image feature into the recursive fusion module; The second fusion feature is sequentially subjected to the first convolution and activation function operations to generate an attention map; Calculating a weighted sum of the first fusion feature and the second fusion feature according to the attention map, and determining an object detection result of the image to be detected according to the weighted sum; The step of inputting the features of each layer corresponding to the first image feature into the three-dimensional attention module to obtain the second image feature includes: Determining target neurons and other neurons in a single channel of each layer of features corresponding to the first image feature; Determining the importance of the target neuron according to the target neuron and the other neurons; A second image feature is obtained according to the importance, the activation function operation, and the XOR operation.
2. The target detection method according to claim 1, wherein: The target detection system further includes a classification and regression module; the step of determining the target detection result of the image to be detected based on the weighted sum includes: Obtaining the number of prior frames, the number of categories, and prior frame adjustment information corresponding to each weighted sum; Inputting the number of prior boxes and the number of categories corresponding to each weighted sum into the first subnet in the classification and regression module to obtain a first detection result; Inputting the number of prior boxes corresponding to each weighted sum and the prior box adjustment information into the second subnet in the classification and regression module to obtain a second detection result; An object detection result of the image to be detected is determined according to the first detection result and the second detection result.
3. The target detection method according to claim 1, wherein: The target detection system further includes a feature connection module; after the step of inputting the features of each layer corresponding to the second image feature into the feature pyramid network for multi-scale fusion to obtain the third image feature, the following steps are included: Obtaining the convolution kernel size, convolution void ratio, and convolution padding size corresponding to each branch in the feature connection module; Determining a transformed image feature corresponding to the third image feature according to the convolution kernel size, the convolution hole ratio, and the convolution padding size; The transformed image feature is connected with the first image feature to complete a recursion.
4. The target detection method according to claim 1, wherein: The step of cropping the image to be detected to obtain the target image includes: According to the preset sliding window and the preset cropping overlap ratio, the image to be detected is cropped to obtain an image containing the target.
5. A target detection device, characterized in that: include: A first image feature determination module is configured to crop the image to be detected to obtain an image containing a target, and input the image containing the target into a feature extraction module to obtain a first image feature of the image containing the target; a second image feature determination module, configured to input the features of each layer corresponding to the first image feature into a three-dimensional attention module to obtain a second image feature; a third image feature determination module, configured to input features of each layer corresponding to the second image feature into a feature pyramid network for multi-scale fusion to obtain a third image feature; An object detection module is configured to determine an object detection result of the image to be detected based on the third image feature; The target detection module is also used to: Inputting the first fusion feature and the second fusion feature corresponding to the third image feature into a recursive fusion module; The second fusion feature is sequentially subjected to the first convolution and activation function operations to generate an attention map; Calculating a weighted sum of the first fusion feature and the second fusion feature according to the attention map, and determining an object detection result of the image to be detected according to the weighted sum; The second image feature determination module is further configured to: Determining target neurons and other neurons in a single channel of each layer of features corresponding to the first image feature; Determining the importance of the target neuron according to the target neuron and the other neurons; A second image feature is obtained according to the importance, the activation function operation, and the XOR operation.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the target detection method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the target detection method according to any one of claims 1 to 4 is implemented.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the target detection method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
A method and system for underwater image target detection
CN109214319A
Camouflage target detection method based on improved YOLO algorithm
CN112801169A