A pine wilt disease tree detection method based on attention mechanism and center circle sampling
By using a global multi-scale channel adaptive network and a central circle sampling method, the problem of mismatch between positive and negative samples in the detection of pine wilt diseased trees was solved, enhancing the accuracy of feature extraction and recognition, and achieving efficient detection of diseased trees.
Patent Information
- Application Number
- CN202211221100.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-10-08
AI Technical Summary
Existing methods for detecting pine wilt disease trees neglect the fact that the sampling range of positive samples does not match the circular shape of the pine wilt disease tree target when sampling positive and negative samples, resulting in low sampling quality. Furthermore, the ability of drones to extract features from the target area of the diseased tree in complex backgrounds is insufficient.
A detection method based on attention mechanism and central circle sampling is adopted. Through a global multi-scale channel adaptive network, a global multi-scale channel attention module and a central circle positive and negative sample selection method are constructed to enhance feature extraction and feature fusion, improve the sampling quality of positive samples and the model recognition accuracy.
It significantly improved the feature extraction capability and recognition accuracy of pine wilt disease tree detection, reduced interference from complex backgrounds, and improved the sampling quality and recognition efficiency of the model.
Smart Images

Figure CN115761477B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of target detection, and particularly relates to a pine wilt disease tree detection method based on an attention mechanism and a center circle sampling. BACKGROUND
[0002] Pine wilt disease is a highly destructive infectious disease of pine trees, which has the characteristics of rapid onset, long incubation period, hidden onset site difficult to find, and inconvenient treatment. Once the disease spreads, it will cause a large number of pine trees to die, and if it is not discovered and treated in time, it will cause strong destructive to the forest ecosystem and bring huge economic losses to the country. In order to prevent the destruction of pine wilt disease to forest resources, it is necessary to clean up the diseased pine trees in time. Since the diseased pine trees will appear color change characteristics such as yellow-brown and red-brown, monitoring the color-changing pine trees suffering from pine wilt disease is an important means to control the spread of the epidemic.
[0003] At present, the monitoring of diseased color-changing pine trees by counties and cities mainly relies on two ways of artificial field inspection and unmanned aerial vehicle inspection. The artificial field inspection method requires forestry personnel to go deep into the forest area to investigate pine wilt disease trees, which has the problems of long inspection time, high labor cost, low efficiency, and difficulty in inspecting the disease trees in deep mountain dense forests. Therefore, scholars such as Li Weizheng began to use unmanned aerial vehicle remote sensing images to inspect pine wilt disease trees, which can monitor the disease trees in deep mountain dense forests, greatly improving the inspection efficiency and expanding the inspection range. However, the unmanned aerial vehicle inspection method is essentially artificial visual recognition of the photographed images, which has the problems of low recognition efficiency, strong subjectivity, and large workload. In recent years, the use of deep learning technology to detect various remote sensing images photographed by unmanned aerial vehicles has been widely applied in the field of forest monitoring. Some scholars have begun to use deep learning technology to detect pine wilt disease trees under unmanned aerial vehicle remote sensing images.
[0004] For example, scholars such as Wang Chen used the K-means clustering algorithm to re-set the anchor size based on the YOLOV3 algorithm to detect pine wilt disease trees; scholars such as Huang Liming used deep separable convolution to improve YOLOV4, and used the improved YOLOV4 algorithm to identify abnormal color-changing wood suffering from pine wilt disease. At present, the existing target detection research methods have certain detection effect in the detection of pine wilt disease trees, but their research methods ignore the problem that the sampling range of positive samples does not match the circular shape of the pine wilt disease tree target when sampling positive and negative samples, and the problem that the original FPN module in the algorithm has insufficient feature extraction capability for pine wilt disease trees. SUMMARY
[0005] The purpose of the present application is to solve the technical problems of the existing pine wood nematode disease tree detection method, which ignores the mismatch between the sampling range of positive samples and the circular shape of the target pine wood nematode disease tree, resulting in low sampling quality, and the technical problem of insufficient feature extraction ability of the pine wood nematode disease tree model caused by the interference of the complex background of the unmanned aerial vehicle on the feature extraction of the target area of the diseased tree.
[0006] In order to solve the above technical problems, the following technical solutions are adopted:
[0007] A pine wood nematode disease tree detection method based on attention mechanism and center circle sampling, comprising the following steps:
[0008] Step 1: Obtain pine wood nematode disease tree pictures and make them into a data set;
[0009] Step 2: input the pine wood nematode disease tree data set into the global multi-scale channel adaptive network for training to obtain the trained pine wood nematode disease tree recognition model;
[0010] Step 3: input the pine forest image to be identified into the pine wood nematode disease tree recognition model to obtain the recognition result of the diseased tree and the latitude and longitude coordinates;
[0011] Step 4: find the diseased tree according to the coordinates of the diseased tree, and treat the early-stage diseased tree with medicine, and cut and burn the middle- and late-stage diseased tree.
[0012] In step 2, the global multi-scale channel adaptive network is constructed, which specifically includes the following steps:
[0013] 2-1: construct a feature extraction backbone network to obtain a feature map;
[0014] 2-2: construct a global multi-scale channel attention module GMCA, input the feature map extracted from the backbone network into the module, further extract the feature map, and input the obtained feature map into a feature fusion module FPN for feature fusion enhancement operation to obtain a final feature map;
[0015] 2-3: use a center circle positive and negative sample screening method to sample the final feature map;
[0016] 2-4: input the positive and negative samples into a classification and regression subnetwork to obtain the recognition result of the samples.
[0017] The global multi-scale channel adaptive network is as follows:
[0018] The input image is down-sampled by the backbone network to obtain feature maps C2, C3, C4 and C5; the feature maps C2, C3, C4 and C5 are input into the global multi-scale channel attention module GMCA for further feature extraction to obtain feature maps L2, L3, L4 and L5; the obtained feature maps L2, L3, L4 and L5 are input into the feature fusion module FPN to obtain feature fusion enhanced feature maps P2, P3, P4 and P5; the feature fusion enhanced feature maps are input into the center circle positive and negative sample screening module to collect positive and negative samples of the disease tree; and the collected positive and negative samples are input into the classification and regression sub-network to obtain the recognition result of the samples.
[0019] In step 2-2, the network of the global multi-scale channel attention module GMCA is as follows:
[0020] The feature map F obtained from the feature extraction backbone network is input into the splitting module, the output end of the splitting module is connected with the input end of the efficient channel attention module, the output end of the efficient channel attention module is connected with the channel addition module, the channel weight obtained by the activation function at the output end of the channel addition module is subjected to first point multiplication operation with the feature map output by the splitting module to obtain a feature map F', and the feature map F' is connected with the input end of the squeeze extraction network module, the output end of the squeeze extraction network module is subjected to second point multiplication operation with the feature map F' to obtain a feature map F".
[0021] The feature map F is split into feature maps C0, C1, C2 and C3 by the splitting module;
[0022] The efficient channel attention module adjusts the attention weights of different channels to enhance the attention weight of the target channel; the efficient channel attention module inputs feature maps F0, F1, F2 and F3 and outputs feature maps X0, X1, X2 and X3;
[0023] The channel addition module integrates the weight values of different channels obtained by grouping together;
[0024] The activation function normalizes the channel weight parameters to the interval of 0 to 1;
[0025] The squeeze extraction network module adjusts the weight of each channel by squeezing the channel and increasing the channel.
[0026] The signal flow of the global multi-scale attention module GMCA is as follows:
[0027] The channels of the feature map F extracted from the backbone are divided into four groups → four groups of channel feature maps, i.e., feature map C0, feature map C1, feature map C2 and feature map C3, are respectively subjected to convolution operation of four scales to obtain feature maps F0, F1, F2 and F3 with different scale information → for the feature maps F0, F1, F2 and F3 with different spatial scale information → the efficient channel attention module ECA is used to extract their channel attention weights to obtain channel attention vectors on four different scales → the four groups of channel vectors are subjected to addition operation → the activated function is used to activate the channel attention vectors after addition to obtain the attention weights of the multi-scale information of the feature map F → the weights are subjected to point multiplication operation with the feature maps F0, F1, F2 and F3 output by the splitting module to obtain the feature map F' with channel attention of multi-scale information → the squeeze extraction network module is further used to extract the attention weights of the global channel from the feature map F' with rich multi-scale information to obtain the weight parameters of each channel of the feature map F' → the weight parameters are subjected to point multiplication operation with the feature map F' element by element to obtain the feature map F'' with global multi-scale information.
[0028] In step 2-3, the center circle positive and negative sample screening method is used to sample positive and negative samples from the final feature map, and the following steps are used:
[0029] First, taking the labeled box of the disease tree of the input picture as the benchmark, all the pixel points in the labeled box are positive sample candidate pixel points;
[0030] Then, taking the center point of the labeled box as the center of a circle and half of the short side of the labeled box as the radius, a center circle is constructed, and the positive sample candidate pixel points falling within the center circle are taken as positive sample pixel points, and all the pixel points falling outside the center circle are taken as negative sample pixel points;
[0031] The expression formula of the positive sample pixel point F(x, y) is as follows:
[0032] (Cx-x0) 2 +(Cy-y0) 2 ≤r 2 (r=min(w,h) / 2)
[0033] F(x, y) = (Cx, Cy)
[0034] Cx and Cy represent the horizontal and vertical coordinates of the point on the feature map corresponding to the original picture, x0 and y0 represent the center point coordinates of the labeled box, r is a hyperparameter representing the radius of the center circle, and w and h represent the width and height of the labeled box, respectively.
[0035] In step 1, according to the pine forest image shot by the unmanned aerial vehicle, the pine wilt disease tree, the red roof, the red car and the red bare land in the image are marked, and a pine wilt disease tree data set with four categories is made, which specifically includes the following:
[0036] The pine tree with yellow-brown, reddish-brown and needle-shaped leaves is marked as a pine wilt disease tree positive sample class. Since the colors of the red roof, the red car and the red bare land are similar to the color characteristics of the disease tree, these three classes are marked as three negative sample classes respectively, and a VOC data set with four target categories is made.
[0037] In step 3, the pine forest image to be recognized is input into the pine wilt disease tree recognition model to obtain the recognition result of the disease tree and the latitude and longitude coordinates. Specifically, the pine forest picture is shot by the unmanned aerial vehicle, and is cropped to the same size as the training picture, and is input into the pine wilt disease tree recognition model to obtain the recognition result picture of the disease tree and the latitude and longitude coordinates of the disease tree.
[0038] A global multi-scale channel adaptive network, the network is as follows:
[0039] The input image is down-sampled by the backbone network to obtain feature maps C2, C3, C4 and C5; the feature maps C2, C3, C4 and C5 are input into a global multi-scale channel attention module GMCA for further feature extraction to obtain feature maps L2, L3, L4 and L5; the obtained feature maps L2, L3, L4 and L5 are input into a feature fusion module FPN to obtain feature fusion enhanced feature maps P2, P3, P4 and P5; the feature fusion enhanced feature maps are input into a center circle positive and negative sample screening module to collect positive and negative samples of the disease tree; and the collected positive and negative samples are input into a classification and regression sub-network to obtain the recognition result of the samples.
[0040] The global multi-scale attention module GMCA is as follows:
[0041] The feature map F obtained from the feature extraction backbone network is input into a splitting module, the output end of the splitting module is connected with the input end of the efficient channel attention module, the output end of the efficient channel attention module is connected with a channel adding module, the channel weight obtained by the output end of the channel adding module through an activation function is subjected to a first point multiplication operation with the feature map output by the splitting module to obtain a feature map F', and the feature map F' is connected with the input end of a squeeze extraction network module, the output end of the squeeze extraction network module is subjected to a second point multiplication operation with the feature map F' to obtain a feature map F".
[0042] The backbone network can adopt a resnet network.
[0043] Compared with the prior art, the present application has the following technical effects:
[0044] 1) The present application proposes a pine wood nematode disease tree detection algorithm based on attention mechanism and center circle sampling. The present application constructs a global multi-scale channel attention module, and introduces the global multi-scale channel attention module in the feature enhancement module FPN, which enhances the feature extraction ability of the algorithm for pine wood nematode disease trees and reduces the interference of complex background on the recognition accuracy of the model. At the same time, the present application proposes a new positive and negative sample sampling method, so that the sampling range of the positive sample conforms to the circular shape of the pine wood nematode disease tree target when the algorithm samples, and the sampling quality of the positive sample is improved when the model samples;
[0045] 2) The existing target detection algorithm is based on the form of rectangular anchor frame when sampling the disease tree target, and the sampling range of the positive sample does not match the circular shape of the pine wood nematode disease tree in the orthographic image taken by the unmanned aerial vehicle from high altitude. When sampling, the sampling quality of the edge part of the disease tree is poor. In the center circle sampling method proposed by the present application, the sampling range of the positive sample is a circle, which conforms to the geometric shape of the disease tree in the orthographic image, and significantly enhances the sampling quality of the disease tree positive sample;
[0046] 3) The present application constructs a global multi-scale attention module, and introduces the module before the pyramid feature fusion module, thereby enhancing the discrimination of the feature fusion module for the target area and the background area, enhancing the feature response of the target area, and further enhancing the feature extraction ability of the model for the pine wood nematode disease tree. BRIEF DESCRIPTION OF DRAWINGS
[0047] The present application will be further described below in combination with the drawings and examples:
[0048] Figure 1 The flowchart of the present application;
[0049] Figure 2 The global multi-scale channel adaptive network structure in the present application is shown in the schematic diagram;
[0050] Figure 3 The Figure 2 structure diagram of the global multi-scale attention module (GMCA) in the present application;
[0051] Figure 4 The center circle-based positive and negative sample selection strategy in the present application is shown in the schematic diagram. DETAILED DESCRIPTION
[0052] As Figure 1 shown, a pine wood nematode disease tree detection method based on attention mechanism and center circle sampling includes the following steps:
[0053] Step 1: According to the pine forest image shot by the unmanned aerial vehicle, mark the pine wilt disease tree, red roof, red car and red bare land in the image, and make a pine wilt disease tree data set with four categories;
[0054] Step 2: Input the data set into the global multi-scale channel adaptive network for training to obtain a pine wilt disease tree recognition model with high discrimination;
[0055] Step 3: Input the pine forest image to be recognized into the recognition model to obtain the recognition result of the diseased tree and the latitude and longitude coordinates;
[0056] Step 4: According to the coordinates of the diseased tree, the early stage of the diseased tree is treated with medicine, and the middle and late stages of the diseased tree are cut and burned.
[0057] In step 1, according to the pine forest image shot by the unmanned aerial vehicle, mark the pine wilt disease tree, red roof, red car and red bare land in the image, and make a pine wilt disease tree data set with four categories, which includes the following steps:
[0058] The pine trees with yellow-brown, red-brown and needle-shaped leaves are marked as pine wilt disease tree positive sample class. Since the colors of red roof, red car and red bare land are similar to the color characteristics of the diseased tree, these three categories are marked as three negative sample classes respectively, and a VOC data set with four target categories is made.
[0059] In step 2, the data set is input into the global multi-scale channel adaptive network for training to obtain a pine wilt disease tree recognition model with high discrimination, which includes the following steps:
[0060] 2-1: Construct a global multi-scale attention module;
[0061] 2-2: Construct a center circle positive and negative sample sampling method;
[0062] 2-3: Construct a global multi-scale channel adaptive network;
[0063] In step 2-1, a global multi-scale attention module is constructed, as shown in Figure 3 , which includes the following steps:
[0064] First, the channels of the feature map are divided into four groups, and four scales (convolution kernel sizes are 3*3, 5*5, 7*7 and 9*9) of feature extraction are performed on the four groups of channel feature maps, as shown in the following formula, the input feature map F(x) is divided into four groups, represented by X0, X1, X2 and X3:
[0065] F(x) = [X0, X1, X2, X3]
[0066] The number of channels C' of each group = C / 4 (C is the number of channels of the input feature map), and 3*3, 5*5, 7*7, and 9*9 convolution kernels are used for convolution operation on the four groups of channel feature maps respectively to obtain feature maps F0, F1, F2, and F3 with different scale information, and then a feature map F(x') after multi-scale information fusion can be obtained, as shown in the following formula:
[0067] F(x') = Concat([F0, F1, F2, F3])
[0068] For the feature maps F0, F1, F2, and F3 with different spatial scale information, the efficient channel attention module (ECA) is used to extract their channel attention weights to obtain channel attention vectors on four different scales; the SoftMax function is used to recalibrate the multi-scale channel attention vectors to obtain new attention weights after multi-scale channel interaction; and the recalibrated weights and the corresponding feature maps are element-wise multiplied to output a feature map F' with multi-scale feature information attention weighting:
[0069] F' = F(x) o Softmax(SE(F(i))) i = 0, 1, 2, 3
[0070] The efficient channel attention module is then used to extract the global channel attention weights of the feature map F' with rich multi-scale information, and the weight parameters of each channel are recalculated, which are element-wise multiplied with the feature map F' to obtain a feature map F'' with global multi-scale information:
[0071] F'' = F' o Sigmod(SE(F'))
[0072] In step 2-2, a center circle positive and negative sample sampling method is constructed, as shown in Figure 4 , which specifically includes the following steps:
[0073] A center circle is constructed with the center of the bounding box as the center and half of the short side of the bounding box as the radius. Pixel points are used as positive and negative samples during training, where pixel points inside the center circle are positive sample pixel points and pixel points outside the center circle are negative sample pixel points. The expression formula of the positive sample F(x, y) is as follows:
[0074] (Cx-x0) 2 +(Cy-y0) 2 ≤r 2 (r = min(w, h) / 2)
[0075] F(x, y) = (Cx, Cy)
[0076] Wherein Cx, cy represents the point on the feature map corresponding to the horizontal and vertical coordinates of the original picture, x0, y0 represents the center point coordinates of the label box, r is a hyper parameter, indicating the radius of the inner circle, w, h respectively represent the width and height of the label box.
[0077] In step 2-3, a global multi-scale channel adaptive network is constructed, as shown in the following figure: Figure 2
[0078] First, input the picture of 1000*1000 pixels into the residual network ResNet50 to extract the characteristics of the disease tree, and obtain the feature map C1, the feature map C2, the feature map C3, the feature map C4 and the feature map C5.
[0079] Respectively input the feature map C2, the feature map C3, the feature map C4 and the feature map C5 into the global multi-scale attention module to further extract the characteristics of the disease tree.
[0080] Then input the four feature maps output from the global multi-scale attention module into the feature fusion module (FPN) for feature fusion and enhancement, and obtain the output feature map P2, the feature map P3, the feature map P4 and the feature map P5.
[0081] Finally, input the feature map P2, the feature map P3, the feature map P4 and the feature map P5 into the classification and regression sub-network for classification and regression, and obtain the identification model of the pine wilt disease tree.
[0082] In step 3: input the pine forest image to be identified into the identification model to obtain the identification result of the disease tree and the latitude and longitude coordinates, which specifically includes the following steps:
[0083] Use a drone to take pictures of the pine forest, crop them to the same size as the training pictures, and input them into the pine wilt disease tree identification model to obtain the identification result picture of the disease tree and the latitude and longitude coordinates of the disease tree.
[0084] In step 4: according to the disease tree coordinates, the early disease trees are treated with medicine, and the middle and late disease trees are cut and burned, and the specific steps are as follows:
[0085] Forestry workers find the disease tree according to the latitude and longitude coordinates of the disease tree, and use medicine to treat the yellow-brown early pine wilt disease tree, and artificially cut and burn the middle and late disease trees with red-brown characteristics.
[0086] Embodiment:
[0087] The present application uses a pine wilt disease tree detection method based on a global multi-scale attention module and a center circle sampling method on the pine forest image taken by a DJI drone, which is performed in the following manner:
[0088] Step 1: Use DJI drones to take pictures in the pine forest area at good weather conditions, crop the pictures to 1000*1000 size, use the labelme labeling tool to label the positive samples of the diseased trees with yellow-brown, reddish-brown, leafy needles, etc. characteristics, and label the red bare land, red roof, red car as three categories of negative sample categories, and make training set, validation set, test set according to the ratio of 6:2:2.
[0089] Step 2: as shown in Figure 2 , input the picture into the residual network for feature extraction to obtain feature map C1, feature map C2, feature map C3, feature map C4, and feature map C5; then respectively input feature map C2, feature map C3, feature map C4, and feature map C5 into the global multi-scale attention module to further extract the features of the diseased trees and reduce the interference of complex background on feature extraction; then input the four feature maps output from the global multi-scale attention module into the feature fusion module (FPN) for feature fusion enhancement to obtain output feature maps P2, P3, P4, and P5; finally, input feature maps P2, P3, P4, and P5 into the classification and regression subnetwork for classification and regression to obtain the pine wood nematode disease tree recognition model.
[0090] Wherein before training, the positive and negative sample selection strategy based on the center circle is adopted, and the specific process is as shown in Figure 4 : first, all the pixel points in the labeling box are taken as candidate positive samples; then a center circle is constructed with the center of the labeling box as the center and half of the short side of the labeling box as the radius; the pixel points inside the center circle are positive sample points, and the pixel points outside the circle are negative sample points. The formula for selecting its positive sample F(x, y) is as follows:
[0091] (Cx-x0) 2 +(Cy-y0) 2 ≤r 2 (r=min(w,h) / 2)
[0092] F(x,y)=(Cx,Cy)
[0093] Step 3: use the drone to take pictures of the pine forest, crop them to the same size as the training pictures, and input them into the pine wood nematode disease tree recognition model to obtain the recognition result picture of the diseased trees and the latitude and longitude coordinates of the diseased trees.
[0094] Step 4: forestry workers find the diseased trees according to the latitude and longitude coordinates of the diseased trees, treat the yellow-brown early pine wood nematode disease trees with medicine, and manually cut and burn the middle and late stage disease trees with red-brown characteristics.
Claims
1. A method for detecting pine wilt disease in trees based on attention mechanism and central circle sampling, characterized in that, It includes the following steps: Step 1: Obtain images of pine trees infected with pine wilt disease and create a dataset; Step 2: Input the pine wilt disease tree dataset into a global multi-scale channel adaptive network for training to obtain the trained pine wilt disease tree recognition model; Step 3: Input the images of the pine forests to be identified into the pine wilt disease tree identification model to obtain the identification results and latitude and longitude coordinates of the diseased trees; Step 4: Locate the diseased trees based on their coordinates, treat the trees in the early stages of the disease with medication, and cut down and burn the trees in the middle and late stages of the disease. In step 2, a global multi-scale channel adaptive network is constructed, which specifically includes the following steps: 2-1: Construct a feature extraction backbone network to obtain feature maps; 2-2: Construct a Global Multi-Scale Channel Attention Module (GMCA). Input the feature maps extracted from the backbone network into this module to further extract feature maps. Then, input the obtained feature maps into the Feature Fusion Module (FPN) for feature fusion and enhancement operations to obtain the final feature maps. 2-3: The positive and negative sample selection method of the central circle is used to sample positive and negative samples in the final feature map; 2-4: Input the positive and negative samples into the classification and regression sub-networks to obtain the sample recognition results; The global multi-scale channel adaptive network is as follows: The input image is downsampled through the backbone network to obtain feature maps C2, C3, C4, and C5. These feature maps are then input into the Global Multi-Scale Channel Attention (GMCA) module for further feature extraction, resulting in feature maps L2, L3, L4, and L5. These feature maps are then input into the Feature Fusion (FPN) module to obtain enhanced feature maps P2, P3, P4, and P5. Finally, the enhanced feature maps are processed by the Central Circle Positive and Negative Sample Screening module to collect positive and negative samples from diseased trees. These collected positive and negative samples are then input into the classification and regression sub-networks to obtain the sample recognition results.
2. The method according to claim 1, characterized in that, In step 2-2, the network of the Global Multi-Scale Channel Attention Module (GMCA) is as follows: The feature map F obtained from the feature extraction backbone network is input into the splitting module (1). The output of the splitting module (1) is connected to the input of the efficient channel attention module (2). The output of the efficient channel attention module (2) is connected to the channel addition module. The channel weights obtained by the activation function (3) at the output of the channel addition module are multiplied by the feature map output by the splitting module (1) for the first time (4) to obtain the feature map F′. The feature map F′ is connected to the input of the squeezing extraction network module (5). The output of the squeezing extraction network module (5) is multiplied by the feature map F′ for the second time (6) to obtain the feature map F″.
3. The method according to claim 2, characterized in that, Feature map F is split into feature map C0, feature map C1, feature map C2, and feature map C3 by splitting module (1); The function of the efficient channel attention module (2) is to adjust the attention weights of different channels and enhance the model's attention weights to the target channel. The efficient channel attention module (2) takes feature map F0, feature map F1, feature map F2, and feature map F3 as inputs and outputs feature map X0, feature map X1, feature map X2, and feature map X3 as outputs. The function of the channel summing module is to combine the weight values of different channels obtained from grouping. The activation function (3) is to normalize the channel weight parameters to the range of 0 to 1. The function of the squeeze extraction network module (5) is to readjust the weight of each channel by squeezing and adding channels.
4. The method according to claim 2 or 3, characterized in that, The signal flow of the Global Multiscale Attention Module (GMCA) is as follows: The channels of the feature map F extracted from the backbone are divided into four groups. Convolution operations at four different scales are performed on the four groups of channel feature maps, namely feature map C0, feature map C1, feature map C2, and feature map C3, to obtain feature maps F0, F1, F2, and F3 with different scale information. For feature maps F0, F1, F2, and F3 with different spatial scale information, the channel attention weights are extracted using the efficient channel attention module ECA to obtain four channel attention vectors at different scales. The four groups of channel vectors are added together, and the channel attention vectors after addition are activated using the activation function (3) to obtain the attention weights of the multi-scale information of feature map F. The weights are multiplied by the feature maps F0, F1, F2, and F3 output by the splitting module (1) to obtain the feature map F′ with multi-scale information channel attention. Then, the squeeze extraction network module (5) is used to extract the feature map with rich multi-scale information. Extract the attention weights of the global channels, obtain the weight parameters of each channel of the feature map F′, and then correlate these weight parameters with the feature map. Performing element-wise dot product yields a feature map with global multi-scale information. .
5. The method according to claim 4, characterized in that, The four sets of channel feature maps are feature map C0, feature map C1, feature map C2, and feature map C3. Convolution operations are performed on each set of channel feature maps C0, feature map C1, feature map C2, and feature map C3 to obtain feature maps F0, feature map F1, feature map F2, and feature map F3 with different scale information.
6. The method according to claim 1, characterized in that, In steps 2-3, the central circle positive and negative sample screening method is used to sample positive and negative samples in the final feature map. The following steps are adopted: First, using the bounding box of the diseased tree in the input image as a reference, all pixels within the bounding box are positive sample candidate pixels; Then, using the center point of the annotation box as the center and half the short side of the annotation box as the radius, construct a central circle. Select positive sample candidate pixels that fall within this central circle as positive sample pixels, and all other pixels that fall outside this central circle as negative sample pixels. Among the positive sample pixels The formula for expressing this is as follows: ; This indicates that a point on the feature map corresponds to the x and y coordinates of the original image. Indicates the coordinates of the center point of the annotation box. It is a hyperparameter representing the radius of the center circle, and w and h represent the width and height of the annotation box, respectively.
Citation Information
Patent Citations
Apple leaf pathology detection method
CN113627258A
Detection method based on small-scale pine wood nematode disease tree
CN115063700A