Method for identifying a malaleuca tree crown
By combining the ResNet50 model and FPN module with the instance segmentation module and using an improved loss function to train the model, the problem of low accuracy in canopy recognition of garlic clove trees was solved, achieving efficient and accurate canopy recognition and biomass calculation, thus improving forestry management efficiency.
Patent Information
- Application Number
- CN202311478662.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-08
AI Technical Summary
Existing technologies struggle to accurately identify the canopies of garlic-fruit trees in mixed forests, resulting in low identification accuracy.
A ResNet50 model combined with an FPN module and an instance segmentation module was used to identify the canopy of garlic clove trees using UAV remote sensing images through feature extraction, classification, and fusion. An improved loss function was used to train the model to improve recognition accuracy.
It improves the accuracy and recall rate of garlic fruit tree canopy identification, enables more accurate calculation of canopy size and biomass, reduces management costs, and improves forestry management efficiency.
Smart Images

Figure CN117496301B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of plant identification technology, and in particular to a method for identifying the crown of garlic clove trees. Background Technology
[0002] The garlic-fruit tree is a rare plant, currently found only sporadically in Funing County, Yunnan Province, and parts of Guangxi Province, China, mainly growing mixed with other tree species. Its fruit is the main raw material for extracting nervonic acid, an important drug for treating neurological diseases, and has significant economic value. Therefore, investigating the garlic-fruit tree is crucial for plant conservation and production management. Thus, effective image identification of the garlic-fruit tree is particularly important.
[0003] However, because this tree species is sparsely distributed in natural forest mountainous areas and often intermingles with other tree species, traditional image recognition methods have difficulty distinguishing it correctly. The reason for this is that, since the garlic fruit grows in mixed forests, its crown and associated tree species have a high degree of similarity, the crown edges are irregular, and the growth density is high, making traditional image recognition methods less accurate. Summary of the Invention
[0004] This invention provides a method for identifying the crown of garlic-fruit trees, thereby addressing the shortcomings of the existing technology in terms of low accuracy in identifying the crown of garlic-fruit trees.
[0005] This invention provides a method for identifying the crown of garlic-fruit trees, comprising:
[0006] Obtain an image of the canopy of the garlic clove tree;
[0007] The image of the garlic clove tree crown is input into the initial garlic clove tree crown recognition model for training, and a trained garlic clove tree crown recognition model is obtained.
[0008] The image of the canopy of the garlic fruit tree to be identified is input into the canopy recognition model of the garlic fruit tree, and the specific location information of the canopy of the garlic fruit tree is predicted by the canopy recognition model of the garlic fruit tree;
[0009] The garlic clove tree crown recognition model includes: a feature extraction module, a classification module, an FPN module, an instance segmentation module, and a determination module;
[0010] The feature extraction module is used to extract feature information at different scales from the garlic fruit tree canopy image;
[0011] The classification module is used to project the feature information of the last scale extracted by the feature extraction module onto several layers, and determine the classification probability of the garlic fruit tree crown and the background in each layer.
[0012] The FPN module is used to upsample the feature information at different scales extracted by the feature extraction module, and then superimpose the upsampled feature information to perform feature enhancement and fusion, thereby obtaining fused features.
[0013] The instance segmentation module is used to project the fused features onto the corresponding plurality of layers and determine the position information of the garlic fruit tree crown in each layer;
[0014] The determination module is used to determine the position of the garlic fruit tree crown in the garlic fruit tree crown image based on the position information determined by the instance segmentation module and the classification probability determined by the classification module.
[0015] According to the present invention, a method for identifying the crown of a garlic clove tree is provided, wherein the feature extraction model adopts the ResNet50 model, and the garlic clove tree crown image is sequentially passed through the convolutional layers conv2, conv3, conv4 and conv5 of the ResNet50 model to extract feature information at different scales in the garlic clove tree crown image.
[0016] According to the present invention, a method for identifying the crown of a garlic clove tree is provided, wherein the classification module includes: a convolutional layer conv6, a convolutional layer conv7, and a convolutional layer conv8 arranged sequentially;
[0017] Between conv6 and convolutional layer conv7, and between convolutional layer conv7 and convolutional layer conv8, BN layer and ReLU layer are set sequentially; after conv8, a fully connected layer and a softmax classifier are connected.
[0018] According to the present invention, a method for identifying the crown of garlic clove trees is provided, wherein the FPN module includes: a unified channel module, an upsampling module, and a fusion module;
[0019] The fused features first pass through the unified channel module to unify the number of convolution channels for feature information of different scales; then the unified channel feature information is passed through the sampling module mentioned above to perform upsampling in sequence to obtain the corresponding upsampled feature information.
[0020] Finally, the upsampled feature information is passed through the fusion module, and the feature information is superimposed and fused in sequence to obtain the fused feature.
[0021] According to the present invention, a method for identifying the crown of a garlic-shaped fruit tree includes an instance segmentation module comprising:
[0022] Convolutional layer conv9, convolutional layer conv10, convolutional layer conv11;
[0023] Each convolutional layer is followed by an LN layer and a ReLU layer in sequence; and after the ReLU layer corresponding to the convolutional layer conv11, a sigmoid activation function is also connected.
[0024] According to the method for identifying the crown of a garlic-shaped fruit tree provided by the present invention, the garlic-shaped fruit tree crown identification model is trained using the following loss function during the training process:
[0025] Loss function = m(T) obj -(P∩T obj ))+m(T bg ∩P)
[0026] Among them, T obj The labeled object is represented by the garlic-fruit tree canopy mask, P represents the predicted garlic-fruit tree canopy, and T represents the predicted garlic-fruit tree canopy. bg The background of the labeled object is represented by ; m represents the measure function used to calculate pixel overlap.
[0027] The method for identifying the crown of a garlic clove tree provided by this invention projects the feature information at the last scale extracted by the feature extraction module onto several layers and determines the classification probability of the garlic clove tree crown and the background in each layer; the feature information at different scales extracted by the feature extraction module is upsampled separately, and the upsampled feature information is superimposed to obtain fused features; and the position information determined by the instance segmentation module and the classification probability determined by the classification module are used to finally determine the position of the garlic clove tree crown in the garlic clove tree crown image, thereby improving the efficiency and accuracy of garlic clove tree crown identification. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0029] Figure 1 The flowchart of the garlic fruit tree crown identification method provided by the present invention;
[0030] Figure 2 This is a schematic diagram illustrating the principle of garlic fruit tree crown recognition provided by the present invention.
[0031] Figure 3 A schematic diagram illustrating the identification results of a garlic-fruit tree crown provided by the present invention;
[0032] Figure 4 This is a schematic diagram of the classification module of the present invention;
[0033] Figure 5 This is a schematic diagram of the segmentation module structure of an example of the present invention;
[0034] Figure 6 A comparison diagram showing the segmentation effects of different methods provided by this invention on instances;
[0035] Figure 7 A comparison chart of prediction results provided by this invention;
[0036] Figure 8 This is a schematic diagram of the internal and external measure functions of the loss function;
[0037] Figure 9 This is a comparison image showing the identification of different original garlic clove tree canopy images using the method of this invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0039] Image segmentation has wide applications in most areas of digital image processing. High-resolution remote sensing image segmentation data plays an indispensable role in the monitoring and management of forest resources and the environment, as well as in the detection of the growth status and yield assessment of agricultural and forestry products. The plant canopy, as the first part of the plant to come into contact with the external gaseous environment and sunlight, is the main part for photosynthesis and plays an immeasurable role in plant growth, development, and biomass accumulation. This invention uses UAV remote sensing images to locate and detect the canopy of the important and precious tree species *Gnaphalium affine*. By locating and measuring the canopy, the growth and biomass accumulation status of *Gnaphalium affine* can be calculated, and its yield can be predicted. This widely applies UAV and other remote sensing technologies to forestry and the production management of precious tree species, improving management efficiency and reducing management costs. With the successful application of this technology in *Gnaphalium affine* canopy identification, we will extend it to the production management of other forestry tree species, saving labor costs for forestry workers, improving work efficiency, and achieving more accurate assessment, prediction, and management of forestry.
[0040] This invention provides a method for identifying the crown of garlic-fruit trees, which improves the accuracy and recall of UAV image recognition of garlic-fruit tree crowns. Precision refers to the proportion of samples that are actually positive out of all samples predicted as positive. Recall refers to the proportion of samples that are correctly predicted as positive out of all samples that are actually positive. Improving the precision and recall of garlic-fruit tree crown detection allows for accurate calculation of crown size, organic matter production and accumulation, and is significant for effectively calculating tree biomass. It also allows for more accurate estimation of garlic-fruit yield, improving management efficiency and reducing labor costs.
[0041] Figure 1 This is a flowchart of the garlic fruit tree crown identification method provided by the present invention. Figure 2 This is a schematic diagram of the principle of garlic fruit tree crown recognition provided by the present invention, as follows: Figure 1 The method includes the following steps:
[0042] Step 101: Obtain the canopy of the garlic fruit tree.
[0043] Specifically, this invention uses drones to photograph the canopy of garlic clove trees.
[0044] Step 102: Input the image of the garlic fruit tree crown into the initial garlic fruit tree crown recognition model for training to obtain the trained garlic fruit tree crown recognition model;
[0045] Step 103: Input the image of the garlic fruit tree crown to be identified into the garlic fruit tree crown recognition model, and predict the specific location information of the garlic fruit tree crown through the garlic fruit tree crown recognition model;
[0046] like Figure 2 As shown, the garlic tree crown recognition model includes: a feature extraction module, a classification module, an FPN module, and an instance segmentation module;
[0047] The feature extraction module is used to extract feature information at different scales from the garlic clove tree canopy image. The feature extraction model adopts the ResNet50 model, and the garlic clove tree canopy image is sequentially passed through the convolutional layers conv2, conv3, conv4, and conv5 of the ResNet50 model to extract feature information at different scales from the garlic clove tree canopy image.
[0048] Specifically, the drone images are first processed through the conv2, conv3, conv4 and conv5 convolutional layers in the ResNet50 model to extract feature information at different scales.
[0049] The classification module is used to project the feature information of the last scale extracted by the feature extraction module onto several layers, and determine the classification probability of the garlic fruit tree crown and the background in each layer.
[0050] Specifically, through the classification module CLS ( Figure 2 Calculate the classification probability of the garlic fruit tree canopy and the background, and give a definite classification.
[0051] The formula for the residual of a ResNet module is as follows:
[0052] y = F(x, w) + x
[0053] x is the output of the previous layer module, F is the transformation module of this layer that transforms x and then outputs it, and w is the weight adjusted by this layer module. This can realize the direct addition of the output of the previous layer to the output of this layer, realize the residual, and suppress gradient vanishing.
[0054] The FPN module is used to upsample feature information at different scales extracted by the feature extraction module, and then superimpose the upsampled feature information to perform feature enhancement and fusion, thereby obtaining fused features. The FPN module includes: a unified channel module, an upsampling module, and a fusion module; the fused features first pass through the unified channel module to unify the number of convolution channels for feature information at different scales; then the unified channel feature information is passed through the above-mentioned sampling module for sequential upsampling to obtain corresponding upsampled feature information; finally, the upsampled feature information is passed through the fusion module to sequentially superimpose and fuse the feature information to finally obtain the fused features.
[0055] Specifically, the feature information of different scales extracted from the ResNet50 model is first convolved with a 1x1 kernel of 256 to unify the number of convolution channels, and then upsampled and stacked to enhance and fuse the features, finally obtaining the fused features.
[0056] This invention projects different instances onto different layers using the instance segmentation module INSD, and calculates the precise boundaries of different instances using the instance segmentation loss function to achieve better segmentation results (OI-Mask module).
[0057] The formula for upsampling accumulation is as follows:
[0058]
[0059] Initial y i =P i i = 5
[0060] Because while multiple convolutional pooling operations extract image features, detailed image features are lost during pooling. Therefore, upsampling is used here to achieve multi-scale processing, preserving both fine-grained and coarse-grained features. yi is the input for upsampling, which, after undergoing a 2x bilinear interpolation, is then compared with the previous layer P. i-1 The pixels are added together to generate a new yi-1, which can then be input into the formula for calculation. Ultimately, not only are multi-scale features obtained, but the main features that are still retained after multiple scale transformations are continuously superimposed and strengthened, which can improve the accuracy of recognition and segmentation.
[0061] The determination module is used to determine the position of the garlic fruit tree crown in the garlic fruit tree crown image based on the position information determined by the instance segmentation module and the classification probability determined by the classification module.
[0062] Specifically, such as Figure 2 As shown, taking the cl layer of the classification module CLS and the ml layer of the instance segmentation module INSD as examples, in the cl layer, the probability of tree (garlic fruit tree crown) is 0.9; in the ml layer, the position of the garlic fruit tree crown is in the upper right corner (green part in the figure). Based on these two layers, it can be known that there is a part of the garlic fruit tree crown in the upper left corner of the garlic fruit tree crown image, and the area and position of the garlic fruit tree crown are shown in the ml layer. Figure 3 This is a schematic diagram illustrating the identification results of the canopy of a garlic-shaped fruit tree provided by the present invention, as shown below. Figure 3 As shown, the method provided by this invention improves the accuracy of garlic fruit tree crown identification.
[0063] Furthermore, Figure 4 This is a schematic diagram of the classification module of the present invention, as shown below. Figure 4 As shown, the classification module includes: convolutional layers conv6, conv7, and conv8 arranged in sequence; between conv6 and conv7, and between conv7 and conv8, BN layers and ReLU layers are arranged in sequence; after conv8, a fully connected layer and a softmax classifier are connected.
[0064] The CLS module has three 3x3 convolutional layers: conv6, conv7, and conv8. conv6 and conv7 are followed by Batch Normalization (BN) layers and ReLU layers for non-linear processing, while suppressing gradient vanishing to preserve more feature information. Finally, fully connected layers and softmax are used to calculate the classification probability and determine the location of the tree crown.
[0065] The CLS formula is as follows:
[0066]
[0067] y i =RELU(y i ), i = 6, 7, 8
[0068] Out = FC(y i ), i = 8
[0069] Cls = softmax(Out)
[0070] The ResNet output is convolved three times with 3x3 kernels, then separated into a one-dimensional vector array by a fully connected linear layer. This vector is then fed into a softmax layer to calculate the classification probability and determine the classification. Here, BN stands for Batch Normalization, and ReLU stands for Linear Rectification Function.
[0071] Furthermore, Figure 5 This is a schematic diagram of the segmentation module structure of an example of the present invention, as shown below. Figure 5 As shown, the instance segmentation module includes: convolutional layer conv9, convolutional layer conv10, and convolutional layer conv11; after each convolutional layer, an LN layer and a ReLU layer are connected in sequence; and after the ReLU layer corresponding to convolutional layer conv11, a sigmoid activation function is also connected.
[0072] Specifically, the instance segmentation module INSD employs a fully convolutional mode, using three 3x3 convolutional layers (conv9, conv10, and conv11). Following conv9, 10, and 11 are LN (Layer Normalization) regularization layers and ReLU layers for non-linear processing, simultaneously suppressing gradient vanishing and preserving more feature information. Finally, since only background and tree canopy are classified, a sigmoid function is directly applied for pixel-level differentiation, calculating the predicted tree canopy mask.
[0073] The INSD formula is as follows:
[0074]
[0075] y i =RELU(y i ), i = 9, 10, 11
[0076] Mask = sigmoid(y i ), i = 8
[0077] After the multi-scale outputs of the FPN module are superimposed, they are input into INSD. After three 3x3 convolutions, layer normalization, and ReLU shaping, a mask can be generated using sigmoid. Here, LN represents layer normalization, and ReLU represents the linear rectification function.
[0078] Furthermore, the instance segmentation module determines the position information of the garlic fruit tree crown in each layer using the following loss function. During training, the position requires that the overlap between the predicted pixel area and the labeled area should be as large as possible, and the overlap with the background area should be as small as possible:
[0079] Loss function = m(T) obj -(P∩T obj ))+m(T bg ∩P)
[0080] Among them, T obj The labeled object is represented by the garlic-fruit tree canopy mask, P represents the predicted garlic-fruit tree canopy, and T represents the predicted garlic-fruit tree canopy. bg The background of the labeled object is represented by ; m represents the measure function, which calculates the overlapping area of pixels.
[0081] Specifically, previous loss functions only considered the loss for misclassified pixels belonging to instances during instance segmentation, without considering the loss for pixels not belonging to instances being misclassified as instances. This invention unifies the two types of losses, proposing the loss function formula above. Thus, the improved loss function can more accurately predict and calculate the tree canopy boundaries, significantly improving segmentation accuracy.
[0082] The method provided by this invention projects the feature information at the last scale extracted by the feature extraction module onto several layers and determines the classification probability of the garlic clove tree crown and the background in each layer. It then upsamples the feature information at different scales extracted by the feature extraction module and superimposes the upsampled feature information to obtain fused features. Finally, using the location information determined by the instance segmentation module and the classification probability determined by the classification module, the position of the garlic clove tree crown in the garlic clove tree crown image is determined, thus improving the efficiency and accuracy of garlic clove tree crown recognition. Specifically, previous image recognition or segmentation models such as YOLO first divide the image into 7*7 grids, then calculate the probability of each grid containing an object, and then use non-maximum suppression to obtain the grids with the highest probability of containing the object. This consumes a large amount of storage space and computation. The method provided by this invention, however, no longer divides the image into small grids, but instead generates multiple projection layers for a single image, projects different objects onto different layers, and then determines whether a pixel belongs to that object, segmenting the image into pixel-level masks. This method not only improves the efficiency of garlic clove tree crown recognition but also improves the recognition accuracy.
[0083] Figure 6 This is a comparison diagram of the segmentation effects of different methods provided by the present invention on the instance, such as... Figure 6 As shown, the first row contains five different recognition results obtained using the existing Mask-RCNN image recognition method on five different original garlic clove tree canopy images; the second row contains five different recognition results obtained using the existing Solo V2 image recognition method on five different original garlic clove tree canopy images; the third row contains five different recognition results obtained using the existing Condlnst image recognition method on five different original garlic clove tree canopy images; and the fourth row contains five different recognition results obtained using the Ol-mask image recognition method of this invention on five different original garlic clove tree canopy images. Figure 6 As can be seen, the method provided by this invention directly projects different instances, which greatly saves computation and storage capacity and improves the efficiency of segmentation.
[0084] Furthermore, the loss function is often used as a learning criterion in relation to optimization problems. That is, by minimizing the loss function, the model is solved and evaluated, representing the difference between the predicted result and the expected result. Figure 7 A comparison chart of prediction results provided by this invention, such as Figure 7As shown, `pred` represents the predicted result, and `target` represents the expected result. The left column contains multiple instance segmentation example images; the right column also contains multiple instance segmentation example images, but they come from different locations. Before the model is properly trained, there may be significant differences between the two. The goal of training the model is to minimize these differences as much as possible, i.e., the loss function. Existing loss functions mainly consider the error caused by objects that should be assigned as targets but are not, and the error caused by objects that should not be assigned as targets, such as the background, but are assigned as targets. This application unifies these two types of errors. Figure 8 This is a schematic diagram illustrating the internal and external measures of the loss function, as shown below. Figure 8 On the left, the internal measure function increases, resulting in a smaller loss compared to the target object. The intersection between the external (background) measure function and the target object also decreases, making pixels not belonging to the target smaller, which similarly reduces the loss function. Figure 8 On the right. Thus, the improved loss function can more accurately predict and calculate the canopy boundaries, significantly improving segmentation accuracy.
[0085] Figure 9 Comparison images of different original garlic clove tree canopy images used in this invention for identification, such as... Figure 9 As shown, the first row contains five original images of garlic clove tree canopies: images a, b, c, d, and e. The second row contains the recognition results obtained by labeling the images corresponding to the first row. The third row contains the recognition results predicted by the model trained using the loss function provided in this invention. Figure 9 It can be seen that the boundary segmentation of the original image using the method of the present invention can more clearly delineate the boundaries.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying the crown of a garlic-shaped fruit tree, characterized in that, include: Obtain an image of the canopy of the garlic clove tree; The image of the garlic clove tree crown is input into the initial garlic clove tree crown recognition model for training, and a trained garlic clove tree crown recognition model is obtained. The image of the canopy of the garlic fruit tree to be identified is input into the canopy recognition model of the garlic fruit tree, and the specific location information of the canopy of the garlic fruit tree is predicted by the canopy recognition model of the garlic fruit tree; The garlic clove tree crown recognition model includes: a feature extraction module, a classification module, an FPN module, an instance segmentation module, and a determination module; The feature extraction module is used to extract feature information at different scales from the garlic fruit tree canopy image; The classification module is used to project the feature information of the last scale extracted by the feature extraction module onto several layers, and determine the classification probability of the garlic fruit tree crown and the background in each layer. The FPN module is used to upsample the feature information at different scales extracted by the feature extraction module, and then superimpose the upsampled feature information to perform feature enhancement and fusion, thereby obtaining fused features. The instance segmentation module is used to project the fused features onto the corresponding plurality of layers and determine the position information of the garlic fruit tree crown in each layer; The determination module is used to determine the position of the garlic fruit tree crown in the garlic fruit tree crown image based on the position information determined by the instance segmentation module and the classification probability determined by the classification module.
2. The method for identifying the crown of garlic-shaped fruit trees according to claim 1, characterized in that, The feature extraction module uses the ResNet50 model. The garlic tree canopy image is sequentially passed through the convolutional layers conv2, conv3, conv4 and conv5 of the ResNet50 model to extract feature information at different scales from the garlic tree canopy image.
3. The method for identifying the crown of garlic-shaped fruit trees according to claim 1, characterized in that, The classification module includes three convolutional layers: conv6, conv7, and conv8, arranged sequentially. Between conv6 and convolutional layer conv7, and between convolutional layer conv7 and convolutional layer conv8, BN layers and ReLU layers are sequentially arranged; after conv8, a fully connected layer and a softmax classifier are connected.
4. The method for identifying the crown of garlic-shaped fruit trees according to claim 1, characterized in that, The FPN module includes: a unified channel module, an upsampling module, and a fusion module; The fused features first pass through the unified channel module to unify the number of convolution channels for feature information of different scales; then the unified channel feature information is passed through the sampling module mentioned above to perform upsampling in sequence to obtain the corresponding upsampled feature information. Finally, the upsampled feature information is passed through the fusion module, and the feature information is superimposed and fused in sequence to obtain the fused feature.
5. The method for identifying the crown of garlic-shaped fruit trees according to claim 1, characterized in that, The instance segmentation module includes: Convolutional layer conv9, convolutional layer conv10, convolutional layer conv11; Each convolutional layer is followed by an LN layer and a ReLU layer in sequence; and after the ReLU layer corresponding to the convolutional layer conv11, a sigmoid activation function is also connected.
6. The method for identifying the crown of garlic-shaped fruit trees according to claim 1, characterized in that, The garlic clove tree crown recognition model is trained using the following loss function: ,in, The label represents the object being labeled, i.e., the canopy mask of the garlic-fruit tree, and P represents the predicted canopy of the garlic-fruit tree. The background of the labeled object is represented by ; m represents the measure function used to calculate the overlapping pixels; This is the loss function.
Citation Information
Patent Citations
Multi-sensor fused object recognition method based on image processing
CN110781720A
Method and device for identifying target object in cloud federation image
CN112733686A
