Detection method of pine wood nematode diseased trees based on small target sample expansion and pooling weighting
Through the detection methods of small-scale target sample expansion and pooled weighted attention mechanism, the problem of insufficient extraction of target features at small-scale intravenous nematode tree detection is solved, and efficient and accurate disease tree recognition is achieved, especially high-precision detection in complex backgrounds.
Patent Information
- Application Number
- CN202211441081.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-11-17
AI Technical Summary
The prior art has problems in the detection of pine nematode disease trees with insufficient extraction of small-scale target features and too few targets of diseased tree targets in a single picture, resulting in high missed detection rate, especially in complex backgrounds.
The detection method based on small-target sample expansion and pooled weighted attention mechanism is adopted, and the number of targets of diseased tree is increased through fixed scaling scale and random splicing, and a pooled weighted attention module is constructed to enhance feature extraction capabilities, and the detection is carried out in combination with drone remote sensing technology.
It significantly improves the detection accuracy and recall of small-scale pine nematode disease trees, and can efficiently identify diseased trees in complex backgrounds and reduces the missed detection rate.
Smart Images

Figure CN115909066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a method for detecting pine wood nematode diseased trees based on small target sample expansion and pooling weighting. Background Art
[0002] Pine wilt disease, often called the cancer of pine trees, is characterized by rapid transmission, difficulty in prevention and control, and severe damage. Typically, entire pine trees can die in as little as 40 days after infection, causing severe damage to my country's ecological environment and economy. Key approaches to preventing and controlling pine wilt disease include establishing a comprehensive epidemic monitoring system, enhancing prevention awareness, implementing scientific prevention and control measures, and implementing biological control. Monitoring infected trees is a key component of prevention and control.
[0003] Traditional census monitoring of trees infected with pine wilt disease mainly relies on manual inspections, based on the color changes of the needles of infected pine trees, such as yellow-brown and reddish-brown, and the observation of the surface morphology of the trees. This method has the disadvantages of poor timeliness and large errors, and requires a large amount of manpower and material resources, making it difficult to efficiently complete the task of monitoring the epidemic. Compared with manual inspections, high-altitude remote sensing image monitoring has the advantages of wide coverage, low labor intensity, and higher efficiency. However, the implementation of satellite remote sensing image monitoring is costly and easily interfered with by natural environmental factors. Therefore, satellite remote sensing monitoring methods are not suitable for monitoring pine forest epidemics.
[0004] In recent years, drone remote sensing and deep learning technologies have developed rapidly. Due to its powerful feature extraction capabilities, researchers have begun combining drone remote sensing with deep learning to monitor pine wilt diseased trees. Xu Xinluo et al. used the Faster-RCNN algorithm to automatically identify pine wilt diseased trees and locate infected pine logs. Li Fengdi et al., taking into account the limited localization accuracy of target detection boxes, used a modified YOLOv3-CIoU algorithm to detect pine wilt diseased trees, improving the localization accuracy of diseased tree detection. While their methods achieved some success in detecting pine wilt diseased trees, both methods suffered from insufficient feature extraction of small-scale diseased trees and a failure to account for the relatively small number of small-scale diseased tree samples in a single image, resulting in a significant number of small-scale diseased trees being missed.
[0005] Currently, object detection algorithms have achieved good results in detecting large and medium-sized targets. However, due to factors such as low resolution, small coverage area, and limited semantic information, algorithms cannot extract sufficient feature information when extracting small targets, resulting in far inferior detection results for small targets compared to large and medium-sized targets. With the development of deep learning technology, small target detection plays a key role in many fields, such as railway traffic safety, aerial imagery, smart healthcare, and defect detection. Small target detection is currently a hot topic and a difficult problem in target detection algorithms.
[0006] To address the aforementioned issues and achieve efficient remote sensing detection of small-scale pine wilt diseased tree targets in complex backgrounds, this patent proposes a pine wilt diseased tree detection method based on small target sample expansion and a pooled weighted attention mechanism. This method enhances the network model's ability to extract features from shallow, information-rich, small-scale diseased tree targets by constructing a pooled weighted attention module and adding it before the feature fusion of the shallow feature layer. Furthermore, a small target sample expansion method with fixed scaling and random splicing was constructed to increase the number of diseased tree targets, especially small-scale diseased tree targets, in a single image, thereby enabling the network model to learn more feature information about small-scale diseased tree targets. Summary of the Invention
[0007] The purpose of this patent is to solve the problem of interference of complex background in remote sensing images on the feature extraction of small-scale pine wilt diseased tree targets and the problem of too few diseased tree targets in a single image, especially small-scale diseased tree targets, and to propose a pine wilt diseased tree detection method based on small target sample expansion and pooling weighting.
[0008] The pine wood nematode disease tree detection method based on small target sample expansion and pooling weighting includes the following steps:
[0009] Step 1: Photograph the pine forest under different lighting and terrain conditions to obtain original images;
[0010] Step 2: Crop the original image, annotate the cropped images of trees infected with pine wilt disease, and create a dataset of trees infected with pine wilt disease.
[0011] Step 3: Use a fixed scale and random splicing small target sample expansion method to increase the number of diseased trees in the image, especially the number of small-scale diseased tree targets;
[0012] Step 4: Construct a one-stage feature-enhanced target detection network based on the pooled weighted attention mechanism;
[0013] Step 5: Input the pine wilt diseased tree dataset into the pooled weighted attention mechanism feature enhancement target detection model for training to obtain the diseased tree recognition model;
[0014] Step 6: Input the image of the pine forest to be identified into the recognition model to obtain the vector position information of the diseased trees;
[0015] Step 7: Clean up the diseased trees according to their location information.
[0016] In step 3, the small target sample expansion method with fixed scaling and random splicing includes the following steps:
[0017] 2-1: Randomly select four images numbered 1, 2, 3, and 4 from the pine wilt disease tree dataset. Scale the length and width of the four images in equal proportions according to three fixed ratios to obtain scaled images Img1, Img2, Img3, and Img4, as shown in the following formula:
[0018] Img i =resize(random(0.4, 0.5, 0.6)jpg i ) (i=1, 2, 3, 4)
[0019] Where Img is the image after fixed-scale scaling, i is the scaled image number, jpg is the original image, resize indicates the image is scaled in the same proportion to its length and width, and random indicates the range of the scaling factor.
[0020] 2-2: Create a new rectangular box with a length and width twice the length and width of the image in the pine wilt disease tree dataset. Divide the rectangular box into four sub-regions of equal size: r1, r2, r3, and r4, centered on the center point of the rectangular box.
[0021] 2-3: Fill image Img1 into sub-region r1, image Img2 into sub-region r2, image Img3 into sub-region r3, and image Img4 into sub-region r4. Reduce the length and width of the filled rectangle by two times in equal proportion. The resulting rectangle is the expanded sample image.
[0022] 2-4: Remove the scaled and spliced images from the pine wilt disease tree dataset, repeat the above steps for the remaining images to obtain a large number of expanded sample images, and store these expanded samples in the pine wilt disease tree dataset.
[0023] In step 4, a one-stage feature-enhanced target detection network based on the pooled weighted attention mechanism is constructed, which specifically includes the following steps:
[0024] 3-1: First, input the images in the pine wilt diseased tree dataset into the residual network to extract the pine wilt diseased tree features, and obtain feature maps C1, C2, C3, C4, and C5;
[0025] 3-2: Constructing a pooling-based weighted attention module, specifically including the following steps:
[0026] 3-2-1: First, perform global average pooling and global maximum pooling operations on the input H*W*C feature map F to obtain two 1*1*C one-dimensional feature vectors;
[0027] 3-2-2: Generate two channel weight values K by performing a fast one-dimensional convolution operation of size K on two 1*1*C one-dimensional feature vectors M and K A , where K is determined adaptively by mapping the channel dimension C:
[0028]
[0029] Where: γ and b are constants, K is the nearest odd value calculated;
[0030] 3-2-3: Set the two channel weights K M and K A Perform adaptive weighted fusion operation to obtain the pooled weighted attention weight value X after pooling, as shown in the following formula:
[0031] X=λK M +βK A
[0032] Where λ and β are two hyperparameters;
[0033] 3-2-4: The pooled weighted attention weight value X after pooling is normalized to between 0 and 1 through the Sigmund activation function to obtain the final pooled weighted attention weight X′; finally, the pooled weighted attention weight X′ is recalibrated with the feature map F to obtain the pooled weighted attention feature map F′. The specific formula is as follows:
[0034] F′=F*X′
[0035] 3-3: After the 1*1 convolution operation, the feature map C2 and the feature map C3 are input into the pooling weighted attention module to obtain the feature map C2 after the pooling weighted attention operation and the feature map C3 after the pooling weighted attention operation;
[0036] 3-4: Input the feature maps C2, C3, C4, and C5 after the pooled weighted attention operation into the pyramid feature fusion module to obtain the predicted feature maps P2, P3, P4, and P5;
[0037] 3-5: Finally, the predicted feature map is input into the classification detection head and regression detection head respectively to obtain the category information and location information of the target.
[0038] The one-stage feature enhancement target detection network based on the pooling weighted attention mechanism is as follows:
[0039] The first shallow feature map of the backbone network feature extraction module → the second shallow feature map of the backbone network feature extraction module → the third shallow feature map of the backbone network feature extraction module → the fourth deep feature map of the backbone network feature extraction module Figure 1 The fifth layer deep feature map of the backbone network feature extraction module;
[0040] The second shallow feature map of the backbone network feature extraction module → the third shallow feature map of the backbone network feature extraction module → the first 1*1 convolution operation → the second 1*1 convolution operation → the first pooling weighted attention module → the second pooling weighted attention module → the first concat operation → the first 3*3 convolution operation → the first shallow prediction feature map;
[0041] The third shallow feature map of the backbone network feature extraction module → the fourth deep feature map of the backbone network feature extraction module → the third 1*1 convolution operation → the fourth 1*1 convolution operation → the third pooling weighted attention module → the second concat operation → the second 3*3 convolution operation → the second shallow prediction feature map;
[0042] The fourth deep feature map of the backbone network feature extraction module → the fifth deep feature map of the backbone network feature extraction module → the fifth 1*1 convolution operation → the sixth 1*1 convolution operation → the third concat operation → the third 3*3 convolution operation → the first deep prediction feature map;
[0043] The fifth deep feature map of the backbone network feature extraction module → the seventh 1*1 convolution operation → the fourth 3*3 convolution operation → the second deep prediction feature map.
[0044] The pooled weighted attention module is as follows:
[0045] Feature map of the backbone network feature extraction module → global maximum pooling operation → one-dimensional feature vector;
[0046] Feature map of the backbone network feature extraction module → global average pooling operation → one-dimensional feature vector;
[0047] One-dimensional feature vector → fast one-dimensional convolution operation of size K → channel weight value;
[0048] One-dimensional feature vector → fast one-dimensional convolution operation of size K → channel weight value;
[0049] Channel weight value → channel weight value → weighted adaptive fusion operation → pooled weighted attention weight value;
[0050] Pooled weighted attention weight value → activation function activation → pooled weighted attention weight value;
[0051] Feature map of the backbone network feature extraction module → pooled weighted attention weight value → recalibrated dot multiplication operation → pooled weighted attention feature map.
[0052] Compared with the prior art, the present invention has the following technical effects:
[0053] First, the present invention constructs a small object sample expansion method with fixed scaling and random splicing. This method reduces the scale of diseased trees by a fixed ratio, increasing the number of diseased tree targets in a single image, especially the number of small-scale diseased tree targets, allowing the network to learn more characteristic information of small-scale diseased trees.
[0054] Secondly, the present invention proposes a pooling weighted attention module and adds it before the fusion of shallow feature layers. This effectively solves the problem of the complex background of drones interfering with the feature extraction of small-scale diseased trees, and enhances the algorithm's feature extraction capability for small-scale diseased trees.
[0055] Finally, a small target sample expansion method with fixed scaling and random splicing and a one-stage feature-enhanced target detection network constructed based on a pooled weighted attention mechanism were used to achieve efficient recognition of pine wilt diseased trees, especially the detection ability of small-scale pine wilt diseased trees was significantly enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0057] Figure 1 is a flow chart of the present invention;
[0058] Figure 2 This is a flow chart of the small target sample expansion method with fixed scaling and random splicing in the present invention;
[0059] Figure 3 Schematic diagram of the structure of the pooling weighted attention module in the present invention;
[0060] Figure 4 This is a network structure diagram of the present invention. DETAILED DESCRIPTION
[0061] like Figures 1 to 4 As shown in FIG, the pine wood nematode disease tree detection method based on small target sample expansion and pooling weighting includes the following steps:
[0062] Step 1: Photograph the pine forest under different lighting and terrain conditions to obtain original images;
[0063] Step 2: Crop the original image, annotate the cropped images of trees infected with pine wilt disease, and create a dataset of trees infected with pine wilt disease.
[0064] Step 3: Use a fixed scale and random splicing small target sample expansion method to increase the number of diseased trees in the image, especially the number of small-scale diseased tree targets;
[0065] Step 4: Build a feature-enhanced target detection network based on pooling weighted attention mechanism;
[0066] Step 5: Input the pine wilt diseased tree dataset into the pooled weighted attention mechanism feature enhancement target detection model for training to obtain the diseased tree recognition model;
[0067] Step 6: Input the image of the pine forest to be identified into the recognition model to obtain the vector position information of the diseased trees;
[0068] Step 7: Clean up the diseased trees according to their location information.
[0069] In step 1, a drone is used to photograph the pine forest under different lighting and terrain conditions to obtain original images. The specific steps include:
[0070] Pine forests under strong sunlight, weak sunlight, and no sunlight were selected respectively, and Pegasus UAVs were used to obtain images of the pine forests under these three conditions; at the same time, three areas with undulating mountains, gentle mountains, and low terrain were selected, and Pegasus UAVs were used to obtain images of the pine forests in these three types of mountains, thus obtaining diverse original pine forest images.
[0071] In step 2, the original pine forest image is cropped and the labelImg tool is used to label the cropped images of trees infected with pine wilt disease to create a pine wilt disease tree dataset. The specific steps include:
[0072] The original pine forest images taken by drones were stitched together, and then the stitched images and the original drone images were cropped into images of a fixed size. The dataset annotation tool labelImg was used to annotate diseased trees with reddish-brown and other characteristics in the cropped images. At the same time, red bare ground, red houses, and red car fronts, which have similar color characteristics to diseased trees, were marked as negative samples. Finally, the annotated images were divided into training, validation, and test sets according to a certain ratio.
[0073] like Figure 2 As shown, in step 3, a small target sample expansion method with fixed scaling and random splicing is constructed, which specifically includes the following steps:
[0074] 3-1: Randomly select four images numbered 1, 2, 3, and 4 from the pine wilt disease tree dataset. Scale the length and width of the four images by three fixed ratios of 0.4, 0.5, and 0.6 to obtain scaled images Img1, Img2, Img3, and Img4, as shown in the following formula:
[0075] Img i =resize(random(0.4, 0.5, 0.6)jpg i ) (i=1, 2, 3, 4)
[0076] Where Img is the image after fixed-scale scaling, i is the scaled image number, jpg is the original image, resize indicates the image is scaled in the same proportion to its length and width, and random indicates the range of the scaling factor.
[0077] 3-2: Create a new rectangular box with a length and width twice the length and width of the image in the pine wilt disease tree dataset. Divide the rectangular box into four sub-regions of the same size, r1, r2, r3, and r4, centered on the center point of the rectangular box.
[0078] 3-3: Fill image Img1 into sub-region r1, image Img2 into sub-region r2, image Img3 into sub-region r3, and image Img4 into sub-region r4. Reduce the length and width of the filled rectangle by two times in equal proportion. The resulting rectangle is the expanded sample image.
[0079] 3-4: Remove the scaled and spliced images from the pine wilt disease tree dataset, repeat the above steps for the remaining images to obtain a large number of expanded sample images, and store these expanded samples in the pine wilt disease tree dataset.
[0080] In step 4, a one-stage object detection network based on a pooled weighted attention mechanism is constructed, which specifically includes the following steps:
[0081] 4-1, such as Figure 3 As shown in Figure 2, a weighted attention module is constructed, which specifically includes the following steps:
[0082] 4-1-1: First, perform global average pooling and global maximum pooling operations on the input H*W*C feature map F to obtain two 1*1*C one-dimensional feature vectors;
[0083] 4-1-2: Generate two channel weight values K by performing a fast one-dimensional convolution operation of size K on two 1*1*C one-dimensional feature vectors M and K A , where K is determined adaptively by mapping the channel dimension C:
[0084]
[0085] Where: Y = 2, b = 1, K is the calculated adjacent odd value;
[0086] 4-1-3: Set the two channel weights K M and K A Perform adaptive weighted fusion operation to obtain the weighted attention channel weight X, as shown in the following formula:
[0087] X=λK M +βK A
[0088] Where λ and β are two hyperparameters.
[0089] 4-1-4: The weighted attention channel weight X is normalized to between 0 and 1 through the Sigmund activation function to obtain the final weighted attention weight X'. Finally, the weighted attention weight is recalibrated with the feature map F to obtain the weighted attention feature map F':
[0090] F′=F*X′
[0091] 4-2, such as Figure 4 As shown in the figure, a one-stage target detection network based on pooling weighted attention mechanism is constructed, which includes the following steps:
[0092] First, the image is input into the residual network (resnet50) to extract the features of the pine wood nematode diseased tree, and feature maps C1, C2, C3, C4, and C5 are obtained;
[0093] After the 1*1 convolution operation, the feature map C2 and the feature map C3 are input into the pooling weighted attention module to obtain the feature map C2 after the pooling weighted attention operation and the feature map C3 after the pooling weighted attention operation;
[0094] Input the feature map C2 after the pooling weighted attention operation, the feature map C3 after the pooling weighted attention operation, the feature map C4, and the feature map C5 into the pyramid feature fusion module to obtain the predicted feature map P2, the predicted feature map P3, the predicted feature map P4, and the predicted feature map P5;
[0095] Finally, the predicted feature map is input into the classification detection head and regression detection head respectively to obtain the category information and location information of the target.
[0096] Example:
[0097] Step 1: Use the Pegasus drone to photograph the pine forest under different lighting and terrain environments to obtain diverse original pine forest images.
[0098] Step 2: Stitch the collected original pine forest images to obtain a stitched drone pine forest image. Then crop the stitched image and the original image separately to a scale of 1000*1000. Use the labelImg tool to label the reddish-brown pine trees with needle-shaped leaves in the cropped image as diseased trees. Label the red bare land, red houses, and red cars, which are similar in color to the diseased trees, as one category. The labeled images are divided into training, validation, and test sets in a ratio of 8:1:1.
[0099] Step 3: Use a fixed scale and random splicing small object sample expansion method on the image input to the detection network to increase the number of diseased trees in the image, especially the number of small-scale diseased tree targets;
[0100] Step 4: Input the prepared pine wilt diseased tree dataset and the images after small target sample expansion into the constructed one-stage feature enhancement target detection network model based on the pooling weighted attention mechanism for training. Based on the training results, adjust the parameters and continue training until the final diseased tree detection model is obtained;
[0101] Step 5: Input the drone pine forest image to be identified into the diseased tree detection model for identification, and obtain the identification results of the pine wilt diseased trees and the vector location information (latitude and longitude coordinates) of the diseased trees;
[0102] Step 6: Based on the location information of the diseased trees, forestry personnel conduct on-site inspections and manually cut down and burn the diseased trees that have been correctly identified.
[0103] Experiments were conducted on a dataset of pine wilt diseased trees. The performance comparison results of various algorithm models are shown in Table 1. From the data in the table, it can be seen that the one-stage target detection network model based on the pooled weighted attention mechanism proposed in the present invention has the highest precision and recall rate.
[0104] Table 1 Verification results of different network models on the pine wood nematode disease tree dataset
[0105] Network Model Basic Network Recall Accuracy Faster-RCNN ResNet50 83.3 75.3 SSD VGG16 80.4 73.7 YOLOv3 DarkNet53 72.9 70.1 FoveaBox ResNet50 82.4 77.2 ATSS ResNet50 80.2 78.3 YOLOF ResNet50 81.5 78.0 YOLOv6 EfficientRep 80.5 73.6 Ours ResNet50 86.9 79.1
[0106] In order to verify the effectiveness of the small sample expansion method and pooling weighted attention module proposed in this invention on the network model proposed in this invention, an ablation experiment was conducted on the pine wood nematode disease tree dataset. The experimental results are shown in Table 2 below. As can be seen from the table, the addition of the small sample expansion method proposed in this invention significantly improves the accuracy of the model and the recall rate also improves; the addition of the pooling weighted attention module proposed in this invention rapidly improves the recall rate of the model and also improves the accuracy. After adding the small sample expansion method and pooling weighted attention module proposed by our invention at the same time, the accuracy and recall rate of the model are significantly improved.
[0107] Table 2 Ablation experiment results of each module
[0108] Based on the RetinaNet model Pooling weighted attention module Small sample expansion method Recall Accuracy Whether to add no no 82.4 77.1 Whether to add yes no 85.4 78.0 Whether to add no yes 83.2 78.4 Whether to add yes yes 86.9 79.1
[0109] The present invention constructs a small target sample expansion method with fixed scaling and random splicing. This method reduces the scale of diseased trees at a fixed ratio, increases the number of diseased tree targets in a single image, especially the number of small-scale diseased tree targets, and enables the network to learn more characteristic information of small-scale diseased trees.
Claims
1. A pine wilt diseased tree detection method based on small target sample expansion and pooling weighting is characterized by , which specifically includes the following steps: Step 1: Photograph the pine forest under different lighting and terrain conditions to obtain original images; Step 2: Crop the original image, annotate the cropped images of trees infected with pine wilt disease, and create a dataset of trees infected with pine wilt disease. Step 3: Use a fixed scale and random splicing small target sample expansion method to increase the number of diseased trees in the image, especially the number of small-scale diseased tree targets; Step 4: Construct a one-stage feature-enhanced target detection network based on the pooled weighted attention mechanism; Step 5: Input the pine wilt diseased tree dataset into the pooled weighted attention mechanism feature enhancement target detection model for training to obtain the diseased tree recognition model; Step 6: Input the image of the pine forest to be identified into the recognition model to obtain the vector position information of the diseased trees; Step 7: Clean up the diseased trees according to their location information; In step 4, a one-stage feature-enhanced target detection network based on the pooled weighted attention mechanism is constructed, which specifically includes the following steps: 3-1: First, input the images in the pine wilt diseased tree dataset into the residual network to extract the pine wilt diseased tree features, and obtain feature maps C1, C2, C3, C4, and C5; 3-2: Constructing a pooling-based weighted attention module, specifically including the following steps: 3-2-1: First, perform global average pooling and global maximum pooling operations on the input H*W*C feature map F to obtain two 1*1*C one-dimensional feature vectors; 3-2-2: Generate two channel weight values K by performing a fast one-dimensional convolution operation of size K on two 1*1*C one-dimensional feature vectors M and K A , where k is determined adaptively by mapping the channel dimension C: Among them: γ and b are constants, k is the nearest odd value calculated; 3-2-3: Set the two channel weights K M and K A Perform adaptive weighted fusion operation to obtain the pooled weighted attention weight value X after pooling weighting, as shown in the following formula: X=λK M +βK A ; Where λ and β are two hyperparameters; 3-2-4: The pooled weighted attention weight value X after pooling is normalized to between 0 and 1 through the Sigmund activation function to obtain the final weighted attention weight X′; finally, the weighted attention weight X′ is recalibrated with the feature map F to obtain the weighted attention feature map F′. The specific formula is as follows: F′=F*X′; 3-3: After the 1*1 convolution operation, the feature map C2 and the feature map C3 are input into the pooling weighted attention module to obtain the feature map C2 after the pooling weighted attention operation and the feature map C3 after the pooling weighted attention operation; 3-4: Input the feature maps C2, C3, C4, and C5 after the pooled weighted attention operation into the pyramid feature fusion module to obtain the predicted feature maps P2, P3, P4, and P5; 3-5: Finally, the predicted feature map is input into the classification detection head and regression detection head respectively to obtain the category information and location information of the target.
2. The method according to claim 1, characterized in that In step 3, the small target sample expansion method using fixed scaling and random splicing includes the following steps: 2-1: Randomly select four images numbered 1, 2, 3, and 4 from the pine wilt disease tree dataset. Scale the length and width of the four images in equal proportions according to three fixed ratios to obtain scaled images Img1, Img2, Img3, and Img4, as shown in the following formula: Img i =resize(random(0.4、0.5、0.6)jpg i ) (i=1、2、3、4); Where Img is the image after fixed-scale scaling, i is the scaled image number, jpg is the original image, resize indicates the image is scaled in the same proportion to its length and width, and random indicates the range of the scaling factor. 2-2: Create a new rectangular box with a length and width twice the length and width of the image in the pine wilt disease tree dataset. Divide the rectangular box into four equal-sized sub-regions r1, r2, r3, and r4, centered around the center point of the rectangular box. 2-3: Fill image Img1 into sub-region r1, image Img2 into sub-region r2, image Img3 into sub-region r3, and image Img4 into sub-region r4. Reduce the length and width of the filled rectangle by two times in equal proportion. The resulting rectangle is the expanded sample image. 2-4: Remove the scaled and spliced images from the pine wilt disease tree dataset, repeat the above steps for the remaining images to obtain a large number of expanded sample images, and store these expanded samples in the pine wilt disease tree dataset.
3. The method according to claim 1 or 2, characterized in that The one-stage feature enhancement target detection network based on the pooling weighted attention mechanism is as follows: The first shallow feature map of the backbone network feature extraction module (1) → the second shallow feature map of the backbone network feature extraction module (2) → the third shallow feature map of the backbone network feature extraction module (3) → the fourth deep feature map of the backbone network feature extraction module (4) → the fifth deep feature map of the backbone network feature extraction module (5); The second shallow feature map of the backbone network feature extraction module (2) → the first 1*1 convolution operation (6) → the first pooling weighted attention module (9); The third shallow feature map of the backbone network feature extraction module (3) → the second 1*1 convolution operation (7) → the second pooling weighted attention module (10); First pooling weighted attention module (9), second pooling weighted attention module (10) → first concat operation (11) → first 3*3 convolution operation (12) → first shallow prediction feature map (15); The fourth deep feature map of the backbone network feature extraction module (4) → the fourth 1*1 convolution operation (8) → the second concat operation (13); Second pooling weighted attention module (10) → second concat operation (13) → second 3*3 convolution operation (14) → second shallow prediction feature map (16); The fifth deep feature map of the backbone network feature extraction module (5) → the sixth 1*1 convolution operation (20) → the third concat operation (17); The fourth 1*1 convolution operation (8) → the third concat operation (17) → the third 3*3 convolution operation (18) → the first deep prediction feature map (19); The sixth 1*1 convolution operation (20) → the fourth 3*3 convolution operation (21) → the second deep layer prediction feature map (22).
4. The method according to claim 3, characterized in that The pooled weighted attention module is as follows: Feature map of the backbone network feature extraction module (23) → first global maximum pooling operation (24) → first one-dimensional feature vector (25); Feature map of the backbone network feature extraction module (23) → second global average pooling operation (26) → second one-dimensional feature vector (27); First one-dimensional feature vector (25) → fast one-dimensional convolution operation of size K (28) → first channel weight value (29); Second one-dimensional feature vector (27) → fast one-dimensional convolution operation of size K (28) → second channel weight value (30); First channel weight value (29), second channel weight value (30) → weighted adaptive fusion operation (31) → first pooled weighted attention weight value (32); First pooled weighted attention weight value (32) → activation function activation (33) → second pooled weighted attention weight value (34); Feature map of the backbone network feature extraction module (23), the second pooled weighted attention weight value (34) → recalibrated dot multiplication operation (35) → pooled weighted attention feature map (36).
Citation Information
Patent Citations
Intelligent pine wood nematode disease tree identification method based on sample imbalance
CN115019200A