Tea tender bud target detection method

By improving the backbone and neck parts of the YOLOv11n model and combining it with the LSCD module, the problem of insufficient recognition accuracy in tea bud detection was solved, achieving more efficient and accurate tea bud target detection.

CN120932059APending Publication Date: 2025-11-11CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510930195.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Traditional methods lack sufficient accuracy in detecting tea buds, making it difficult to accurately identify tea buds in complex tea garden environments, and they also suffer from false positives and false negatives.

Method used

An improved YOLOv11n model is adopted. By replacing the SPPF module of the backbone network with the AIFI module, the Neck part of the RepGFPN architecture is constructed, and the LSCD module is used in the detection head to enhance feature extraction and object detection capabilities.

Benefits of technology

It significantly improves the accuracy and recall of tea bud detection, reduces background interference, and enhances the robustness and detection performance of the model in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120932059A_ABST
    Figure CN120932059A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a tea tender bud target detection method, which comprises the following steps: acquiring and preprocessing an image of a tea tender bud; an improved YOLOv11n model is constructed, an SPPF module of a backbone network is replaced with an AIFI module, self-attention operation is executed in an S5 layer of the advanced feature map, and interaction of features of the S5 layer, the S4 layer and the S3 layer is avoided; a RepGFPN framework is adopted by the check part; and the detection head adopts an LSCD module. According to the method, the problem that the recognition precision of the existing YOLO model on the tender buds of the tea leaves in the actual tea garden environment is insufficient is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for detecting tea buds. Background Technology

[0002] Traditional high-quality tea picking still relies on manual labor, which is inefficient and makes it difficult to guarantee picking accuracy. This is especially true in large-scale tea gardens where labor costs are high and efficiency is limited. Developing efficient and accurate tea bud detection technology is crucial to improving the modernization level and economic benefits of the tea industry. Tea picking robots can identify buds through visual modules, achieving precise picking, improving efficiency, and promoting economic benefits and farmers' income. The accuracy and speed of the robot's identification determine the subsequent tea picking effect.

[0003] Tea buds are typically only a few millimeters to 1-2 centimeters long, occupying a very small portion of an image and easily being drowned out by background noise. At the same time, tea buds have diverse shapes, which are affected by the variety and growth stage (such as single bud, one bud and one leaf, etc.), and there may be differences even within the same tea garden. In addition, the background of the tea garden includes soil, dead branches, weeds, etc., which are similar in color and texture to the buds, making it easy to cause false detection. Summary of the Invention

[0004] To address the shortcomings of existing methods, this invention solves the problem of insufficient accuracy in identifying tender tea buds in actual tea garden environments.

[0005] The technical solution adopted in this invention is: a method for detecting tea buds includes the following steps: Step 1: Acquire images of tender tea buds and perform preprocessing; In a preferred embodiment of the present invention, the preprocessing includes: translating, flipping, and adding Gaussian noise to the image.

[0006] Step 2: Construct an improved YOLOv11n model by replacing the SPPF module of the backbone network with the AIFI module and performing self-attention operations inside the high-level feature map S5 layer to avoid interaction between the features of the S5 layer and the S4 and S3 layers.

[0007] In a preferred embodiment of the present invention, the neck portion of the improved YOLOv11n model adopts the RepGFPN architecture.

[0008] As a preferred embodiment of the present invention, the RepGFPN architecture includes: The fifth C3K2 module is connected to the fourteenth Conv module and the twenty-first Concat module respectively; the seventh C3K2 module is connected to the eighteenth Conv module and the thirteenth Concat module respectively; the eleventh C2PSA module is connected to the nineteenth Conv module; the twelfth CSPSTage module is connected to the twentieth DySample module, the twenty-fourth Concat module, and the twenty-sixth Conv module respectively; the fourteenth Conv module is connected to the thirteenth Concat module; the fifteenth DySample module is connected to the thirteenth Concat module; the sixteenth CSPSTage module is connected to the fifteenth DySample module and the twenty-eighth Concat module respectively; the seventeenth Concat module is connected to the sixteenth CSPSTage module; the eighteenth Conv module is connected to the seventeenth Concat module; the nineteenth Con... The v module is connected to the seventeenth Concat module; the twentieth DySample module is connected to the twenty-first Concat module; the twenty-first Concat module is connected to the twenty-second CSPStage module; the twenty-second CSPStage module is connected to the twenty-third Conv module and the first detection head; the twenty-third Conv module is connected to the twenty-fourth Concat module; the twenty-fourth Concat module is connected to the twenty-fifth CSPStage module; the twenty-fifth CSPStage module is connected to the twenty-seventh Conv module and the second detection head; the twenty-sixth Conv module is connected to the twenty-eighth Concat module; the twenty-seventh Conv module is connected to the twenty-eighth Concat module; the twenty-eighth Concat module is connected to the twenty-ninth CSPStage module; the twenty-ninth CSPStage module is connected to the third detection head.

[0009] In a preferred embodiment of the present invention, the detection head of the improved YOLOv11n model adopts an LSCD module.

[0010] In a preferred embodiment of the present invention, the LSCD module includes: a GN_Conv 1×1, and then extracts features through two GN_Conv 3×3; subsequently, the 3×3 convolution output is divided into a localization branch and a classification branch.

[0011] As a preferred embodiment of the present invention, the improved YOLOv11n model is evaluated using precision, recall, and mean precision.

[0012] In a preferred embodiment of the present invention, a tea bud target detection system includes: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a tea bud target detection method.

[0013] In a preferred embodiment of the present invention, a computer-readable medium storing computer program code implements a method for detecting tea buds when executed by a processor.

[0014] The beneficial effects of this invention are: 1. The backbone network replaces the SPPF module with the AIFI module and performs self-attention operation only inside the S5 layer of the high-level feature map, avoiding interaction with low-level features, thereby reducing redundancy and confusion, enhancing the synergy between features, and improving the performance of tea bud target detection. 2. The RepGFPN structure was constructed to optimize the Neck layer. Learnable feature weights were used to dynamically adjust the contribution of different layers, focusing more on key areas such as bud tips and leaf margins and reducing background interference. In addition, RepGFPN adaptively adjusted the receptive field through a dynamic feature enhancement mechanism, strengthening shallow details and combining with deep semantics, which significantly improved the recall rate of young shoots. 3. The detection head uses the LSCD module and uses GroupNorm normalization based on the number of channels to avoid dependence on small batches, thereby improving the stability of local feature normalization and detection capability. Shared convolution is adopted to force different scales to share the same convolution kernel, enabling the model to focus on learning scale-independent general sprout features, thereby accelerating the bounding box regression process and improving localization accuracy and feature expression consistency. Attached Figure Description

[0015] Figure 1 This is a structural diagram of the improved Yolov11 n-AIGFCD model of the present invention; Figure 2 This is a diagram of the internal structure of the AIFI module; Figure 3 Dynamic upsampling and module design in DySample; Figure 4 Diagram of the LSCD detection head structure; Figure 5 This is a comparison chart of the thermal map results of the present invention and YOLOv11n; Figure 6 This is a comparison chart of the detection results of the present invention and existing models. Detailed Implementation

[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments. The drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0017] like Figure 1 As shown, a method for detecting tea buds includes the following steps: Step 1: Obtain images of tender tea buds and preprocess them; label the images to obtain a dataset of tender tea buds; Famous teas are generally produced in well-known tea-producing regions. These regions cultivate high-quality teas due to their special climate, soil, and unique processing techniques. Generally speaking, the more tender the buds of the tea, the higher its quality and grade. Green teas such as West Lake Longjing and Huangshan Maofeng mainly consist of tender buds with only one bud and one leaf or one bud and two leaves. In this embodiment, based on the on-site investigation of the tea garden, the tender buds of premium and first-grade tea leaves were selected as the research objects for identifying famous and high-quality teas. The collection location was Maoshan Tea Sea, and the collected objects were Maoshan white tea. The tea trees were all planted in single rows and were growing well.

[0018] The image acquisition device was a Xiaomi mobile phone, the image format was .jpg, and the data resolution was 2316 pixels × 3088 pixels. Data was collected in mid-March 2024, with shooting times from 08:00 to 11:00 and 14:00 to 17:00. When acquiring images of tea buds, to ensure the reliability of the experiment and the completeness of the dataset, the shooting angle was between 30° and 90° from the vertical upward direction, with the buds as the foreground and other information as the background. To ensure the diversity and universality of the dataset, multiple sets of images were taken, including different weather conditions and the number of targets in each image. Subsequently, LabelImg was used to label the images, and some similar images were deleted to prevent overfitting during training, resulting in the labeled tea bud dataset.

[0019] The dataset was expanded and divided into training, validation, and test sets according to a set ratio. Considering the extremely complex actual tea garden environment, such as the variable lighting conditions, the diverse angles of tea leaf growth, and the mutual shading between different parts of the tea tree, it is difficult to fully capture the characteristics of tender buds under various conditions during field collection. In order to improve the generalization ability and robustness of the model and avoid overfitting during training, a Python script was used to expand the labeled images by performing transformations such as translation, flipping, and adding Gaussian noise. The dataset was divided into training set, validation set, and test set in an 8:1:1 ratio.

[0020] Step 2: Construct an improved YOLOv11n model. The backbone part uses the AIFI module to replace the SPPF module; the neck part adopts the RepGFPN architecture. The SPPF module of the YOLOv11n model is relatively independent in scale feature extraction, but lacks a direct feature interaction mechanism. In order to fully explore high-level semantic information, the AIFI module is introduced, which performs self-attention operation only inside the S5 layer of the high-level feature map, avoiding interaction with low-level features, thereby reducing redundancy and confusion, enhancing the synergy between features, and improving the performance of tea bud target detection. Specifically, the AIFI module linearizes the S5 layer feature map into a long vector and employs a multi-head self-attention mechanism to effectively capture the association between conceptual entities in the image, extract pixel-level semantic features of the bud, expand the receptive field, and handle long-distance dependencies within the feature map. The AIFI module utilizes position embedding to supplement spatial information and combines multi-head self-attention to accurately extract the bud boundary and deep semantics. The multiple attention heads focus on different positions and features respectively, achieving diversified information fusion. Subsequently, after multi-layer perceptron and layer normalization to optimize the feature representation, the features are embedded into the Embedded Patches layer in the neural network and then transformed into a two-dimensional shape adapted to the high-level feature input.

[0021] The process includes: image slicing and flattening, combined with positional encoding, and linear projection transformation of the feature matrix to further enhance expressive power; the multi-head attention mechanism is expressed as follows:

[0022] in, Q and Perform the dot product operation and divide by The dot product attention used to compute the scaling is used; this design pattern makes the entire network more flexible and accurate in capturing complex features, especially in fine-grained tasks such as tea bud detection.

[0023] Tea buds are irregular in shape and small in size, and their color is similar to that of older leaves with low contrast. These factors pose a significant challenge to the accurate detection of buds. In order to make the model more effective in focusing on the feature information of buds and improve detection performance, targeted optimizations were made. To this end, this invention improves the Neck part and constructs a RepGFPN structure to optimize the Neck layer. RepGFPN employs a reparameterizable design, enabling the network to learn richer feature fusion strategies during training and maintain efficient computation during inference, achieving flexible integration of hierarchical features and improving bud detection capabilities. Simultaneously, RepGFPN dynamically adjusts the contributions of different layers using learnable feature weights, focusing more on key areas such as bud tips and leaf margins, reducing background interference. Furthermore, RepGFPN utilizes a dynamic feature enhancement mechanism to adaptively adjust the receptive field, strengthening shallow details and combining them with deep semantics, significantly improving bud recall. The RepGFPN structure employs a dynamic upsampling module (DySample); as shown... Figure 3 DySample is an ultra-lightweight and efficient dynamic upsampling tool that flexibly samples the input feature map by dynamically generating offsets, accurately capturing the subtle features of tea buds. This module optimizes offset calculation, making it both efficient and adaptable when processing different input features. By generating offsets based on the input feature map and sampling accordingly, DySample can quickly adapt to various weather conditions, significantly improving the accuracy and recall of bud detection.

[0024] like Figure 1 As shown, the backbone network includes: the first CBS module 1, the second CBS module 2, the third C3K2 module 3, the fourth CBS module 4, the fifth C3K2 module 5, the sixth CBS module 6, the seventh C3K2 module 7, the eighth CBS module 8, the ninth C3K2 module 9, the tenth AIFI model 10, and the eleventh C2PSA module 11, which are connected in sequence. The Neck network adopts the RepGFPN architecture, including: the fifth C3K2 module 5 connected to the fourteenth Conv module 14 and the twenty-first Concat module 21 respectively; the seventh C3K2 module 7 connected to the eighteenth Conv module 18 and the thirteenth Concat module 13 respectively; the eleventh C2PSA module 11 connected to the nineteenth Conv module 19; the twelfth CSPSTage module 12 connected to the twentieth DySample module 20, the twenty-fourth Concat module 24, and the twenty-sixth Conv module 26 respectively; the fourteenth Conv module 14 connected to the thirteenth Concat module 13; the fifteenth DySample module 15 connected to the thirteenth Concat module 13; the sixteenth CSPSTage module 16 connected to the fifteenth DySample module 15 and the twenty-eighth Concat module 28 respectively; the seventeenth Concat module 17 connected to the sixteenth CSPSTage module 16; and the eighteenth Conv module 18 connected to the seventeenth Concat module 20. Block 17 is connected; the nineteenth Conv module 19 is connected to the seventeenth Concat module 17; the twentieth DySample module 20 is connected to the twenty-first Concat module 21; the twenty-first Concat module 21 is connected to the twenty-second CSPStage module 22; the twenty-second CSPStage module 22 is connected to the twenty-third Conv module 23 and the first detection head; the twenty-third Conv module 23 is connected to the twenty-fourth Concat module 24; the twenty-fourth Concat module 24 is connected to the twenty-fifth CSPStage module 25; the twenty-fifth CSPStage module 25 is connected to the twenty-seventh Conv module 27 and the second detection head; the twenty-sixth Conv module 26 is connected to the twenty-eighth Concat module 28; the twenty-seventh Conv module 27 is connected to the twenty-eighth Concat module 28; the twenty-eighth Concat module 28 is connected to the twenty-ninth CSPStage module 29; the twenty-ninth CSPStage module 29 is connected to the third detection head.

[0025] It also includes replacing the three detectors in the Head network with a lightweight shared convolutional detector (LSCD). In the task of detecting small targets like tea buds, the model relies on high-resolution images to capture the detailed features of these small targets, thus requiring a typically small batch size. However, traditional batch normalization (BatchNorm) calculates the mean and variance based on the batch dimension. When the batch size is small, the calculation results may not accurately reflect the overall data distribution, leading to a decrease in model performance. Furthermore, tea buds exhibit certain similarities in features across different scales (e.g., P3 high resolution and P5 low resolution), such as the texture and color of the bud tip. This makes traditional independent convolutions prone to generating redundant features across multiple scales. To address these issues, such as... Figure 4 The system introduces the LSCD module, which uses GroupNorm instead of BatchNorm for normalization. GroupNorm's normalization is based on the number of channels C rather than the batch size N, avoiding dependence on small batches and improving the stability and detection capability of local feature normalization. At the same time, it adopts shared convolution instead of traditional independent convolution, forcing different scales to share the same convolution kernel, enabling the model to focus on learning scale-independent general sprout features, thereby accelerating the bounding box regression process and improving localization accuracy and feature representation consistency.

[0026] In the LSCD module structure, taking the P3 small target detection layer (the first detection head) as an example, multi-scale features are first extracted from this layer, and then the channels are adjusted by a 1×1 GroupNorm convolution (GN_Conv 1×1). Then, features are extracted by two 3×3 GroupNorm convolutions with shared parameters (GN_Conv 3×3). Subsequently, the output of the 3×3 convolution is divided into a localization branch (Conv_Box) and a classification branch (Conv_Cls), and both branches use a shared convolution method. The structures of P4 (second detection head) and P5 (third detection head) are the same as those of the first detection head; both are LSCD modules.

[0027] Given the varying sizes of tea buds, the localization branch introduces a Scale layer to scale features to different degrees to adapt to multi-scale target detection. The overall design effectively reduces the computational load and parameter size of the model while maximizing detection accuracy.

[0028] Experimental procedure: The training and validation sets of labeled tea bud images are fed into the model for training, and the converged model weights are obtained. During training, the network generates diverse samples through transformations such as random hue enhancement, saturation enhancement, brightness enhancement, cropping and rotation, image denoising, and Gaussian filtering. This increases the feature diversity of the data and improves the model's generalization ability.

[0029] The YOLOv11n model was selected for pre-training weights. PyTorch 2.0.0, Python 3.8, and CUDA 11.8 were used as development tools. The training parameters were set as follows: input size of 640×480, batch size of 8 samples, workers of 0, learning rate of 0.01, and weight decay of 0.0005. The model was trained for 100 rounds to obtain converged model weights.

[0030] To accurately evaluate model performance, we used precision (P), recall (R), mean average precision (mAP), number of model parameters, model size (MB), and inference speed (FPS). The proposed model is then evaluated.

[0031] The image of the tea buds to be detected is input into the trained improved YOLOv11n model to obtain the target detection result.

[0032] To ensure the reliability of the experiment and the completeness of the dataset, the shooting angle was between 30° and 90° with the vertical upward direction, with the tender buds as the foreground and the information outside the tender buds as the background. The captured images of tea buds were put into the trained model for detection to obtain the two-dimensional coordinates of the tea buds in the image. A series of calculations were then performed to obtain the specific actual coordinates of the tea buds for subsequent visual detection of tea bud picking.

[0033] Due to the small size, dense distribution, and frequent interference from complex backgrounds, traditional detection models face numerous challenges in practical applications for tea bud detection. To visually evaluate the model's performance in tea bud detection, heatmap analysis provides an intuitive method that reveals the model's focus on the target area. The prediction results are visualized using the GradCAM algorithm. This invention further analyzes the performance differences between the baseline Yolov11 n and the improved Yolov11 n-AIGFCD model in tea bud detection by comparing their heatmaps. The results are as follows: Figure 5 As shown in Figure a, YOLO11n exhibits some target localization ability in tea bud detection, but its heatmap shows that the model pays little attention to key areas of the buds (such as the tips and edges); especially when the buds overlap or the background is complex, the heatmap distribution is relatively scattered, and there is obvious missed detection, indicating that the model has difficulty accurately distinguishing between the target and the background; Figure 5b indicates that the improved Yolov11 n-AIGFCD model of this invention shows significant advantages in heat maps; its heat map is more concentrated in the key areas of tea buds, especially in the tips and edges of the buds, and the heat map response intensity is significantly higher than that of Yolov11 n. The improved model has a more concentrated heat map distribution in complex backgrounds, indicating that it can better suppress background interference and better focus on the detection of buds in the edge areas.

[0034] Figure 6 This paper showcases the detection and recognition performance of YOLOv5s, YOLOv6s, YOLOv8n, YOLOv10n, YOLOv11n, and the improved YOLOv11n-AIGFCD model on tea bud images under four scenarios: sunny conditions, rainy conditions, and multiple-object and few-object scenarios. The figures show that YOLOv5s, YOLOv6s, and YOLOv10n perform poorly in detecting tea buds, exhibiting numerous false negatives. YOLOv8n performs well, but due to the small size and dense distribution of tea buds, some images show a single bud being detected as multiple bounding boxes, and it also suffers from significant false negatives under rainy conditions. YOLOv11n shares the same problem as YOLOv8n, with single buds being detected as multiple bounding boxes. Furthermore, it reveals that the detection range of YOLOv11n deviates from the actual location. In summary, the Yolov11 n-AIGFCD model proposed in this invention exhibits stronger robustness and adaptability in complex scenarios, especially in handling challenges such as target overlap, illumination changes, and small target detection, significantly reducing false negatives and false positives; it also demonstrates excellent detection performance, enabling it to more efficiently and accurately meet the requirements for rapid detection of tea buds in real tea garden environments.

[0035] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for detecting tea buds, characterized in that, Includes the following steps: Step 1: Acquire images of tender tea buds and perform preprocessing; Step 2: Construct an improved YOLOv11n model by replacing the SPPF module of the backbone network with the AIFI module and performing self-attention operations inside the high-level feature map S5 layer to avoid interaction between the features of the S5 layer and the S4 and S3 layers.

2. The method for detecting tea buds according to claim 1, characterized in that, The neck part of the improved YOLOv11n model adopts the RepGFPN architecture.

3. The method for detecting tea buds according to claim 2, characterized in that, The RepGFPN architecture includes: The fifth C3K2 module is connected to the fourteenth Conv module and the twenty-first Concat module respectively; the seventh C3K2 module is connected to the eighteenth Conv module and the thirteenth Concat module respectively; the eleventh C2PSA module is connected to the nineteenth Conv module; the twelfth CSPSTage module is connected to the twentieth DySample module, the twenty-fourth Concat module, and the twenty-sixth Conv module respectively; the fourteenth Conv module is connected to the thirteenth Concat module; the fifteenth DySample module is connected to the thirteenth Concat module; the sixteenth CSPSTage module is connected to the fifteenth DySample module and the twenty-eighth Concat module respectively; the seventeenth Concat module is connected to the sixteenth CSPSTage module; the eighteenth Conv module is connected to the seventeenth Concat module; the nineteenth Con... The v module is connected to the seventeenth Concat module; the twentieth DySample module is connected to the twenty-first Concat module; the twenty-first Concat module is connected to the twenty-second CSPStage module; the twenty-second CSPStage module is connected to the twenty-third Conv module and the first detection head; the twenty-third Conv module is connected to the twenty-fourth Concat module; the twenty-fourth Concat module is connected to the twenty-fifth CSPStage module; the twenty-fifth CSPStage module is connected to the twenty-seventh Conv module and the second detection head; the twenty-sixth Conv module is connected to the twenty-eighth Concat module; the twenty-seventh Conv module is connected to the twenty-eighth Concat module; the twenty-eighth Concat module is connected to the twenty-ninth CSPStage module; the twenty-ninth CSPStage module is connected to the third detection head.

4. The method for detecting tea buds according to claim 1, characterized in that, Preprocessing includes: Translate, flip, and add Gaussian noise to the image.

5. The method for detecting tea buds according to claim 1, characterized in that, The detection head of the improved YOLOv11n model uses the LSCD module.

6. The method for detecting tea buds according to claim 5, characterized in that, The LSCD module consists of: a GN_Conv 1×1, followed by two GN_Conv 3×3 to extract features; then the 3×3 convolution output is divided into localization and classification branches.

7. The method for detecting tea buds according to claim 1, characterized in that, The improved YOLOv11n model is evaluated using precision, recall, and mean precision.

8. A tea bud target detection system, characterized in that, include: Memory is used to store instructions that can be executed by the processor; A processor for executing instructions to implement the tea bud target detection method as described in any one of claims 1-7.

9. A computer-readable medium storing computer program code, characterized in that, The computer program code, when executed by a processor, implements the tea bud target detection method as described in any one of claims 1-7.