Method, device and equipment for identifying tender shoots of tea leaves and medium

Through the improved RT-DETR model, combined with ResNet18 and the cascade group attention mechanism layer, the problem of low detection efficiency and accuracy in tea bud recognition is solved, and more efficient and accurate tea bud recognition is achieved.

CN119091424APending Publication Date: 2024-12-06TEA RES INST GUANGDONG ACAD OF AGRI SCI
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411150254.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing tea bud identification methods have low detection efficiency and detection accuracy, and there are problems of missed and missed detection in complex contexts.

Method used

The improved RT-DETR model is adopted, and the backbone network is replaced with ResNet18, the AIFI module is replaced with CGFA module, the CCFM module is replaced with GD feature fusion module, the RepC3 module is replaced with DRBC3 module, and the multi-head attention mechanism layer is changed to cascading group attention The force mechanism layer improves the efficiency and accuracy of tea bud recognition.

Benefits of technology

It improves the efficiency and accuracy of tea bud recognition, solves the problem of low detection efficiency and accuracy in existing methods, and enhances the detection accuracy and robustness in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091424A_ABST
    Figure CN119091424A_ABST
Patent Text Reader

Abstract

The invention discloses a tea tender shoot recognition method and device, equipment and a medium, and relates to the technical field of image recognition, and the method comprises the steps: obtaining a target image; the target image is an image obtained by shooting a target tea picking area; inputting the target image into a trained tea tree tender shoot recognition model to obtain a tea tree tender shoot recognition result corresponding to the target image; wherein the trained tea tree tender shoot recognition model is an improved RT-DETR model; according to the improved RT-DETR model, a backbone network is a ResNet18 network, an AIFI module is replaced by a CGFA module, a CCFM module is replaced by a GD feature fusion module, a RepC3 module is replaced by a DRBC3 module, and the CGFA module replaces a multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer. The tea tender shoot recognition efficiency and precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, equipment and medium for identifying young tea buds. Background Art

[0002] Tea is one of the most popular beverages in the world, and it is also loved by people for its unique flavor and high nutritional value. In 2020, the world's tea production was 62,690 tons, and China's tea production was 29,860 tons. In recent years, the increase in tea production and the increasingly serious aging of the population have led to a gradual decrease in the number of tea farmers who pick tea manually. The manual tea picking method has the disadvantages of high cost, low efficiency, and important subjective factors, which is a considerable challenge for the picking of high-quality tea leaves. Therefore, tea picking equipment is used instead of manual tea picking. Although the efficiency of current tea picking equipment has been greatly improved, it uses a one-size-fits-all approach to picking tea leaves, which can cause damage or breakage of tea leaves. Therefore, accurate identification of tea buds is a prerequisite for the realization of automated and intelligent picking of high-quality tea buds.

[0003] Currently, deep learning algorithms are often used for tea target detection and recognition, including the CNN-based single-stage YOLO series models and two-stage SSD and other improved models. However, their detection efficiency and accuracy are low. Tea bud detection research has problems such as variety homogeneity and missed detection and false detection in complex backgrounds. Summary of the invention

[0004] The purpose of this application is to provide a method, device, equipment and medium for identifying young tea buds, which can improve the efficiency and accuracy of identifying young tea buds.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for identifying young tea buds, comprising:

[0007] Acquire a target image; the target image is an image obtained by photographing the target tea picking area;

[0008] The target image is input into a trained tea bud recognition model to obtain a tea bud recognition result corresponding to the target image; wherein the trained tea bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as its backbone network, the AIFI module in the RT-DETR model is replaced by a CGFA module, the CCFM module in the RT-DETR model is replaced by a GD feature fusion module, and the RepC3 module in the RT-DETR model is replaced by a DRBC3 module; the CGFA module replaces the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer.

[0009] In a second aspect, the present application provides a tea bud identification device, comprising:

[0010] An image acquisition module is used to: acquire a target image; the target image is an image obtained by photographing the target tea picking area;

[0011] The recognition module is used to: input the target image into a trained tea tree bud recognition model to obtain a tea tree bud recognition result corresponding to the target image; wherein the trained tea tree bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as its backbone network, replaces the AIFI module in the RT-DETR model with a CGFA module, replaces the CCFM module in the RT-DETR model with a GD feature fusion module, and replaces the RepC3 module in the RT-DETR model with a DRBC3 module; the CGFA module replaces the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer.

[0012] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned tea bud identification method.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned tea bud identification method when executed by a processor.

[0014] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0015] The present application provides a method, device, equipment and medium for identifying young tea buds. By replacing the backbone network in the RT-DETR model with a ResNet18 network, replacing the AIFI module in the RT-DETR model with a CGFA module, replacing the CCFM module in the RT-DETR model with a GD feature fusion module, replacing the RepC3 module in the RT-DETR model with a DRBC3 module, and replacing the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer in the CGFA module, an improved RT-DETR model is obtained. The improved RT-DETR model is used as a trained tea bud identification model to identify young tea buds in a target image, thereby improving the efficiency and accuracy of tea bud identification, and solving the problems of low detection efficiency and detection accuracy of existing tea bud identification methods, variety uniformity in tea bud detection research, and missed detection and false detection in complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is an application environment diagram of a method for identifying young tea buds in one embodiment of the present application;

[0018] Figure 2 A schematic diagram of a process for identifying young tea buds provided in one embodiment of the present application;

[0019] Figure 3 A schematic diagram of the structure of an improved RT-DETR model provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of the AIFI module structure provided in one embodiment of the present application;

[0021] Figure 5 A schematic diagram of the CGFA module structure provided in one embodiment of the present application;

[0022] Figure 6 A schematic diagram of the cascade group attention mechanism layer structure provided for an embodiment of the present application;

[0023] Figure 7 A schematic diagram of the Low-GD module structure provided in one embodiment of the present application;

[0024] Figure 8 A schematic diagram of the High-GD module structure provided in one embodiment of the present application;

[0025] Fig. 9 A schematic diagram of the structure of an Inject unit provided in an embodiment of the present application;

[0026] Fig.10 A schematic diagram of the DRBC3 module structure provided in an embodiment of the present application;

[0027] Fig.11 A schematic diagram showing a comparison of the recognition results of Yingjiu tea buds by the improved RT-DETR model provided in one embodiment of the present application and the existing RT-DETR model; Fig.11 (a) is the original image of Yingjiu tea sample; Fig.11 (b) is the recognition result of Yingjiu tea buds by the existing RT-DETR model; Fig.11 (c) is the recognition result of Yingjiu tea buds by the improved RT-DETR model;

[0028] Fig.12 A schematic diagram showing a comparison of the recognition results of Jinxuan tea buds by the improved RT-DETR model provided in one embodiment of the present application and the existing RT-DETR model; Fig.12 (a) is the original image of Jinxuan tea sample; Fig.12 (b) is the recognition result of Jinxuan tea buds by the existing RT-DETR model; Fig.12 (c) is the Jinxuan tea bud recognition result of the improved RT-DETR model;

[0029] Fig.13 A schematic diagram showing a comparison of the recognition results of the improved RT-DETR model provided in one embodiment of the present application and the existing RT-DETR model for the young buds of imperial jade tea leaves; Fig.13 (a) is the original image of the Huangyu tea sample; Fig.13 (b) is the recognition result of Huangyu tea buds by the existing RT-DETR model; Fig.13 (c) is the recognition result of Huangyu tea buds by the improved RT-DETR model;

[0030] Fig.14 A schematic diagram showing a comparison of the results of identifying young buds of red rock tea leaves using the improved RT-DETR model provided in one embodiment of the present application and the existing RT-DETR model; Fig.14 (a) is the original image of the red rock tea sample; Fig.14 (b) is the recognition result of young buds of red rock tea by the existing RT-DETR model; Fig.14 (c) is the recognition result of young buds of red rock tea using the improved RT-DETR model;

[0031] Fig.15 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0034] The tea bud identification method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, or it can be integrated on the server 104, or it can be placed on the cloud or other servers. The terminal 102 can send the target image to the server 104. After the server 104 receives the target image, for the target image, the server 104 inputs the target image into the trained tea tree bud recognition model to obtain the tea tree bud recognition result corresponding to the target image, wherein the trained tea tree bud recognition model is an improved RT-DETR model (RT-DETR-Tea). The server 104 can feed back the obtained tea tree bud recognition result for the target image to the terminal 102. In addition, in some embodiments, the tea bud recognition method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly perform tea bud recognition on the target image, or the server 104 can obtain the target image from the data storage system and perform tea bud recognition on the target image.

[0035] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, and tablet computers. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0036] In an exemplary embodiment, Figure 2 As shown, a method for identifying young tea buds is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 202. Among them:

[0037] Step 201: Acquire a target image; the target image is an image obtained by photographing the target tea picking area. The target image is obtained by photographing the target tea picking area using an image acquisition device.

[0038] Step 202: Input the target image into the trained tea bud recognition model to obtain the tea bud recognition result corresponding to the target image; wherein the trained tea bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as the backbone network, replaces the AIFI module in the RT-DETR model with a CGFA module, replaces the CCFM module in the RT-DETR model with a GD feature fusion module, and replaces the RepC3 module in the RT-DETR model with a DRBC3 module; the CGFA module replaces the Multi-Head Self-Attention (MHSA) layer in the AIFI module with a Cascaded Group Attention (Cascaded Group Attention) layer.

[0039] By implementing the above steps 201 to 202, the following effects can be achieved: 1) ResNet18 is used to replace BackBone in the original RT-DETR model, achieving a relatively small number of parameters and computational complexity, which can be regarded as a good balance between performance and efficiency; 2) The MHSA self-attention in the AIFI module of the original RT-DETR model is improved to CascadedGroupAttention and named CGFA. CGFA effectively optimizes deep features and enriches the semantic information of the model, which can help us locate the position of the buds more accurately; 3) The GD feature fusion module (GD-Tea module) proposed in this application is used to replace the CCFM feature fusion mechanism in the original RT-DETR model, which can effectively fuse low-level and high-level semantic information to ensure that the model can effectively focus on the size of tea tree buds in complex environments; 4) The DRBC3 module is proposed, which has the advantages of reducing the amount of calculation parameters and improving calculation efficiency, but the detection of tea tree buds needs to pay more attention to the deep feature information in the image and increase the receptive field, so as to efficiently fuse the feature information of tea tree buds in complex field environments and ensure the accuracy of the detection head when detecting targets.

[0040] This application improves the inference speed of the model and reduces the number of model parameters while ensuring the accuracy of RT-DETR in tea tree bud detection.

[0041] In another exemplary embodiment of the present application, Figure 3 As shown, the improved RT-DETR model includes ResNet18 network, CGFA module, GD feature fusion module and DRBC3 module.

[0042] The ResNet18 network is used to extract features of the target image to obtain a first feature B2, a second feature B3, a third feature B4, and a fourth feature B5.

[0043] The backbone network is a core component in the algorithm model, and its design and selection have a direct impact on the final performance of the model. This application selected ResNet18, ResNet34, ResNet50 and the backbone network HGNetV2 structure of the original RT-DETR model for comparison, and evaluated the number of model parameters, computational complexity and accuracy in detection tasks. The detailed comparison of structural parameters and training results is shown in Table 1.

[0044] Table 1 Comparison of different Backbone results

[0045]

[0046] It can be concluded from Table 1 that the ResNet18 network is a lightweight network in the ResNet series, with a more streamlined structure and lower complexity than other networks. From the comparison results, it can be seen that the number of parameters in the ResNet18 network is only 19.8M, which is significantly less than other networks. Fewer parameters means a simpler structure, which correspondingly reduces the demand for computing resources and storage space, and also helps to reduce the risk of overfitting. In terms of floating point operations (FLOPs), the ResNet18 network only requires 57G, which is the lowest among the networks in the table. Lower floating point operations mean less computing overhead, which will effectively reduce the reliance on large computing devices. Although the mean average precision (MAP) of ResNet18 is 77.3%, slightly lower than that of HGNetV2's 77.8%, considering its relatively small number of parameters and computational complexity, it can be regarded as a good balance between performance and efficiency. The structure of the ResNet18 network is shown in Table 2.

[0047] Table 2 ResNet18 network structure

[0048]

[0049] To solve this problem, this application introduces the Cascaded Group Attention mechanism in EfficientViT to improve the MHSA self-attention part in the AIFI module. The AIFI module structure is as follows: Figure 4 As shown in the figure. The cascade group attention mechanism allows each attention head to capture local information while also obtaining all the information of the previous head through slicing and cascading operations. This not only improves the information capacity, but also restores the diversity of features, strengthens the features and reduces computational redundancy. The improved module is named CGFA, and its specific structure is as follows: Figure 5As shown, the cascade group attention mechanism layer structure is as follows Figure 6 shown.

[0050] The CGFA module is used to extract the fourth feature to obtain the enhanced feature P5. Figure 3 The deepest B5 feature (the fourth feature) is input into the CGFA module to enrich the semantic features. The CGFA module includes a cascaded group attention mechanism layer, a residual connection & normalization (Add&Norm) layer, a FNN and an Add&Norm layer connected in sequence.

[0051] Different from the standard multi-head self-attention, the cascade group attention mechanism layer uses a partitioning operation to divide the attention head (Head) into multiple sub-heads (Head 1, Head 2...Headh) before calculating Q, K, V. Although not all input features are directly accepted, the attention heads are cascaded, and the next sub-head can receive the output result of the previous sub-head. Each attention head and the slicing operation are shown in equations (1) and (2), and the cascade operation is shown in equation (3):

[0052]

[0053]

[0054]

[0055] in, is the output feature of the i-th input feature after being processed by the j-th (1<j≤h) attention head, Attention operation, X ij is the jth slice of the input feature, The query features, value features, and related features obtained from different layers of the input feature map are: To represent the result of concatenating and projecting all features processed by the attention heads, Concat is the concatenation operation, h is the total number of attention heads, is the projection of the concatenated output features, X' ij The input slice of the current head and the output of the previous head sum.

[0056] The GD feature fusion module includes a Low-GD module, a High-GD module and an Inject module; the DRBC3 module includes a first DRBC3 unit, a second DRBC3 unit, a third DRBC3 unit and a fourth DRBC3 unit.

[0057] Among them, the Low-GD module is used to introduce high-resolution features and strengthen the retention of small target information. The Low-GD module is used to fuse and split the first feature, the second feature, the third feature and the fourth feature to obtain the first split feature and the second split feature.

[0058] The specific structure of the Low-GD module is as follows Figure 7 As shown, the Low-GD module includes a Low-FAM unit and a Low-IFM unit. The Low-FAM unit aligns the dimension of the feature information of the tea tree bud image extracted by the ResNet18 network to achieve splicing and merging to obtain a new feature X1. The Low-FAM unit includes a Bilinear layer, two average pooling layers (avgpool) and a splicing unit (Concat). The Bilinear layer performs dimension conversion on the fourth feature. The two average pooling layers perform dimension conversion on the first feature and the second feature respectively, so that the feature information dimensions of the first feature, the second feature, the third feature and the fourth feature are aligned, and then the third feature and the first feature after dimension conversion, the second feature after dimension conversion and the fourth feature after dimension conversion are spliced ​​and merged through the splicing unit to obtain the first splicing feature X1.

[0059] The Low-IFM unit includes a Conv layer, a RepBlock layer, a Conv layer, and a Split operation layer connected in sequence. The first splicing feature X1 passes through the Conv layer, the RepBlock layer, the Conv layer, and the Split operation layer respectively. The first splicing feature X1 is obtained after inputting into RepBlock. f The fused features are finally split using the Split operation layer to obtain the first split feature and the second split feature. The first split feature and the second split feature are respectively fused with the second feature B3 and the third feature B4 through the Inject unit.

[0060] After the Low-GD module realizes the fusion and extraction of large-size feature maps, the High-GD module ensures the fusion and extraction of small-size feature maps, ensures the integrity of global information, and realizes the complete preservation of the semantic information of tea tree bud images. The specific structure of the High-GD module is as follows: Figure 8 As shown, the High-GD module includes the High-FAM unit and the High-IFM unit. The specific process of feature fusion is shown in the following formula:

[0061] X2=High-FAM([P3,P4,P5]) (4);

[0062] X fuse = Transformer(X2) (5);

[0063] X inj_1 ,Xinj_2 =Split(Conv*1(X fuse )) (6);

[0064] Among them, the High-FAM unit includes two average pooling layers and a splicing unit. The two average pooling layers perform average pooling on the second feature P3 and the third feature P4 respectively. The fourth feature is spliced ​​with the second feature P3 and the third feature P4 after average pooling through the splicing unit to obtain the second splicing feature X2. X2 is the feature after P3, P4, and P5 are aligned and merged. First, it is processed by Transformer (Multi-Head attention) to obtain a new fusion feature X fuse , the new fusion feature X fuse The first added feature is added to the second concatenated feature X2 to obtain the first added feature. After adjusting the feature dimension by convolution, the first added feature is extracted by FFN to obtain the FFN feature. The first added feature and the FFN feature are added to obtain the second added feature. The second added feature is divided into the third split feature X by the Split operation layer. inj_1 and the fourth split feature X inj_2 Finally, the features after addition are split through the Split operation layer to obtain the third split feature and the fourth split feature, which are respectively input into the third Inject unit and the fourth Inject unit to realize feature fusion.

[0065] The Inject module includes a first Inject unit, a second Inject unit, a third Inject unit and a fourth Inject unit; the first Inject unit is used to: perform feature fusion on the second feature and the first split feature to obtain a first fused feature; the second Inject unit is used to: perform feature fusion on the third feature and the second split feature to obtain a second fused feature. The structure of the Inject unit is as follows Fig. 9 shown.

[0066] The first DRBC3 unit is used to perform feature extraction on the first fused feature to obtain a first sparse feature P3; the second DRBC3 unit is used to perform feature extraction on the second fused feature to obtain a second sparse feature P4.

[0067] The High-GD module is used to: perform feature fusion and splitting on the first sparse feature, the second sparse feature and the enhanced feature to obtain a third split feature and a fourth split feature.

[0068] The third Inject unit is used to perform feature fusion on the third split feature and the second sparse feature to obtain a third fused feature; the fourth Inject unit is used to perform feature fusion on the fourth split feature and the enhanced feature to obtain a fourth fused feature.

[0069] The third DRBC3 unit is used to perform feature extraction on the third fused feature to obtain a third sparse feature N4; the fourth DRBC3 unit is used to perform feature extraction on the fourth fused feature to obtain a fourth sparse feature N5.

[0070] The Inject unit can be seen as a feature concatenation function, which concatenates and fuses local features with processed features (Contact). It is not a simple concatenation, but an average pooling of features before concatenation. It is similar to an autonomous mechanism to distribute global features of different sizes to features of different levels, which enhances the ease of feature extraction and semantic information of small objects in the image, and can promote the accurate detection of small objects in the target image in this application. Fig. 9 As shown in Figure 1, the Inject unit includes three Conv1×1 convolutional layers, a Sigmoid activation function layer, two average pooling layers, and two biliner layers. Local information and global information are input simultaneously, and the Conv1×1 convolutional layer is used to calculate, respectively, X _global Get X respectively global_embed and X act Then, average pooling or bilinear interpolation is used to align the feature sizes, and finally attention fusion is performed on all features and output. The specific process is as follows:

[0071] X global_act_i = resize(Sigmoid(Conv act (X inj_i ))) (7);

[0072] X global_embed_i = resize(Conv global_embed_i (X inj_i )) (8);

[0073]

[0074] In the formula, X global_act_i and X global_embed_i It is the feature variable after the GD feature fusion module uses convolution layer and average pooling or bilinear interpolation to complete the feature size alignment, X att_fuse_i It is the feature information of the final Inject unit fusion output.

[0075] The DRBC3 module further enhances the hierarchically fused features to enhance deeper feature information in the image. In the RT-DETR model, RepC3 is added before the detection head, which mainly uses RepBlock convolution to further enhance the fusion of features after the output of the Inject module. Although it has the advantages of reducing the number of calculation parameters and improving calculation efficiency, the detection of tea buds requires more attention to the deep feature information in the image and increasing the receptive field, so as to efficiently fuse the feature information of tea buds in complex field environments and ensure the accuracy of the detection head when detecting targets.

[0076] Therefore, this application adopts the submodule of DilatedReparamBlock in UniRepLKNet, that is, the DRBC3 module to replace the RepC3 module in the original RT-DETR model. This module can be used to parallelize a large 5*5 convolution kernel with two small 3*3 dilated convolutions, which can be equivalent to a large convolution kernel through the idea of ​​reparameterization. In this way, sparse features in the image can be more effectively captured in feature fusion, thereby improving the model's ability to cope with complex scenes. The specific structure of DilatedReparamBlock is as follows Fig.10 shown.

[0077] The tea bud identification method further includes: determining a tea tree bud identification result corresponding to the target image according to a first sparse feature P3 (also N3), a third sparse feature N4 and a fourth sparse feature N5.

[0078] In order to verify the generalization and detection effect of the improved RT-DETR model proposed in this application, this application constructs a tea tree bud dataset independent of this application. The tea tree bud dataset has the characteristics of multiple varieties of tea trees, close-range original images of tea tree bud samples, dense and complex environment, etc., which can effectively test the performance of the model. This application selects original images of tea tree bud samples of four varieties of Yingjiu, Jinxuan, Huangyu and Hongyan to verify the performance of the model. The final recognition result comparison chart is as follows Fig.11 , Fig.12 , Fig.13 and Fig.14 shown.

[0079] Aiming at the disadvantage of computational redundancy in the MHSA attention mechanism in the AIFI module in the original RT-DETR model, the Cascaded GroupAttention layer is used to split the features for input, and then the attention of each head is calculated in a cascaded manner, and then the output of the head is added to the head of the subsequent feature, and the feature optimization is gradually realized. The improved module is named the CGFA module. Secondly, in order to reduce the number of model parameters, this application uses the RestNet18 network instead of the original HGNetV2 as the backbone network, and realizes the extraction of higher-dimensional features. In order to solve the problem of accurate detection of small target buds of tea tree buds when they are far away from the lens, and prevent the loss of small targets. The feature fusion CCFM module of the original RT-DETR model has the disadvantage of semantic information loss when processing low-level features. This application constructs the GD-Tea mechanism to replace the original CCFM module to achieve the perfect fusion of high-level and low-level features and feature semantic information, improve the model's ability to detect small targets, and complete the acquisition of semantic information. It can also ensure that the model can have better detection effects when facing various complex environments. At the same time, this application replaces the RepC3 module in the original model with the DRBC3 module which can increase the receptive field and improve the ability to understand the features.

[0080] The present application also provides an application scenario, which applies the above-mentioned tea bud identification method. Specifically: the tea bud identification method provided in this embodiment can be applied in the tea picking scenario. Tea picking includes a target image acquisition link, a tea bud identification link and a tea picking link; the target image enters the tea bud identification link from the target image acquisition link, is identified by a trained tea bud identification model, and obtains the corresponding tea bud identification result, and enters the downstream tea picking link. The tea bud identification method provided in this embodiment belongs to the tea bud identification link. Specifically, in the tea bud identification link process for the target image, the target image can be input into the trained tea bud identification model to obtain the tea bud identification result corresponding to the target image, wherein the trained tea bud identification model is an improved RT-DETR model.

[0081] Based on the same inventive concept, the embodiment of the present application also provides a tea bud identification device for implementing the tea bud identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more tea bud identification device embodiments provided below can refer to the limitations of the tea bud identification method above, and will not be repeated here.

[0082] In an exemplary embodiment, a tea bud identification device is provided, comprising the following modules:

[0083] An image acquisition module is used to: acquire a target image; the target image is an image obtained by photographing the target tea picking area;

[0084] The recognition module is used to: input the target image into a trained tea tree bud recognition model to obtain a tea tree bud recognition result corresponding to the target image; wherein the trained tea tree bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as its backbone network, replaces the AIFI module in the RT-DETR model with a CGFA module, replaces the CCFM module in the RT-DETR model with a GD feature fusion module, and replaces the RepC3 module in the RT-DETR model with a DRBC3 module; the CGFA module replaces the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer.

[0085] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.15 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store tea bud identification data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying tea buds is implemented.

[0086] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0087] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0088] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0089] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0090] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0091] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0092] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for identifying young tea buds, characterized in that: The tea bud identification method comprises: Acquire a target image; the target image is an image obtained by photographing the target tea picking area; The target image is input into a trained tea bud recognition model to obtain a tea bud recognition result corresponding to the target image; wherein the trained tea bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as its backbone network, the AIFI module in the RT-DETR model is replaced by a CGFA module, the CCFM module in the RT-DETR model is replaced by a GD feature fusion module, and the RepC3 module in the RT-DETR model is replaced by a DRBC3 module; the CGFA module replaces the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer.

2. The method for identifying young tea buds according to claim 1, characterized in that: The ResNet18 network is used to extract features of the target image to obtain a first feature, a second feature, a third feature and a fourth feature.

3. The method for identifying young tea buds according to claim 2, characterized in that: The CGFA module is used to extract the fourth feature to obtain an enhanced feature.

4. The method for identifying young tea buds according to claim 3, characterized in that: The GD feature fusion module includes a Low-GD module, a High-GD module and an Inject module; the DRBC3 module includes a first DRBC3 unit, a second DRBC3 unit, a third DRBC3 unit and a fourth DRBC3 unit; The Low-GD module is used to perform feature fusion and splitting on the first feature, the second feature, the third feature and the fourth feature to obtain a first split feature and a second split feature; The Inject module includes a first Inject unit, a second Inject unit, a third Inject unit and a fourth Inject unit; the first Inject unit is used to: perform feature fusion on the second feature and the first split feature to obtain a first fused feature; the second Inject unit is used to: perform feature fusion on the third feature and the second split feature to obtain a second fused feature; The first DRBC3 unit is used to perform feature extraction on the first fused feature to obtain a first sparse feature; the second DRBC3 unit is used to perform feature extraction on the second fused feature to obtain a second sparse feature; The High-GD module is used to: perform feature fusion and splitting on the first sparse feature, the second sparse feature and the enhanced feature to obtain a third split feature and a fourth split feature; The third Inject unit is used to perform feature fusion on the third split feature and the second sparse feature to obtain a third fused feature; the fourth Inject unit is used to perform feature fusion on the fourth split feature and the enhanced feature to obtain a fourth fused feature; The third DRBC3 unit is used to perform feature extraction on the third fused feature to obtain a third sparse feature; the fourth DRBC3 unit is used to perform feature extraction on the fourth fused feature to obtain a fourth sparse feature.

5. The method for identifying young tea buds according to claim 4, characterized in that: The tea bud identification method further includes: determining a tea tree bud identification result corresponding to the target image according to the first sparse feature, the third sparse feature and the fourth sparse feature.

6. A tea bud identification device, characterized in that: The tea bud identification device comprises: An image acquisition module is used to: acquire a target image; the target image is an image obtained by photographing the target tea picking area; The recognition module is used to: input the target image into a trained tea tree bud recognition model to obtain a tea tree bud recognition result corresponding to the target image; wherein the trained tea tree bud recognition model is an improved RT-DETR model; the improved RT-DETR model has a ResNet18 network as its backbone network, replaces the AIFI module in the RT-DETR model with a CGFA module, replaces the CCFM module in the RT-DETR model with a GD feature fusion module, and replaces the RepC3 module in the RT-DETR model with a DRBC3 module; the CGFA module replaces the multi-head attention mechanism layer in the AIFI module with a cascade group attention mechanism layer.

7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the tea bud identification method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying young tea buds according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Edible mushroom bud detection and collection system, method, medium and device

    CN119540731A

  • Edible mushroom bud detection collection system, method, medium and device

    CN119540731B

  • Digitized in-situ yield estimation method and model for Yinghong No.9 tea garden

    CN121147759A