Plant detection method based on scale perception and attention discrimination
By adopting the SCNet network model based on scale perception and discriminant attention in plant detection, the problem of time-consuming and low accuracy of traditional methods is solved, and efficient and accurate plant detection and counting is achieved.
Patent Information
- Application Number
- CN202411945427.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional plant detection methods are time-consuming, easy to miss or misrecord, and may cause damage to plants. The prior art has low accuracy and limited application in plant recognition.
Plant detection methods based on scale perception and discriminative attention are adopted. The drone collects image data and inputs the trained SCNet network model to extract, identify and segment plant features, and combines the scale perception context module and discriminative attention module to improve detection accuracy and efficiency.
It realizes efficient feature extraction, identification and classification counting of plants, improves plant type detection efficiency and quantity detection accuracy, and can better perceive the discriminant boundaries of different plants and distinguish between targets and backgrounds.
Smart Images

Figure CN119863661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of plant categories and quantities, and in particular to a plant detection method based on scale perception and discrimination attention. Background Art
[0002] The number of plants is a crucial phenotypic trait in the agriculture and forestry industry. It can reflect the coverage and density of vegetation and is of great significance to activities such as plant growth management and environmental monitoring. However, traditional manual survey methods are not only time-consuming and prone to omissions or misrecording, but may also cause damage to plants. The UAV remote sensing platform has become an emerging tool for collecting vegetation information over a large area due to its miniaturization, practicality, high resolution and relatively low cost. Traditional models generally include the following methods in plant recognition: Fernandez et al. identified wheat ears by analyzing local peaks in images. They used local peaks of images for wheat ear recognition, and the recognition accuracy was not high; Madec et al. proposed a method for estimating ear density by combining Fast-RCNN and high spatial resolution RGB images; Bao Wenxia et al. constructed a wheat ear density map estimation model using a crowded scene recognition network. The above method only identifies a single category of plants, and uses local peaks of images, ear density and other means for identification and confirmation, and its application is relatively limited. Therefore, it is urgent to develop more efficient methods combined with UAV images to improve plant detection and counting accuracy, thereby promoting the intelligentization of plant production management and growth monitoring. Summary of the invention
[0003] The purpose of the present invention is to provide a plant detection method based on scale perception and discriminant attention. By collecting drone image data of the study area through drones and inputting it into the trained SCNet network model, the features of the plants in the drone images can be extracted, identified, and segmented, and the plants can be effectively detected and segmented. The present invention can classify the plant categories to obtain plant detection results classified according to the plant categories, and can perform plant type recognition and classification counting, thereby improving the efficiency of plant type detection and the accuracy of quantity detection.
[0004] The purpose of the present invention is achieved through the following technical solutions:
[0005] A plant detection method based on scale perception and discrimination attention, the method comprising:
[0006] S1. Collect drone image data and annotate plant labels to build an image sample dataset; build an SCNet network model, which uses the image sample dataset for model training; the SCNet network model includes a front-end network, a scale-aware context module, a discriminative attention module, and a back-end network. The front-end network extracts the basic feature map v of the input image. f ;
[0007] S2, the scale-aware context module extracts multi-scale local perception features from the basic feature map and generates a scale-aware context feature map c by combining the weight distribution f ; The discriminative attention module uses similarity attention to adjust the basic features to obtain the feature map F″;
[0008] S3, the backend network converts the feature map c f After being fused with the feature map F″, the backend network uses the classification head to classify the fused feature map through global average pooling, and uses the detection head to generate the final plant detection result;
[0009] S4. Collect UAV image data of the study area and input it into the trained SCNet network model to obtain plant detection results.
[0010] In order to better implement the present invention, the plant labels in the image sample data set include plant categories; the classification head classifies the plant detection results according to the categories, and the detection head performs counting processing on the plant detection results according to the categories.
[0011] Preferably, the front-end network is constructed using the backbone network of the YOL0v8 model, and the front-end network includes several convolutional layers, deconvolutional layers and several C2f modules. The front-end network uses the convolutional layers, deconvolutional layers and C2f modules to extract features.
[0012] Preferably, the basic feature map v f After being input into the scale-aware context module, the scale-aware context module performs a spatial pyramid pooling operation. The basic features of each layer are divided into feature blocks, and a 1×1 convolution operation is used to fuse the information of the feature blocks. Then, the bilinear interpolation method is used to upsample the feature blocks to the same size as the basic feature map and obtain the scale-aware feature map S. i , i represents the i-th scale, and there are l different scales in total; then compare the scale perception feature with the basic feature to generate the contrast feature C i , introduce the weight distribution mechanism to obtain the weight w i The 1×1 convolutional layer is used to learn the network adaptive weights, and the perceptual features of l different scales are weightedly fused to obtain the weighted scale perceptual feature a f , the expression is as follows:
[0013] Where ⊙ represents the product of the corresponding element between the weight and the feature;
[0014] The weighted scale-aware features are fused with the basic features to obtain the final scale-aware contextual features.
[0015] Preferably, the discriminant attention module clearly divides the category response into two categories, foreground and background, in the feature extraction stage. The foreground is the target plant area. The discriminant attention module includes a channel attention module and a spatial attention module. The channel attention module uses the reshape function to transform the query Q, key K and value V, performs matrix multiplication on the transpose of the query Q and key K, and uses the softmax function to calculate the attention mapping between channels. The expression is as follows:
[0016] Where Q m : represents the mth row of the query matrix Q, K n : represents the nth row of the key matrix K, x mn represents the influence of the mth channel on the nth channel, and C is the total number of channels;
[0017] Then matrix multiplication is performed between X and value V and scaled to the enhanced feature F′ using the scale factor λ1, as shown below:
[0018] where F' m : represents the characteristic output of channel m, V n : represents the nth row of the value matrix V, F m : represents the feature of channel m in the basic feature;
[0019] The spatial attention module uses three 1×1 convolutional layers on the feature F′ and reshapes the convolution result to generate feature maps Q′, K′, and V′. It performs matrix multiplication on the transpose of Q′ and K′ and normalizes it using the softmax function to generate the spatial attention map X′. The expression is as follows:
[0020] where Q′ :p represents the pth position of the query matrix Q′, K′ :q represents the qth position of the key matrix K′, x′ pg represents the influence of the qth position on the pth position, and N is the total number of positions;
[0021] Then matrix multiplication is performed between X′ and value V′ and scaled to the enhanced feature F″ using the scale factor λ2, as shown below:
[0022] Where F″ :p represents the feature output at position p, V′ :q represents the qth position of the value matrix V′, F′ :p Represents the feature at position p in feature F′.
[0023] Preferably, the SCNet network model uses density map loss for loss constraint during model training. The density map loss is the difference L between the predicted density map and the true density map. D (θ), the expression is as follows:
[0024] Where θ is the parameter of the SCNet network model; K is the total number of images used for model training; X k represents the kth input image; F k and F(X k ; θ) represent the true density map and predicted density map of the kth input image respectively.
[0025] Preferably, the detection head uses absolute counting loss for loss constraint during counting processing, and the expression is as follows:
[0026] in and Y y (X k ; θ) represent the actual number of plants in the kth input image and the number predicted by the network output, respectively.
[0027] Preferably, the SCNet network model obtains a mixed loss L by weighted summation of LD(θ) and LY(θ), and uses the mixed loss L to constrain the model loss of the SCNet network model. The expression is as follows:
[0028] L=(1-μ)L D (θ)+μL Y (θ), μ is a parameter.
[0029] Preferably, the drone image data in the image sample data set undergoes data enhancement including random cropping and random rotation, and the method includes the following: randomly flipping the image horizontally with a probability of 0.5; randomly cropping the image to no more than 30 pixel units in length and width; randomly sampling an integer from [H-30, H] as the length of the cropped image, and randomly sampling an integer from [W-30, W] as the width of the cropped image, H and W represent the length and width of the original image, and cropping is performed with the center of the original image as the center; randomly rotating the image with a probability of 0.2, and randomly sampling an integer from -15° to 15° to rotate the cropped image.
[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0031] (1) The present invention collects drone image data of the study area through drones and inputs it into the trained SCNet network model, which can extract, identify and segment the features of plants in the drone images, and effectively detect and segment the plants; the present invention can classify the plant categories to obtain plant detection results classified according to the plant categories, and can identify and classify plant types, thereby improving the efficiency of plant type detection and the accuracy of quantity detection.
[0032] (2) The SCNet network model of the present invention includes a scale-aware context module, which improves the model's multi-scale context feature representation and recognition, thereby better perceiving the discrimination boundaries between different plants.
[0033] (3) The SCNet network model of the present invention includes a discriminative attention module, which can select more critical information for the current target from redundant feature information and improve the ability to distinguish between the target and the background. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of the method of the present invention;
[0035] Figure 2 It is a structural diagram of the SCNet network model in the embodiment;
[0036] Figure 3 This is a schematic diagram of the structure of the front-end network in the embodiment;
[0037] Figure 4 This is a schematic diagram of the structure of the backend network in the embodiment;
[0038] Figure 5 Schematic diagram of the structure of the mesoscale-aware context module in the embodiment;
[0039] Figure 6 It is a schematic diagram of the structure of the attention module in the embodiment;
[0040] Figure 7 A schematic diagram of the Daliuta coal mine subsidence area as a study area is given as an example of an embodiment;
[0041] Figure 8 The results of plant detection in the Daliuta coal mine subsidence area are taken as an example of the study area. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below in conjunction with embodiments:
[0043] Example
[0044] like Figure 1 As shown, a plant detection method based on scale perception and discrimination attention includes:
[0045] S1. Collect drone image data and mark plant labels to construct an image sample data set; the drone image data in the image sample data set undergoes data enhancement including random cropping and random rotation, and the methods include the following: random flipping to flip the image horizontally with a probability of 0.5; random cropping to not exceed 30 pixel units in length and width; randomly sampling integers from [H-30, H] as the length of the cropped image, and randomly sampling integers from [W-30, W] as the width of the cropped image, H and W represent the length and width of the original image, and cropping is performed with the center of the original image as the center; random rotation is performed with a probability of 0.2, and the cropped image is rotated by randomly sampling integers from -15° to 15°.
[0046] This embodiment takes the Daliuta coal mine subsidence area as an example to collect data in the study area. The measurement area of the study area is as follows: Figure 7 As shown. In the 2D orthophotos taken by drones, the differences between different plants are small and the plant crowns are prone to overlap, which makes it difficult to accurately detect and count plants. In order to improve the accuracy of plant detection and counting, the scale-aware context module SACM and the discrimination attention module DAM are proposed to improve the plant discrimination ability of the model. The method is as follows:
[0047] Step 1: Collect image data through drones and make a dataset. The dataset is divided into training set, test set and validation set.
[0048] a, Image acquisition. The present invention uses the M350 RTK drone of DJI Innovations Technology Co., Ltd. as a data acquisition tool, and the drone parameters are as follows. The image shooting is selected in a clear or cloudy environment with sufficient light, the relative flight altitude is set to 50m, the heading overlap and the lateral overlap are both set to 85%, and 5694 drone original images are collected in the subsidence area of the Daliuta coal mine;
[0049]
[0050] b, Data annotation and data set division. After obtaining the original drone images, the 3D modeling software Agisoft Metashape Professional was used to stitch the images and correct the camera distortion to generate orthophotos. The orthophotos were cropped to a suitable size and the Labelme dataset annotation tool was used to annotate the plant crown images. 2041 images were selected as the training set, 287 images as the validation set, and the remaining 3366 images as the test set.
[0051] Construct the SCNet network model, which uses the image sample data set for model training; Figure 2As shown in Figure 1, the SCNet network model includes a front-end network, a scale-aware context module (SACM), a discriminative attention module (DAM), and a back-end network. The front-end network extracts the basic feature map v of the input image. f Preferably, if Figure 3 As shown, the front-end network is constructed using the backbone network of the YOLOv8 model (the network structure of the front-end network is shown in Figure 3 As shown in Figure 2, the backbone network Backbone) and the front-end network include several convolutional layers and deconvolutional layers and several C2f modules (such as Figure 3 As shown in the figure, conv is a convolutional layer and a deconvolutional layer, C2f is a C2f module, and the convolutional layer, the deconvolutional layer, and several C2f modules are alternately arranged), and the front-end network uses the convolutional layer, the deconvolutional layer, and the C2f module to extract features. Since the differences between different types of plants (such as various trees) in the 2D orthophotos taken by drones are small, and the crown widths of plants are easily overlapped, it is difficult to accurately detect and count plants. In order to improve the accuracy of plant detection and counting, the present invention constructs an SCNet network model for model learning and training, which improves the accuracy of plant detection and counting.
[0052] S2, the scale-aware context module extracts multi-scale local perception features from the basic feature map and generates a scale-aware context feature map c by combining the weight distribution f (For densely packed tree plants with insignificant category differences, it is difficult to determine the boundaries between different plants during detection. Therefore, the present invention makes full use of the contextual information in the image features, which can effectively reflect the large-scale consistency that often appears in the image.) The discriminative attention module (which can selectively enhance useful features while suppressing background noise and improving the accuracy of feature detection and recognition) uses similarity attention to adjust the basic features to obtain the feature map F″.
[0053] In some embodiments, the base feature map v f (For example, given an input image of size H×W, first use YOLOv8 to extract basic features and obtain the feature map v f , feature map v f After the scale-aware context module is input (size C×H×W), Figure 5As shown in Figure 1, the scale-aware context module performs a spatial pyramid pooling operation (which can deeply mine the multi-scale information in the image), and the basic features of each layer are divided into feature blocks (after the pyramid pooling operation, the basic features of each layer are divided into k(i)×k(i) feature blocks. Where i represents the i-th scale, and there are l different scales. The values of k(i) are 1 and 3, respectively, to capture the details of different scales). A 1×1 convolution operation is used to fuse the information of the feature blocks; then the bilinear interpolation method is used to upsample the feature blocks to the same size as the basic feature map (i.e., C×H×W) and obtain the scale-aware feature map s i , i represents the i-th scale, and there are l different scales in total; then compare the scale perception feature with the basic feature to generate the contrast feature C i (It can deeply understand the difference and importance of similar features at each position in the image, and by comparing the scale-perceptual features with the basic features, carefully analyze the relative contribution of the scale-perceptual features at each spatial position, thereby generating contrast features; it not only enhances the model's sensitivity to feature differences, but also provides a more accurate information basis for subsequent feature fusion and decision-making), introduce the weight allocation mechanism to obtain the weight w i In order to make full use of the unique value of each scale perception feature and give them appropriate importance, a weight allocation mechanism is introduced to calculate a corresponding weight w for each scale. i ) and use the 1×1 convolutional layer to learn the network adaptive weights to perform weighted fusion on l different scales of perceptual features to obtain the weighted scale perceptual feature a f , the expression is as follows:
[0054] Where ⊙ represents the product of the corresponding element between the weight and the feature;
[0055] The weighted scale-aware features are fused with the basic features to obtain the final scale-aware contextual features c f , the expression is as follows: c f =[a f |v f ], where [·|·] represents the channel concatenation operation.
[0056] In some embodiments, Figure 6As shown in the figure, the discriminative attention module clearly divides the category response into two categories: foreground and background in the feature extraction stage. The foreground is the target plant area, and the background includes all other non-target areas except the foreground; the discriminative attention module (implemented in a non-local way to capture the long-range contextual associations in channels and spatial positions, so as to enhance the semantic feature representation from a global perspective; it can more effectively mine the foreground features, while significantly reducing the error interference that may be introduced by background information) includes a channel attention module and a spatial attention module. The channel attention module uses the reshape function to transform the query Q, key K and value V, performs matrix multiplication on the transpose of the query Q and key K, and uses the softmx function to calculate the attention mapping between channels. The expression is as follows:
[0057] Where Q m: represents the mth row of the query matrix Q, K n: represents the nth row of the key matrix K, x mn represents the influence of the mth channel on the nth channel, and C is the total number of channels;
[0058] Then, matrix multiplication is performed between K and value V and scaled to the enhanced feature F′ using the scale factor λ1 (in order to improve the fault tolerance of the model, the scale factor λ1 is used for scaling), as shown below:
[0059] where F′ m : represents the characteristic output of channel m, V n: represents the nth row of the value matrix V, F m: Represents the features of channel m in the basic features;
[0060] The spatial attention module uses three 1×1 convolutional layers on the feature F′ and reshapes the convolution result to generate feature maps Q′, K′, and V′. It performs matrix multiplication on the transpose of Q′ and K′ and normalizes it using the softmax function to generate the spatial attention map X′. The expression is as follows:
[0061] where Q′ :p represents the pth position of the query matrix Q′, K′ :q represents the qth position of the key matrix K′, x′ pg represents the influence of the qth position on the pth position, and N is the total number of positions;
[0062] Then matrix multiplication is performed between X′ and the value V′ and scaled to the enhanced feature F″ using the scale factor λ2 (multiplied by a learnable scale parameter λ2 and adding a skip connection to get the final output F″), expressed as follows:
[0063] Where F″ :p represents the feature output at position p, V′ :q represents the qth position of the value matrix V′, F :p Represents the feature at position p in feature F′.
[0064] S3, such as Figure 4 As shown, the backend network transforms the feature map c f After being fused with the feature map F″, the back-end network uses the classification head to classify the fused feature map through global average pooling, and uses the detection head to generate the final plant detection result.
[0065] This example uses the Daliuta coal mine subsidence area as an example for the study area, and the model hardware and software parameters are as follows. The Adam optimizer is used for optimization, the batch size is set to 16, the learning rate is set to 0.0001, and the optimization is performed for 120 epochs.
[0066]
[0067] During the training process, after each round of training, the model is verified on the validation set, the mean of the loss function of all samples on the validation set is calculated, and the current test result is compared with the previous test result. If it is better than the previous performance, the model is saved. After the model is trained, the model performance is tested on the test set. During the test, the sample is scaled to 336*336 size; the test includes objective evaluation and subjective evaluation. Objective evaluation is the calculation of indicators: the accuracy (Precision), recall (Recall) and F1 score (F1 score) of the prediction results are calculated. The higher the three indicators, the better; subjective evaluation is evaluated by visual observation of the extraction results.
[0068] Precision Recall F1-score SCNet network model of the present invention 95.76% 87.85% 91.66%
[0069] S4. Collect UAV image data of the study area and input it into the trained SCNet network model to obtain plant detection results. Figure 8 As shown in the example of the Daliuta coal mine subsidence area as the study area, the plant detection results obtained from different areas of the study area are as follows Figure 8 As shown, the plant detection result includes the detected location and category of the plant, which is convenient for subsequent counting processing according to category.
[0070] In some preferred embodiments, in order for the SCNet network model to realize plant category recognition, the plant labels in the image sample data set include plant categories; the classification head classifies the plant detection results according to categories, and the detection head performs counting processing on the plant detection results according to categories. After the plant categories are identified, classification statistical counting processing is performed to obtain the categories of plants in the study area and the number of plants of each category.
[0071] In some embodiments, the SCNet network model uses density map loss for loss constraint during model training, and the density map loss is the difference L between the predicted density map and the true density map D (θ), the expression is as follows:
[0072] Where θ is the parameter of the SCNet network model; K is the total number of images used for model training; X k represents the kth input image; F k and F(X k ; θ) represent the true density map and predicted density map of the kth input image respectively.
[0073] In some embodiments, the detection head uses absolute count loss for loss constraint during counting processing, and the expression is as follows:
[0074] in and Y y (X k ; θ) represent the actual number of plants in the kth input image and the number predicted by the network output, respectively.
[0075] In some embodiments, the SCNet network model is implemented by L D (θ) and L Y (θ) is weighted summed to obtain the mixed loss L, and the mixed loss L is used to constrain the model loss of the SCNet network model. The expression is as follows:
[0076] L=(1-μ)L D (θ)+μL Y (θ), μ is a parameter (in some embodiments, μ is 0.1). The training samples are input into the model, the loss is calculated by the loss function, and the parameters are updated by back propagation. After each round of training, the model effect is tested on the validation set, and the model with the best performance on the validation set is saved.
[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A plant detection method based on scale perception and discrimination attention, characterized in that: The methods include: S1. Collect drone image data and annotate plant labels to build an image sample dataset; build an SCNet network model, which uses the image sample dataset for model training; the SCNet network model includes a front-end network, a scale-aware context module, a discriminative attention module, and a back-end network. The front-end network extracts the basic feature map v of the input image. f ; S2, the scale-aware context module extracts multi-scale local perception features from the basic feature map and generates a scale-aware context feature map c by combining the weight distribution f ; The discriminative attention module uses similarity attention to adjust the basic features to obtain the feature map F″; S3, the backend network converts the feature map c f After being fused with the feature map F″, the backend network uses the classification head to classify the fused feature map through global average pooling, and uses the detection head to generate the final plant detection result; S4. Collect UAV image data of the study area and input it into the trained SCNet network model to obtain plant detection results.
2. The plant detection method based on scale perception and discrimination attention according to claim 1, characterized in that: The plant labels in the image sample data set include plant categories; the classification head classifies the plant detection results according to the categories, and the detection head performs counting processing on the plant detection results according to the categories.
3. The plant detection method based on scale perception and discrimination attention according to claim 1, characterized in that: The front-end network is constructed using the backbone network of the YOLOv8 model. The front-end network includes several convolutional layers, deconvolutional layers and several C2f modules. The front-end network uses the convolutional layers, deconvolutional layers and C2f modules to extract features.
4. The plant detection method based on scale perception and discrimination attention according to claim 1, characterized in that: Basic feature map v f After being input into the scale-aware context module, the scale-aware context module performs a spatial pyramid pooling operation. The basic features of each layer are divided into feature blocks, and a 1×1 convolution operation is used to fuse the information of the feature blocks. Then, the bilinear interpolation method is used to upsample the feature blocks to the same size as the basic feature map and obtain the scale-aware feature map S. i , i represents the i-th scale, and there are l different scales in total; then compare the scale perception feature with the basic feature to generate the contrast feature C i , introduce the weight distribution mechanism to obtain the weight w i The 1×1 convolutional layer is used to learn the network adaptive weights, and the perceptual features of l different scales are weightedly fused to obtain the weighted scale perceptual feature a f , the expression is as follows: Where ⊙ represents the product of the corresponding element between the weight and the feature; The weighted scale-aware features are fused with the basic features to obtain the final scale-aware contextual features.
5. The plant detection method based on scale perception and discrimination attention according to claim 1, characterized in that: The discriminant attention module clearly divides the category response into two categories: foreground and background in the feature extraction stage. The foreground is the target plant area. The discriminant attention module includes a channel attention module and a spatial attention module. The channel attention module uses the reshape function to transform the query Q, key K and value V. The transpose of the query Q and key K is matrix multiplied, and the softmax function is used to calculate the attention mapping between channels. The expression is as follows: Where Q m : represents the mth row of the query matrix Q, K n : represents the nth row of the key matrix K, x mn represents the influence of the mth channel on the nth channel, and C is the total number of channels; Then matrix multiplication is performed between X and value V and scaled to the enhanced feature F′ using the scale factor λ1, as shown below: Where F′m: represents the feature output of channel m, V n : represents the nth row of the value matrix V, F m : represents the feature of channel m in the basic feature; The spatial attention module uses three 1×1 convolutional layers on the feature F′ and reshapes the convolution result to generate feature maps Q′, K′, and V′. It performs matrix multiplication on the transpose of Q′ and K′ and normalizes it using the softmax function to generate the spatial attention map X′. The expression is as follows: where Q′ :p represents the pth position of the query matrix Q′, K′ :q represents the qth position of the key matrix K′, x′ pg represents the influence of the qth position on the pth position, and N is the total number of positions; Then matrix multiplication is performed between X′ and value V′ and scaled to the enhanced feature F″ using the scale factor λ2, as shown below: Where F″ :p represents the feature output at position p, V′ :q represents the qth position of the value matrix V′, F′ :p Represents the feature at position p in feature F′.
6. The plant detection method based on scale perception and discrimination attention according to claim 2, characterized in that: The SCNet network model uses density map loss for loss constraint during model training. The density map loss is the difference L between the predicted density map and the true density map. D (θ), the expression is as follows: Where θ is the parameter of the SCNet network model; K is the total number of images used for model training; X k represents the kth input image; F k and F(X k ; θ) represent the true density map and predicted density map of the kth input image respectively.
7. The plant detection method based on scale perception and attention discrimination according to claim 6, characterized in that: The detection head uses absolute counting loss for loss constraint during counting processing, and the expression is as follows: in and Y y (X k ; θ) represent the actual number of plants in the kth input image and the number predicted by the network output, respectively.
8. The plant detection method based on scale perception and discrimination attention according to claim 7, characterized in that: The SCNet network model is constructed by L D (θ) and L Y (θ) is weighted summed to obtain the mixed loss L, and the mixed loss L is used to constrain the model loss of the SCNet network model. The expression is as follows: L=(1-μ)L D (θ)+μL Y (θ), μ is a parameter.
9. The plant detection method based on scale perception and discrimination attention according to claim 1, characterized in that: The drone image data in the image sample data set is subjected to data enhancement including random cropping and random rotation, and the method includes the following: random flipping is to flip the image horizontally with a probability of 0.5; random cropping is not more than 30 pixel units in length and width; random sampling of integers from [H-30, H] as the length of the cropped image, and random sampling of integers from [W-30, W] as the width of the cropped image, H and W represent the length and width of the original image, and the cropping is performed with the center of the original image as the center; random rotation is performed with a probability of 0.2, and the cropped image is rotated by randomly sampling integers from -15° to 15°.
Citation Information
Patent Citations
Strip steel surface defect detection method based on improved YOLOv5 network
CN114663346A
Crop seedling stage plant counting method based on improved multi-column convolutional neural network
CN115424257A
Multi-scale image tampering detection method based on mixed attention mechanism
CN115578626A
Crowd density estimation method based on spatial context learning network
CN116403152A
Expression recognition method based on attention-modulated contextual spatial information
WO2023185243A1
Cited By
Method and system for counting variety-independent plants
CN120725894A