A small target detection system and method based on improved YOLOv5
By improving the YOLOv5 model, integrating coordinate attention and multi-scale feature purification module, the problem of insufficient semantic information extraction of small target features is solved, the accuracy of small target detection and detection ability of objects of different scales is improved, and feature information loss and Background interference.
Patent Information
- Application Number
- CN202311401134.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2043-10-26
AI Technical Summary
Small targets have blurred features in complex backgrounds and few feature extractions, resulting in low detection accuracy and it is difficult for the prior art to accurately identify and locate.
Improve the YOLOv5 model, integrate the coordinate attention feature extraction module to enhance feature extraction capabilities, increase the detection head for detecting small targets, and use the multi-scale feature purification module to filter out feature conflict information, so as to improve the discriminant nature of small target features.
It improves the accuracy of small object detection and category detection accuracy, reduces the loss of feature information, enhances the detection ability of objects of different scales, obtains richer feature information, and reduces background interference.
Smart Images

Figure CN117523267B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and in particular to a small target detection system and method. Background Art
[0002] In recent years, with the explosive growth of Internet data and the substantial improvement of computer computing power, small target detection technology has been widely used in military, national defense, transportation, industrial automation and other fields. However, due to the small size of the target in the image pixels, the relatively few available features, and the complex environment, these fields have a large number of small targets with low resolution, easy loss of features, and difficulty in accurate detection. Therefore, how to accurately identify and locate small targets is an important topic in the field of computer vision. At the same time, improving the accuracy of small target detection has important theoretical significance and good engineering application value.
[0003] At present, there are many works dedicated to improving the existing problems at this stage. For example, Tong Xiaozhong et al. proposed a typical surface small target detection algorithm that integrates attention and multi-scale features. By using void space pyramid pooling, attention fusion module and fusion multi-scale feature modules, it effectively solved the problems of small target detection on the surface of water with complex sea conditions in multiple scenes, such as few available features and weak texture information, and improved the environmental perception ability of unmanned boats. Liu Shudong et al. proposed a small target detection algorithm for drone aerial images based on inverted residual attention to address the problems of complex background and many small-sized targets in drone aerial images. This method improves the problems of missed detection and false detection of small targets in drone aerial images by embedding inverted residual modules and inverted residual attention modules in the backbone network and designing multi-scale feature fusion modules. Based on the RCNN model, Wang Dianwei et al. introduced Transformer and convolutional modules and proposed a feature pyramid network structure based on content-aware feature reorganization, which can achieve more accurate classification and positioning of small targets.
[0004] Since the features of small targets are fuzzy, fewer features can be extracted. At the same time, small targets are usually in complex backgrounds, and their surrounding environment and noise make it difficult to extract their features, resulting in poor detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 It is a flow chart of the present invention.
[0006] Figure 2 is the coordinate attention submodule.
[0007] Figure 3 This is the structural diagram of the multi-scale feature purification module. Summary of the invention
[0008] In order to solve the technical problem that small target feature extraction has less semantic information, the present invention proposes a small target detection system and method based on improved YOLOv5, wherein the backbone network of the YOLOv5 model integrates coordinate attention, which can improve the feature extraction ability and category detection accuracy of the network model; at the same time, a layer of detection head for detecting small targets is added on the basis of the original detection network to reduce the loss of small target feature information caused by excessive convolution; finally, a multi-scale feature purification module is used to filter out feature conflict information, improve the discriminability of small target features, enable the model to obtain richer feature information, and strengthen the network model's detection of objects of different scales.
[0009] Specifically, a small target detection system based on improved YOLOv5 is characterized in that the system includes a feature extraction module integrating coordinate attention, a reconstruction detection layer module, and a multi-scale feature purification module, wherein:
[0010] (1) The backbone network module integrating coordinate attention includes a coordinate information embedding submodule and a coordinate attention generation submodule. The module takes the position information as input. The coordinate attention generation submodule performs feature aggregation in the horizontal and vertical directions respectively, and then uses the compressed excitation attention module to generate weight vectors in the two directions. Finally, the weight vectors in the two directions are multiplied by the feature map to obtain the weighted output.
[0011] (2) Reconstruct the detection layer module. This module is based on the original detection head of YOLOv5 and adds a detection layer for detecting small targets to meet the requirements of small target detection.
[0012] (3) Multi-scale feature purification module: This module aggregates the global spatial information of the image, and then uses splicing and convolution operations to compress the number of channels of all features. It is then connected with the parallel channel purification submodule and spatial purification submodule to obtain the global spatial information of the aggregated image and filter out the conflicting information of the features.
[0013] Furthermore, the coordinate attention module performs feature aggregation to obtain a feature map with direction awareness. The specific calculation steps are:
[0014] (1) Calculation in is the output of the cth channel at height position h, is the output of the cth channel at width position w; X c (h, j) is the feature map X of the input image c The value at position (h, j), X c (i, w) is the feature map X of the input image c The value at position (i, w); W is the channel width; H is the channel height.
[0015] (2) Concatenate the feature maps in the height and width dimensions of the global receptive field, and then send the concatenated tensor into the 1×1 convolution function F1 for calculation, that is, f = δ(F1[z h , z w ]), where f is the intermediate feature map, which realizes feature aggregation in the horizontal and vertical directions, and f∈R c / r×(H+W) ; r is a hyperparameter used to control the module size and reduce the number of channels of f. f is divided into vertical f according to different directions h ∈R C / r×H and f in the horizontal direction w ∈R C / r×W , and use two 1×1 convolution functions F h and F w , and σ transformation to obtain the attention weights g in two independent spatial directions h , g w , and finally expand it and act on the input to get the final output y C , where g h =σ(F h (f h )), g w =σ(F w (f w )),
[0016] Furthermore, the reconstruction detection layer module detects objects of different sizes based on three different detection layers of YOLOv5, and adds a new detection head for detecting small objects.
[0017] Furthermore, the multi-scale feature purification module inputs X 1 , X 2 , X 3 , X 4 Four features, this module is located in the second layer of the feature pyramid network, firstly converting X 1 , X 2 , X 3 , X 4 Scaled to the same size, respectively R 1 , R 2 , R 3 , R 4 Then, the number of channels of all features is compressed to 4 by splicing and convolution operations, and then connected with the parallel channel purification submodule and spatial purification submodule; among them, the channel purification submodule uses the combination of average pooling and maximum pooling to aggregate the global spatial information of the image, and uses X m It represents the m-th layer input feature map of the feature refinement module, and its output can be expressed as U = α × Rs (x 1 )+β×(X 2 )+γ×RS(X3 )+δ×RS(X 4 ), where RS is the resize function, which resizes X 1 and X 3 , X 4 Features scaled to and X 2 At the same scale, α, β, γ, and δ are channel adaptive weights with a scale of 1×1×1. The normalized α, β, γ, and δ represent the relative weights of the four inputs. [α, β, γ, δ] = sigmoid[AvgPool(F)+MaxPool(F)], where F is the feature map identified in the figure, sigmoid is the sigmoid activation function, and AvgPool and MaxPool are average pooling and maximum pooling operations, respectively.
[0018] Furthermore, the spatial purification submodule uses the softmax function to normalize the feature map in space, obtains the relative weight of a point in the feature map with respect to all other positions, and then multiplies the relative weight with the input respectively. The output (x, y) represents the spatial coordinates of the feature map. is the spatial adaptive weight, satisfying Where D is the relative weight of a point in the feature map with respect to all other positions, and the Softmax function is used to normalize the feature parameters. The total output of the multi-scale feature purification module is P = U + D.
[0019] Based on the above system, the present invention proposes a small target detection method based on improved YOLOv5, which includes the following steps:
[0020] (1) The backbone network of the fusion coordinate attention takes the position information as input, performs feature aggregation in the horizontal and vertical directions respectively, and then uses the compressed excitation attention module to generate weight vectors in the two directions. Finally, the weight vectors in the two directions are multiplied by the feature map to obtain the weighted output.
[0021] (2) Reconstruct the detection layer. Based on the original detection head of YOLOv5, a new detection layer for detecting small targets is added to meet the requirements of small target detection.
[0022] (3) Multi-scale feature purification: aggregate the global spatial information of the image, and then use splicing and convolution operations to compress the number of channels of all features. Then, channel purification and spatial purification are performed simultaneously to obtain the global spatial information of the aggregated image and filter out the conflicting information of the features.
[0023] More specifically, in step (1), the specific calculation steps for performing feature aggregation in the horizontal and vertical directions are:
[0024] (1) Calculation in is the output of the cth channel at height position h, is the output of the cth channel at width position w; X c (h, j) is the feature map X of the input image c The value at position (h, j), X c (i, w) is the feature map X of the input image c The value at position (i, w); W is the channel width; H is the channel height.
[0025] (2) Concatenate the feature maps in the height and width dimensions of the global receptive field, and then send the concatenated tensor into the 1×1 convolution function F1 for calculation, that is, f = δ(F1[z h , z w ]), where f is the intermediate feature map, which realizes feature aggregation in the horizontal and vertical directions, and f∈R c / r×(H+W) ; r is a hyperparameter used to control the module size and reduce the number of channels of f. f is divided into vertical f according to different directions h ∈R C / r×H and f in the horizontal direction w ∈R C / r×W , and use two 1×1 convolution functions F h and F w , and σ transformation to obtain the attention weights g in two independent spatial directions h g w , and finally expand it and act on the input to get the final output y C , where g h =σ(F h (f h )), g w =σ(F w (f w )),
[0026] Furthermore, in step (2), three different detection layers of YOLOv5 are used to detect targets of different sizes, and on this basis, a new detection head for detecting small targets is added.
[0027] Furthermore, in step (3), input X 1 , X 2 , X 3 , X 4 Four features, first of all, X 1 , X 2 , X 3 , X 4 Scaled to the same size, respectively R 1 , R 2 , R 3 , R4 Then, the number of channels of all features is compressed to 4 by splicing and convolution operations, and then channel purification and spatial purification are performed simultaneously; among them, channel purification uses a combination of average pooling and maximum pooling to aggregate the global spatial information of the image, and X m It represents the m-th layer input feature map of the feature refinement module, and its output can be expressed as U = α × Rs (X 1 )+β×(X 2 )+γ×RS(X 3 )+δ×RS(X 4 ), where RS is the resize function, which resizes X 1 and X 3 , X 4 Features scaled to and X 2 At the same scale, α, β, γ, and δ are channel adaptive weights with a scale of 1×1×1. The normalized α, β, γ, and δ represent the relative weights of the four inputs. [α, β, γ, δ] = sigmoid[AvgPool(F)+MaxPool(F)], where F is the feature map identified in the figure, sigmoid is the sigmoid activation function, and AvgPool and MaxPoo1 are average pooling and maximum pooling operations, respectively.
[0028] Furthermore, spatial purification uses the softmax function to normalize the feature map in space, obtain the relative weight of a point in the feature map with respect to all other positions, and then multiply the relative weight with the input respectively. The output (x, y) represents the spatial coordinates of the feature map. is the spatial adaptive weight, satisfying Where D is the relative weight of a point in the feature map with respect to all other positions, and the Softmax function is used to normalize the feature parameters. The total output of the multi-scale feature purification module is P = U + D.
[0029] The backbone network module is an important part of feature extraction, and its network structure directly affects the detection accuracy. Therefore, the attention mechanism is added to the convolution module to make the extracted features more comprehensive and richer. After the attention mechanism, the image feature map is obtained with a small receptive field and independent direction perception features. Therefore, the feature extraction module with coordinate attention mechanism is introduced into the backbone network, which can effectively improve the feature extraction ability of the backbone network and its ability to analyze complex scenes. This method can automatically ignore interference such as background, better focus on valuable areas, thereby obtaining more information, and avoiding waste of resources. After adding the detection layer, the feature loss of small targets after convolution operation is reduced, which helps to improve the detection performance of small targets. The multi-scale feature purification module can obtain the global spatial information of the aggregated image and filter out the conflicting information of the features. DETAILED DESCRIPTION
[0030] The present invention will be further explained below in conjunction with the embodiments and drawings.
[0031] The present invention improves the YOLOv5 model to realize the detection of small targets. On the basis of the original model, a detection layer specifically for detecting small targets is added, and the detection head is expanded to four. The backbone network is difficult to extract features of small targets, and the features are often difficult to capture, resulting in unsatisfactory detection results. The present invention proposes a feature extraction module that integrates coordinate attention to enhance the extraction of detail features and improve detection accuracy; the neck network integrates a multi-scale feature purification module to suppress conflicting information generated by the fusion of features of different scales.
[0032] The method of the present invention can be applied to multiple fields, such as maritime search, small target detection in satellite images, detection of people and objects in open waters, etc. It can also be applied to multiple scenarios where conventional target detection networks are difficult to accurately test, thereby improving the accuracy of small target detection.
[0033] The features of small targets are fuzzy, and fewer features can be extracted. At the same time, small targets are usually in complex backgrounds, and their surrounding environment and noise make it difficult to extract their features, resulting in poor detection results. The YOLOv5 model uses different convolution kernels to find different features in the image, and finally uses the output layer to find the features that best match a specific category. The output layer regresses the position of the target box and its corresponding category, and has superior performance compared to other target detection models.
[0034] In order to solve the problem of less semantic information in small target feature extraction, the algorithm makes the following improvements based on the YOLOv5 model: the backbone network of the YOLOv5 model integrates coordinate attention to improve the feature extraction ability and category detection accuracy of the network model; at the same time, a layer of detection head for detecting small targets is added on the basis of the original detection network to reduce the loss of small target feature information caused by excessive convolution; finally, on the basis of reconstructing the neck detection network, a multi-scale feature purification module is proposed to filter out conflicting feature information, improve the discriminability of small target features, enable the model to obtain richer feature information, and strengthen the network model's detection of objects of different scales. See the flowchart for details. Figure 1 .
[0035] This embodiment makes improvements on the basis of the YOLOv5 target detection algorithm. Firstly, the coordinate attention is introduced into the convolution module to form a feature extraction module to constitute the backbone network, so as to enhance the ability to extract feature information of small targets. A detection head is added to the reconstruction detection layer module, which is specifically used to detect small-scale targets. A multi-scale feature purification module is proposed based on the neck network of the feature pyramid network and the pixel aggregation network to suppress the conflicting information generated by the fusion of features of different scales.
[0036] Reference Figure 1 In this embodiment, pictures are collected offline and manually annotated. According to the preliminary collection of the data set, a data enhancement method is selected to form a training data set. The data set is first sent to the Focus structure of the backbone network, and the input feature map is sliced into 4 feature maps, which are then concatenated to form a new feature map through the Concat operation. Based on the above operations, the backbone network of the fused coordinate attention completes the enhanced feature extraction; then the neck network connects the extracted features with the bottom-up feature pyramid (the basic component in the recognition system for detecting objects of different scales) through upsampling, fuses semantic features and position features, and passes them into the multi-scale feature purification module to amplify the target features and suppress background noise; finally, the fused features are sent to the large-scale detection layer, the medium-scale detection layer, the small-scale detection layer, and the micro-scale detection layer of the prediction layer for detection to obtain the detection results.
[0037] Figure 2 In the feature extraction module, the coordinate attention is integrated to adjust the weights of important features to make the extracted features more comprehensive and richer. The feature extraction module takes the position information as input and aggregates the features in the horizontal and vertical directions to obtain a feature map with direction perception. The feature maps are then concatenated and sent to the convolution function F1 to calculate the f in different directions. h With f w , using the convolution function F h and F w , and σ transformation (Sigmoid activation function) to obtain the attention weights g in two independent spatial directionsh g w Finally, it is expanded and applied to the input to obtain the final output y C .
[0038] Multi-scale feature extraction module such as Figure 3 As shown in the figure, the four-layer output generated by the neck network of the feature pyramid network and the pixel aggregation network is the input of this module. First, X 1 , X 2 , X 3 , X 4 Scaled to the same size, respectively R 1 , R 2 , R 3 , R 4 Then, the number of channels of all features is compressed to 4 using concatenation and convolution operations, and then the channel purification submodule and spatial purification submodule are connected in parallel. The channel purification submodule uses a combination of average pooling and maximum pooling to aggregate the global spatial information of the image. m It represents the m-th layer input feature map of the feature refinement module, and its output U = α × RS (X 1 )+β×(X 2 )+γ×RS(X 3 )+δ×RS(X 4 ), where RS represents the resize function, which converts X 1 and X3, X 4 Features scaled to and X 2 At the same scale, α, β, γ, and δ are channel adaptive weights with a scale of 1×1×1. The normalized α, β, γ, and δ represent the relative weights of the four inputs. The larger the relative weights, the greater the response. The relative weights are multiplied by the inputs, and the inputs with large responses will be amplified, while the inputs with small responses will be suppressed. This will enhance more useful information and suppress unimportant noise. [α, β, γ, δ] = sigmoid[AvgPool(F)+MaxPool(F)].
[0039] The spatial purification submodule uses the softmax function to normalize the feature map in space, obtains the relative weight of a point in the feature map with respect to all other positions, and then multiplies it with the input. The output can be expressed as (x, y) represents the spatial coordinates of the feature map. For spatial adaptive weights, the larger the response of the target area, the greater the weight it will get, and vice versa, the background area will get a smaller weight. They have the same spatial size as the input, so directly multiplying them with the input can achieve the purpose of amplifying the target features and suppressing background noise. Their values can be expressed as follows: The Softmax function is used to normalize the feature parameters to improve the generalization ability of the model, and the total output of the multi-scale feature purification module is P = U + D.
[0040] The features of all layers of the feature pyramid network are fused under the guidance of adaptive weights, and the fusion result is used as the output of the entire network.
[0041] like Figure 1 As shown, based on the above modules, the extraction and fusion of image features are completed, and finally the prediction layer performs multi-scale detection on the feature map. This embodiment adds a small target detection layer, which generates a new feature map by extracting lower spatial features and fusing them with deep semantic features. The neck network forms a four-layer feature map, and the detection head completes the classification and positioning of the target detection frame, outputs the category, position and other information of the image, and completes small target detection. The new micro-scale detection layer forms a broader and more detailed detection network structure, which is suitable for smaller target detection.
Claims
1. A small target detection system based on improved YOLOv5, characterized by: The system includes a feature extraction module integrating coordinate attention, a neck detection network module, and a multi-scale feature purification module, among which: (1) A backbone network module integrating coordinate attention, which includes a coordinate information embedding submodule and a coordinate attention generation submodule. The module takes the position information as input. The coordinate attention generation submodule performs feature aggregation in the horizontal and vertical directions respectively, and then uses the compressed excitation attention module to generate weight vectors in the two directions. Finally, the weight vectors in the two directions are multiplied by the feature map to obtain the weighted output; (2) Reconstruct the detection layer module. This module is based on the original detection head of YOLOv5 and adds a detection layer for detecting small targets to meet the requirements of small target detection. (3) Multi-scale feature purification module: This module aggregates the global spatial information of the image, and then uses splicing and convolution operations to compress the number of channels of all features. It is then connected with the parallel channel purification submodule and spatial purification submodule to obtain the global spatial information of the aggregated image and filter out the conflicting information of the features.
2. A small target detection system based on improved YOLOv5 according to claim 1, characterized in that: The coordinate attention generation submodule can complete the following operations: (1) Calculation in is the output of the cth channel at height position h, is the output of the cth channel at width position w; X c (h,j) is the feature map X of the input image c The value at position (h, j), X c (i, w) is the feature map X of the input image c The value at the position (i, w); W is the channel width; H is the channel height; (2) Concatenate the feature maps in the height and width dimensions of the global receptive field, and then send the concatenated tensor into the 1×1 convolution function F1 for calculation, i.e., f-δ(F1[z h , z w ]), where f is the intermediate feature map, which realizes encoding in the horizontal and vertical directions, and f∈R c / r×(R+W) ; r is a hyperparameter used to control the module size and reduce the number of channels of f; f is divided into vertical f according to different directions h ∈R c / r×H and f in the horizontal direction w ∈R C / r×W , and use two 1×1 convolution functions F h and F w , and σ transformation to obtain the attention weights g in two independent spatial directions h , g w , and finally expand it and act on the input to get the final output y c , where g h =σ(F h (f s )), g w =s(F W (f w )), 3. A small target detection system based on improved YOLOv5 according to claim 1, characterized in that: The reconstruction detection layer module uses three different detection layers of YOLOv5 to detect targets of different sizes, and adds a new detection head for detecting small targets.
4. A small target detection system based on improved YOLOv5 according to claim 1, characterized in that: Input X in the multi-scale feature purification module 1 , X 2 , X 3 , X 4 Four features, this module is located in the second layer of the feature pyramid network, firstly converting X 1 , X 2 , X 3 , X 4 Scaled to the same size, R 1 , R 2 , R 3 , R 4 Then, the number of channels of all features is compressed to 4 by splicing and convolution operations, and then connected with the parallel channel purification submodule and spatial purification submodule; among them, the channel purification submodule uses the combination of average pooling and maximum pooling to aggregate the global spatial information of the image, and uses X m It represents the m-th layer input feature map of the feature refinement module, and its output can be expressed as U = a × RS (X 1 )+β×(X 2 )+γ+×RS(X 3 )+δ×RS(X 4 ), where RS is the resize function, which resizes X 1 and X 3 , X 4 Features scaled to and X 2 At the same scale, α, β, γ, and δ are channel adaptive weights with a scale of 1×1×1. The normalized α, β, γ, and δ represent the relative weights of the four inputs. [α, β, γ, δ] = sigmoid[AvgPool(F)+MaxPool(P)], where F is the feature map identified in the figure, sigmoid is the sigmoid activation function, and AvgPool and MaxPool are average pooling and maximum pooling operations, respectively.
5. A small target detection system based on improved YOLOv5 according to claim 1, characterized in that: The spatial purification submodule uses the softmax function to normalize the feature map in space, obtains the relative weight of a point in the feature map with respect to all other positions, and then multiplies the relative weight with the input respectively. The output (x, y) represents the spatial coordinates of the feature map. is the spatial adaptive weight, satisfying Where D is the relative weight of a point in the feature map with respect to all other positions, and the Softmax function is used to normalize the feature parameters. The total output of the multi-scale feature purification module is P = U + D.
6. A small target detection method based on improved YOLOv5, characterized by: The method comprises the following steps: (1) The backbone network of the coordinate attention fusion takes the position information as input, performs feature aggregation in the horizontal and vertical directions respectively, and then uses the compressed excitation attention module to generate weight vectors in the two directions. Finally, the weight vectors in the two directions are multiplied by the feature map to obtain the weighted output; (2) Reconstruct the detection layer. Based on the original detection head of YOLOv5, a new detection layer for detecting small targets is added to meet the requirements of small target detection. (3) Multi-scale feature purification: aggregate the global spatial information of the image, and then use splicing and convolution operations to compress the number of channels of all features. Then, channel purification and spatial purification are performed simultaneously to obtain the global spatial information of the aggregated image and filter out the conflicting information of the features.
7. A small target detection method based on improved YOLOv5 according to claim 6, characterized in that: In step (1), the specific calculation steps for feature aggregation in the horizontal and vertical directions are: (1) Calculation in is the output of the cth channel at height position h, is the output of the cth channel at width position w; X c (h,j) is the feature map X of the input image c The value at position (h, j), X c (i, w) is the feature map X of the input image c The value at the position (i, w); W is the channel width; H is the channel height; (2) Concatenate the feature maps in the height and width dimensions of the global receptive field, and then send the concatenated tensor into the 1×1 convolution function F1 for calculation, i.e., f-θ(F1[z h , z w ]), where f is the intermediate feature map, which realizes encoding in the horizontal and vertical directions, and r is a hyperparameter used to control the module size and reduce the number of channels of f; f is divided into vertical f according to different directions. h ∈R C / r×H and f in the horizontal direction w ∈R C / r×W , and use two 1×1 convolution functions F h and F w , and σ transformation to obtain the attention weights g in two independent spatial directions h , g w , and finally expand it and act on the input to get the final output y c ,in 8. A small target detection method based on improved YOLOv5 according to claim 6, characterized in that: In step (2), three different detection layers of YOLOv5 are used to detect objects of different sizes, and a new detection head is added to detect small objects.
9. A small target detection method based on improved YOLOv5 according to claim 6, characterized in that: In step (3), enter X 1 , X 2 , X 3 , X 4 Four features, first of all, X 1 , X 2 , X 3 , X 4 Scaled to the same size, R 1 , R 2 , R 3 , R 4 Then, the number of channels of all features is compressed to 4 by splicing and convolution operations, and then channel purification and spatial purification are performed simultaneously; among them, channel purification uses a combination of average pooling and maximum pooling to aggregate the global spatial information of the image, and X m It represents the m-th layer input feature map of the feature refinement module, and its output can be expressed as u = a × RS (X 1 )+β×(X 2 )+γ×RS(X 3 )+δ×RS(X 4 ), where RS is the resize function, which resizes X 1 and X 3 , X 4 Features scaled to and X 2 At the same scale, α, β, γ, and δ are channel adaptive weights with a scale of 1×1×1. The normalized α, β, γ, and δ represent the relative weights of the four inputs. α, β, γ, δ] = sigmoid[AvgPool(F) + MaxPool(F)], where F is the feature map identified in the figure, sigmoid is the sigmoid activation function, AvgPool and MaxPool are average pooling and maximum pooling operations respectively.
10. A small target detection method based on improved YOLOv5 according to claim 6, characterized in that: Spatial purification uses the softmax function to normalize the feature map in space, obtain the relative weight of a point in the feature map with respect to all other positions, and then multiply the relative weight with the input respectively. The output (x, y) represents the spatial coordinates of the feature map. is the spatial adaptive weight, satisfying Where D is the relative weight of a point in the feature map with respect to all other positions, and the Softmax function is used to normalize the feature parameters. The total output of the multi-scale feature purification module is P = U + D.
Citation Information
Cited By
Traffic sign detection method based on multi-scale channel fusion
CN120411920A
