Multi-channel attention fusion vector biological detection method and system
Through a multi-channel attention fusion network, deep features in vector detection are extracted and enhanced, and mismatch problems in feature enhancement and fusion are solved, achieving higher detection accuracy and performance.
Patent Information
- Application Number
- CN202411687707.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art is difficult to effectively enhance deep features in vector detection, and there is a problem of local feature mismatch in attention feature fusion, resulting in insufficient complementarity between deep features and shallow features.
A multi-channel attention fusion network is used to extract deep feature maps through the backbone network, and feature enhancement is used to use multi-channel feature enhancement modules and fast pyramid pooling layer to generate multi-scale enhanced feature maps. Then, the dual-channel attention feature complementary module performs multi-scale fusion through an interactive feature reconstruction mechanism to reduce the loss of feature information.
Effectively extract the coarse and fine particle size characteristics of vector images, enhance feature distinction, improve the accuracy and performance of vector detection, assist customs in real-time monitoring, and improve the efficiency of vector image identification work.
Smart Images

Figure CN119672710A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and in particular to a multi-channel attention fusion vector-borne organism detection method and system. Background Art
[0002] Vector detection is the key to customs inspection and public health inspection, and plays an important role in public safety and ecological protection. The similarity between the coarse and fine granular features of the environment in which vectors live and their own features leads to low feature differentiation. The antennae, claws, and body are severely blocked in the environment, which makes it difficult for the network to extract effective features. Therefore, enhancing the coarse and fine granular features of vectors is the key to improving vector detection.
[0003] In order to enhance features and fuse features between different layers, researchers have proposed network models such as residual networks and attention feature fusion mechanisms. Although residual networks can alleviate gradient vanishing, improve network performance, and accelerate network training, they are mostly effective for shallow features in feature enhancement, while feature enhancement for deep networks is not obvious enough and is accompanied by the risk of overfitting. Attention feature fusion combines features between different layers, but there is still a problem of feature mismatch in the consistency of local features, making it difficult to improve the complementarity of deep and shallow features. Therefore, feature enhancement and fusion are still urgent issues to be solved in vector detection. Summary of the invention
[0004] To solve the above-mentioned problems, the present invention provides a method and system for detecting vector organisms with multi-channel attention fusion. The proposed multi-channel attention fusion network can effectively extract target features of different coarse and fine granularities such as the body, antennae, claws, etc. of vector organism images, enhance the distinction between features of different details of the same target, improve the accuracy and performance of vector organism image detection, assist customs in real-time monitoring of vector organisms, and improve the efficiency of vector organism image identification.
[0005] To achieve the above object, the present invention provides a method for detecting vectors using multi-channel attention fusion, the steps comprising:
[0006] Collect and pre-process pictures of vector-borne organisms to obtain processed data;
[0007] Based on the processed data, a vector-borne organism detection model based on multi-channel attention fusion is constructed; the vector-borne organism detection model comprises: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementary module;
[0008] The vector-borne organism detection model is used to complete the vector-borne organism detection.
[0009] Preferably, in the vector detection model,
[0010] The backbone network is used to extract deep feature maps from the processed data;
[0011] The multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the deep feature map, extract the context information of the coarse and fine features of the vector target, and generate several groups of enhanced feature maps;
[0012] The dual-path attention feature complementary module is combined with an interactive feature reconstruction mechanism to perform multi-scale fusion of enhanced feature maps in different layers, reduce the loss of vector biological feature information, and obtain a fused feature map.
[0013] Preferably, the workflow of the multi-channel feature enhancement module includes: dividing the deep feature map into multiple groups of channels through convolution operations, and applying different pooling operations to each group of channels to capture feature information of different granularities; processing the feature information through convolution and activation functions to generate attention weights; multiplying the attention weights with the deep feature map to enhance the features, and finally splicing the enhanced deep feature map, adjusting the number of channels through convolution, and outputting the enhanced feature map.
[0014] Preferably, the workflow of the fast pyramid pooling layer is as follows: receiving the enhanced feature map, performing maximum pooling through convolution kernels of different sizes and strides to capture multi-scale context information, then concatenating the feature maps of different scales, and finally adjusting the number of channels through a convolution operation to output an enhanced feature map with rich context information.
[0015] Preferably, the workflow of the dual-path attention feature complementary module includes: receiving the enhanced feature map and performing channel segmentation, then applying an efficient multi-scale attention mechanism to the segmented channel, extracting global information through pooling operations in the horizontal and vertical directions, and then generating attention weights by combining local information and global information, and finally multiplying the generated attention weights with the initially received enhanced feature map to achieve further feature enhancement, and performing multi-scale fusion on the enhanced feature map with further feature enhancement, and outputting the final fused feature map.
[0016] The present invention also provides a multi-channel attention fusion vector detection system, which is used to implement the above method and includes: a collection module, a construction module and a detection module;
[0017] The acquisition module is used to collect and pre-process the images of vector-borne organisms to obtain processed data;
[0018] The construction module is used to construct a vector detection model based on multi-channel attention fusion based on the processed data; the vector detection model includes: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementary module;
[0019] The detection module is used to complete the detection of vector-borne organisms using the vector-borne organism detection model.
[0020] Preferably, in the vector detection model,
[0021] The backbone network is used to extract deep feature maps from the processed data;
[0022] The multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the deep feature map, extract the context information of the coarse and fine features of the vector target, and generate several groups of enhanced feature maps;
[0023] The dual-path attention feature complementary module is combined with an interactive feature reconstruction mechanism to perform multi-scale fusion of enhanced feature maps in different layers, reduce the loss of vector biological feature information, and obtain a fused feature map.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] (1) The multi-channel feature enhancement module constructed by the present invention divides the feature map extracted by the backbone network into multiple groups of channels. Each group of channels performs different pooling deep feature mappings, which can capture feature information of different coarse and fine granularity and enhance the contextual information of the deep feature map.
[0026] (2) The dual-path attention feature complementary module designed in the present invention cuts the input feature map into two groups of channels in the channel dimension, uses the attention mechanism to extract the feature information of one group of channels, enhances the features of the other group of feature maps, and then combines the local information and global information of the two groups of channel features to eliminate redundant information and irrelevant feature information.
[0027] (3) The vector detection network constructed by the present invention can effectively realize the detection of vectors at different scales, effectively capture the coarse and fine granularity deep features of vector targets, and improve the accuracy and performance of vector detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of a method for detecting vector-borne organisms using multi-channel attention fusion according to an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of the results of vector-borne organism detection according to an embodiment of the present invention;
[0032] Figure 4 Schematic diagram of the confusion matrix of the classification results of 21 vector-borne organisms according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] Before the description, some characters in the examples that are easy to cause misunderstanding are explained. n (n=1,2,3…) all represent the number of output channels. Since different feature maps have different numbers of output channels, C is used. n way to distinguish them.
[0036] Embodiment 1
[0037] like Figure 1 FIG. 1 is a schematic diagram of a method flow chart of an embodiment of the present invention, and the steps include:
[0038] S1. Collect and pre-process images of vector-borne organisms to obtain processed data.
[0039] The collected biological images are cleaned and labeled, and data enhancement such as flipping and translating is performed. Then the training set and validation set are divided into 8:2 to obtain the preprocessed data.
[0040] S2. Based on the processed data, a vector-borne organism detection model based on multi-channel attention fusion is constructed.
[0041] In this embodiment, the vector detection model includes: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementation module.
[0042] Among them, the processed data is input into the backbone network to extract the deep feature map of the vector; the multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the deep feature map, extract the contextual information of the coarse and fine features of the vector target, and generate several groups of enhanced feature maps; the two-way attention feature complementary module is combined with the interactive feature reconstruction mechanism to perform multi-scale fusion of the enhanced feature maps in different layers, reduce the loss of feature information of the vector, and obtain the fused feature map.
[0043] The workflow of the multi-channel feature enhancement module includes: dividing the deep feature map into multiple groups of channels through convolution operations, and applying different pooling operations to each group of channels to capture feature information of different granularities; processing feature information through convolution and activation functions to generate attention weights; multiplying the attention weights with the deep feature map to enhance the features, and finally splicing the enhanced deep feature map, adjusting the number of channels through convolution, and outputting the enhanced feature map.
[0044] Specifically, for the input deep feature map X∈R C×G×W , where C is the number of input channels, H and W are the height and width respectively; first, a 1×1 convolution operation is performed to obtain X c ,in:
[0045] X c =W in *X+b
[0046] In the formula, 1×1 represents the size of the convolution kernel, and b represents the bias term;
[0047] Then X c Divided into four groups of channels, including:
[0048] X c ={X1,X2,X3,X4}
[0049] Among them, the feature map of each channel is
[0050] Let X1∈R C×H×W Keeping it unchanged, the output Y1 is:
[0051] Y1=X1
[0052] right Apply global average pooling to each channel of X gap for:
[0053]
[0054] Where i represents the index in the height direction, and j represents the index in the width direction.
[0055] X gap A 1×1 convolution is performed to reduce the dimension, then processed by a ReLu activation function, and then a 1×1 convolution is performed to increase the dimension, and then a Sigmoid function is used to generate attention weights, and finally the output Y2 is obtained by element-by-element multiplication with the input X2:
[0056] Y2=Sigmoid(W 1×1 *ReLu(W 1×1 *X gap +b)+b)☉X2
[0057] Where ⊙ represents element-by-element multiplication.
[0058] right Apply a 3×3 convolution kernel to each channel of X with a stride of 1 and a padding of 1 to obtain the local maximum pooling max O H ,O W for:
[0059]
[0060] Therefore Where P represents padding, K represents the size of the convolution kernel, and S represents the step size; H , O H Represent the height and width of the output feature map respectively.
[0061] X max A 1×1 convolution is performed to reduce the dimension, then processed by a ReLu activation function, and then a 1×1 convolution is performed to increase the dimension, and then a Sigmoid function is used to generate attention weights, and finally the output Y3 is obtained by element-by-element multiplication with the input X3:
[0062] Y3=Sigmoid(W 1×1 *ReLu(W 1×1 *X max +b)+b)☉X3
[0063] right Apply a 3×3 convolution kernel to each channel of X with a stride of 1 and a padding of 1 to obtain local average pooling avg O H , O W for:
[0064]
[0065] Therefore X avgA 1×1 convolution is performed to reduce the dimension, then processed by a ReLu activation function, and then a 1×1 convolution is performed to increase the dimension, and then a Sigmoid function is used to generate attention weights, and finally the output Y4 is obtained by element-by-element multiplication with the input X4:
[0066] Y4=Sigmoid(W 1×1 *ReLu(W 1×1 *X avg +b)+b)☉)X4
[0067] Get four feature maps Y1, Y2, Y3, and Y4 with the same channels, and concatenate them to get Y:
[0068] Y=concat(Y1,Y2,Y3,Y4)
[0069] Finally, perform a 1×1 convolution on Y to adjust the number of channels to obtain Y out for:
[0070] Y out =W out *Y+b
[0071] Where W out ∈R C×1×1 ; 1×1 represents the size of the convolution kernel, and b represents the bias term;
[0072] The workflow of the SPPF layer includes: receiving the enhanced feature map, performing maximum pooling through convolution kernels of different sizes and strides to capture multi-scale contextual information, then concatenating these feature maps of different scales, and finally adjusting the number of channels through convolution operations to output enhanced feature maps with rich contextual information.
[0073] Specifically, input the enhanced feature map X a ∈R C×H×W First, a 1×1 convolution operation is performed to compress the number of channels by half to obtain X b for:
[0074] X b =W in *X+b
[0075] in, and
[0076] Then, the maximum pooling with a convolution kernel of 5×5, a stride of 1, and a padding of 2 is applied to obtain the size O of the Y5 feature map. H ,O W for:
[0077]
[0078] Therefore Similarly, applying the same maximum pooling to Y5 yields
[0079] Applying the same max pooling to Y6 yields
[0080] Finally, X a , Y5, Y6, and Y7 are concatenated, and then adjusted back to the original number of channels through a 1×1 convolution kernel to obtain the output X out for:
[0081] X out =W out *concat(X a , Y5, Y6, Y7)+b
[0082] Among them, W out ∈R C×1×1 , X out ∈R C×H×W .
[0083] The dual-path attention feature complementation (DACF) module workflow includes:
[0084] The enhanced feature map is received and channel segmented. An efficient multi-scale attention mechanism is then applied to the segmented channels. Global information is extracted through horizontal and vertical pooling operations. Attention weights are generated by combining local information with global information. Finally, the generated attention weights are multiplied by the initially received enhanced feature map to achieve further feature enhancement. The enhanced feature map with further feature enhancement is then multiplied at multiple scales to output the final fused feature map.
[0085] Specifically, input the shallow feature map X extracted by the backbone network l ∈R C×H×W The MCFE module is introduced for feature enhancement and the deep feature map X is input in parallel. s ∈R C×H×W , first of all, X l and X s The channels are divided into two groups:
[0086] X l = {l l1 , X l2}
[0087] X s ={X s1 , X s2}
[0088] right (c4 is half of c) Apply the efficient multi-scale attention module to get Xa1 The process is as follows:
[0089] For the input feature map X l1 Rearrange the groups into Where c5 is the number of output channels ( g is the number of groups), then group1 Perform pooling operations in the horizontal and vertical directions to obtain X h and X w for:
[0090]
[0091] These two pooling operations compress the horizontal and vertical spatial dimensions respectively when processing feature maps, effectively extracting the global information of the feature maps in each direction, and then h and X w After the splicing operation, a 1×1 convolution is performed to obtain X conv for:
[0092] X conv =W*concat(X h ,X w )+b
[0093] Then X conv Split back to X h and X w , to adapt the original dimensions of h and w, and realize information exchange between different features of the network:
[0094] X conv ={X h ,X w}
[0095] X h and X w Apply the Sigmoid function and then perform element-by-element multiplication with the input to get X w for:
[0096]
[0097] X w Performing group normalization (GN) gives D1 as:
[0098] D1=GN(X w )
[0099] Perform global pooling on D1 and apply Softmax function to get X softmax1 for:
[0100]
[0101] After a 3×3 convolution on Xgroup1, D2 is obtained as:
[0102] D2=W*X group1 +b
[0103] Perform global pooling operation on D2 and apply Softmax function to get X softmax2 for:
[0104]
[0105] D2 and X softmax1 Perform element-wise multiplication of X1 and X softmax2 The result of element-by-element multiplication is added to get the final output and then added to X group1 Perform element-by-element multiplication to get the final output X a1 for:
[0106]
[0107] right Apply an efficient multi-scale attention module to the input feature map X s1 Rearrange the groups into Where C5 is the number of output channels ( g is the number of groups), we get X b1 The process is the same as above:
[0108]
[0109] X s1 X obtained by applying efficient attention mechanism b1 With X l1 Add, X l1 X obtained by applying efficient attention mechanism a1 With X s1 Add them together, and then X l2 With X b1 and X l1 The result of the addition is added to get the result of the first branch, X s2 With X a1 and X s1 The result of the addition is added to the result of the second branch, and finally the results of the two branches are spliced to obtain the final output X out for:
[0110] X out =concat(X b1 +X l1 +X l2 , X a1 +X s1 +X s2 )
[0111] After the model is constructed, it is trained using the training set, and the accuracy of the model is verified using the validation set. The vector detection model constructed in this embodiment is as follows: Figure 2 shown.
[0112] S3. Complete vector-borne disease detection using the vector-borne disease detection model.
[0113] The vector detection model is used to complete the vector detection. The detection results are as follows: Figure 3 and Figure 4 shown.
[0114] Embodiment 2
[0115] The present embodiment also provides a vector-borne organism detection system with multi-channel attention fusion, including: an acquisition module, a construction module and a detection module; the acquisition module is used to acquire vector-borne organism images and pre-process them to obtain processed data; the construction module is used to construct a vector-borne organism detection model based on multi-channel attention fusion based on the processed data; the vector-borne organism detection model includes: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementary module; the detection module is used to complete vector-borne organism detection using the vector-borne organism detection model.
[0116] In the vector detection model, the backbone network is used to extract deep feature maps from the processed data; the multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the deep feature maps, extract the contextual information of the coarse and fine features of the vector targets, and generate several groups of enhanced feature maps; the two-way attention feature complementation module is combined with the interactive feature reconstruction mechanism to perform multi-scale fusion of enhanced feature maps in different layers, reduce the loss of vector feature information, and obtain fused feature maps.
[0117] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for detecting vector-borne organisms by multi-channel attention fusion, characterized in that the steps include: Collect and pre-process pictures of vector-borne organisms to obtain processed data; Based on the processed data, a vector-borne organism detection model based on multi-channel attention fusion is constructed; the vector-borne organism detection model comprises: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementary module; The vector-borne organism detection model is used to complete the vector-borne organism detection.
2. The method for detecting vector-borne organisms by multi-channel attention fusion according to claim 1, characterized in that: In the vector-borne organism detection model, The backbone network is used to extract shallow and deep feature maps in the processed data; The multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the shallow and deep feature maps, extract context information of coarse and fine features of vector targets, and generate several groups of enhanced feature maps; The dual-path attention feature complementary module is combined with an interactive feature reconstruction mechanism to perform multi-scale fusion of enhanced feature maps in different layers, reduce the loss of vector biological feature information, and obtain a fused feature map.
3. The method for detecting vector-borne organisms by multi-channel attention fusion according to claim 2, characterized in that: The workflow of the multi-channel feature enhancement module includes: dividing the shallow and deep feature maps into multiple groups of channels through convolution operations, and applying different pooling operations to each group of channels to capture feature information of different granularities; processing the feature information through convolution and activation functions to generate attention weights; multiplying the attention weights with the deep feature maps to enhance features, and finally splicing the enhanced deep feature maps, adjusting the number of channels through convolution, and outputting the enhanced feature maps.
4. The method for detecting vector-borne organisms by multi-channel attention fusion according to claim 1, characterized in that: The workflow of the fast pyramid pooling layer is as follows: receiving the enhanced deep feature map, performing maximum pooling through convolution kernels of different sizes and strides to capture multi-scale context information, then concatenating the feature maps of different scales, and finally adjusting the number of channels through a convolution operation to output an enhanced feature map with rich context information.
5. The method for detecting vector-borne organisms by multi-channel attention fusion according to claim 1, characterized in that: The workflow of the dual-path attention feature complementation module includes: receiving an enhanced feature map and performing channel segmentation, then applying an efficient multi-scale attention mechanism to the segmented channels, extracting global information through horizontal and vertical pooling operations, and then generating attention weights by combining local information and global information, and finally multiplying the generated attention weights with the initially received enhanced feature map to achieve further feature enhancement, and performing multi-scale fusion on the enhanced feature map with further feature enhancement to output the final fused feature map.
6. A multi-channel attention fusion vector detection system, the system is used to implement the method according to any one of claims 1 to 5, characterized in that: include: Acquisition module, construction module and detection module; The acquisition module is used to collect and pre-process the images of vector-borne organisms to obtain processed data; The construction module is used to construct a vector detection model based on multi-channel attention fusion based on the processed data; the vector detection model includes: a backbone network, a multi-channel feature enhancement module, a fast pyramid pooling layer and a dual-path attention feature complementary module; The detection module is used to complete the detection of vector-borne organisms using the vector-borne organism detection model.
7. The multi-channel attention fusion vector detection system according to claim 6 is characterized in that: In the vector-borne organism detection model, The backbone network is used to extract shallow and deep feature maps in the processed data; The multi-channel feature enhancement module and the fast pyramid pooling layer are used to enhance the shallow and deep feature maps, extract context information of coarse and fine features of vector targets, and generate several groups of enhanced feature maps; The dual-path attention feature complementary module is combined with an interactive feature reconstruction mechanism to perform multi-scale fusion of enhanced feature maps in different layers, reduce the loss of vector biological feature information, and obtain a fused feature map.