Tea bud detection method based on improved YOLOv8 model
By improving the YOLOv8 model and combining lightweight feature reduction, multi-scale feature fusion, and dynamic attention mechanism, the problems of loss of minute features, insufficient multi-scale fusion, and occlusion interference in tea bud detection are solved, achieving high-precision and lightweight tea bud detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for detecting tea buds suffer from problems such as easy loss of subtle features, insufficient multi-scale semantic fusion, and poor resistance to occlusion interference in complex natural environments, resulting in insufficient detection accuracy and robustness.
An improved YOLOv8 model is adopted, which enhances the model’s noise resistance, multi-scale fusion capability and occlusion robustness by introducing a lightweight feature dimensionality reduction module (AMConv), a cross-stage multi-scale feature fusion module (SPPFCSPC) and a dynamic attention mechanism with large selective convolution kernels (LSKblock).
It significantly improves the accuracy and robustness of tea bud detection, achieves lightweight and real-time performance, and is suitable for efficient identification by agricultural intelligent harvesting equipment in complex environments.
Smart Images

Figure CN122156906A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and smart agriculture technology, and relates to a method for detecting tea buds based on an improved YOLOv8 model. Background Technology
[0002] In recent years, with the rapid development of smart agriculture and edge computing technologies, the automation and intelligentization of crop harvesting have become key research directions. Tea, as a cash crop with extremely high economic value, has its final quality directly determined by the quality of its harvest. Traditional tea harvesting relies heavily on manual labor, which is not only inefficient and labor-intensive but also faces problems such as labor shortages and high costs. Therefore, utilizing computer vision technology combined with intelligent harvesting robots to achieve automated identification and positioning of tea buds in natural field environments has become a key technology urgently needing breakthroughs in the field of agricultural engineering.
[0003] In current visual inspection of tea buds, mainstream technologies have gradually transitioned from traditional machine vision methods based on color and texture features (such as SVM and color thresholding) to deep learning-based object detection algorithms. Among these, single-stage convolutional neural networks, represented by the YOLO series, are widely used in crop detection due to their fast inference speed and high detection accuracy. Existing deep learning models typically employ standard 3×3 convolutions combined with max pooling for feature downsampling, use standard spatial pyramid pooling (such as SPPF) for feature aggregation in deep networks, and employ conventional static attention mechanisms or feature concatenation to output the detection results.
[0004] Although existing detection algorithms based on convolutional neural networks have achieved some success, they still have the following significant drawbacks in real, extremely complex natural tea garden environments: First, conventional downsampling methods are prone to losing subtle features and amplifying noise. In actual data collection, tea leaves often have reflective spots and noise on their surface. Current technologies typically use conventional downsampling operations with convolution in shallow networks. This approach not only easily amplifies high-frequency interference signals such as light spots, but also brutally truncates and erases the fine-grained edge features of tiny tea buds, resulting in no usable features for subsequent networks.
[0005] Second, deep networks struggle to simultaneously capture both macroscopic context and microscopic local features. Existing deep feature extraction modules (such as traditional SPPF) have relatively singular receptive field scales, making it difficult to simultaneously capture both the macroscopic outline of the tea tree (contextual information such as branch and leaf orientation) and the high-resolution details of tiny tea buds after continuous downsampling. This lack of multi-scale semantic fusion capability limits the model's recall and localization accuracy for small targets in complex backgrounds.
[0006] Third, it lacks the ability to dynamically select features when faced with severe occlusion and abrupt scale changes. Naturally growing tea trees have densely intertwined branches and leaves, and tea buds are often obscured by older leaves. Furthermore, the scale changes significantly with the shooting distance. Existing static networks lack a mechanism for dynamically adjusting the receptive field and cannot adaptively allocate spatial attention weights based on the true size of the target and the occlusion situation. This makes it easy to misidentify dark green older leaves as tea buds or miss partially occluded targets, resulting in poor robustness of the model under complex real-world conditions.
[0007] Therefore, tea-picking robots urgently need a lightweight tea bud detection method that can operate stably in complex natural environments, overcoming the shortcomings of existing technologies such as easy loss of minute features, insufficient multi-scale semantic fusion, and poor resistance to occlusion interference. Summary of the Invention
[0008] In view of this, the purpose of this invention is to provide a method for detecting tea buds based on an improved YOLOv8 model. The improved YOLOv8 model is robust and lightweight, and can meet the real-time and accurate detection requirements of intelligent agricultural harvesting equipment under complex working conditions. This method specifically addresses the following problems: (1) Addressing the problem that conventional downsampling easily leads to noise amplification and loss of subtle features: When existing models directly use large stride convolution or conventional max pooling for downsampling in shallow networks, they are prone to amplifying high-frequency interference noise such as light spots and crudely erasing the fine-grained edge features of tiny tea buds. This invention designs a lightweight feature dimensionality reduction module (AMConv), which retains the fine-grained features of the buds to the greatest extent before the spatial resolution is physically compressed, while significantly reducing the number of parameters and computational overhead, thus meeting the lightweight requirements of edge devices.
[0009] (2) Addressing the problem that deep networks struggle to simultaneously consider both macroscopic context and microscopic local features: Existing standard spatial pyramid pooling (such as traditional SPPF) has a single receptive field, making it difficult to simultaneously fuse the macroscopic contour semantics of tea trees with the high-resolution details of tiny tea buds after continuous downsampling, resulting in a high false negative rate in complex backgrounds. This invention introduces a cross-stage multi-scale feature fusion module (SPPFCSPC), which deeply integrates multi-scale serial pooling with the feature splitting mechanism of cross-stage local networks (CSP). It utilizes cross-stage bypasses to transmit high-resolution microscopic details that have not been corrupted by pooling, and then complementarily splices them with the macroscopic semantics extracted from the large receptive field of the main branch. This structure effectively overcomes the barrier to deep semantic perception, significantly enhancing the network's comprehensive discrimination ability and mapping stability for multi-scale targets.
[0010] (3) Addressing the lack of dynamic feature selection capability when facing severe occlusion and abrupt changes in target scale: Existing static networks, due to their fixed receptive field, cannot adaptively allocate spatial attention when faced with dense occlusion of branches and leaves during natural growth and significant scale changes caused by shooting distance. This easily leads to misclassification of dark green old leaves as tea buds or missed detection of partially occluded targets. This invention introduces a large selective convolutional kernel (LSKblock) dynamic attention mechanism. By constructing a multi-scale context-aware network and utilizing dynamic kernel recombination, the model is endowed with the ability to adaptively adjust the receptive field (field of view) based on the actual size of the target and the occlusion situation. The network can dynamically choose to focus on the local contours of tiny tea buds or rely on the surrounding macroscopic branch environment for auxiliary reasoning and localization. This fundamentally filters out homogeneous background noise and significantly improves the model's detection robustness under dense occlusion and complex field conditions. To achieve the above objectives, the present invention provides the following technical solution: Solution 1: An improved YOLOv8 model for detecting tea buds, comprising a backbone network, a neck network, and a detection head connected in sequence. The backbone network of the original YOLOv8 model is improved by replacing the two bottom convolutional blocks with a lightweight feature reduction module, namely the AMConv module; replacing the original SPPF module with a cross-stage multi-scale feature fusion module, namely the SPPFCSPC module; and adding a dynamic attention mechanism module with large selective convolutional kernels, namely the LSKBlock dynamic attention mechanism module, before the SPPFCSPC module; where SPPF represents improved spatial pyramid pooling. The SPPFCSPC module deeply integrates multi-scale serial pooling with the feature splitting mechanism of cross-stage local networks (CSP), utilizes cross-stage bypass to pass high-resolution micro-details that have not been destroyed by pooling, and performs complementary splicing with the macro-semantics of the large receptive field extracted from the backbone branches. The LSKBlock module is designed to enable the model to adaptively adjust its receptive field (field of view) based on the actual size of the target and occlusion by constructing a multi-scale context-aware network and utilizing dynamic kernel recombination.
[0011] Furthermore, the AMConv module specifically includes: First, performing average pooling (avg_pool2d) preprocessing on the input feature map to smooth abrupt noise such as light spots and stabilize the spatial distribution of features; then, dividing the preprocessed features into two paths along the channel dimension for parallel computation. One branch completes basic spatial downsampling and macroscopic semantic extraction through a traditional 3×3 convolution with a stride of 2; the other branch adopts a reverse topology structure of "first performing cross-channel feature depth reorganization through 1×1 convolution, and then performing saliency screening and dimensionality reduction through max pooling", thereby rescuing and preserving the fine-grained edge features of tiny tea buds to the greatest extent possible before the feature resolution is destroyed; finally, concatenating the features extracted by these two paths along the channel dimension to output a fused feature map with both strong noise resistance and extremely high fidelity for small targets.
[0012] Furthermore, the SPPFCSPC module specifically includes: First, using 1×1 convolution to perform channel dimensionality reduction and adaptive soft segmentation on the deep input feature map, constructing a functionally complementary main branch and cross-stage bypass branches; wherein, the main branch expands the equivalent receptive field step by step by stacking multiple max pooling layers in sequence and establishing jump splicing connections between the outputs of each pooling layer, so as to fully extract the macroscopic contextual semantics of the tea tree at a large scale; at the same time, the cross-stage bypass branches act as a lossless "information expressway", directly transmitting high-resolution microscopic detail features without any pooling compression across layers; finally, the multi-scale macroscopic semantics output by the main branch and the high-fidelity local details output by the bypass branches are spliced (concat) and aggregated in the channel dimension to achieve multi-scale complementary advantages of deep features in terms of spatial resolution and global receptive field.
[0013] Furthermore, the LSKBlock dynamic attention mechanism module specifically includes: First, the input features are sequentially processed through depthwise separable convolutions with different dilation rates to extract small receptive field features representing local micro-details and large receptive field features representing global macro-contexts. Then, the two features are dimensionality-reduced by 1×1 convolutions and concatenated along the channels, followed by parallel average pooling and max pooling across channels to extract a two-dimensional spatial feature map containing a smooth background tone and high-frequency saliency features. Next, the two-dimensional spatial feature map is processed by convolution and the Sigmoid activation function to generate a spatial weight mask containing two independent channels, precisely quantifying the adaptive selection tendency of each pixel for large and small receptive field features. Finally, the weights of the two channels are multiplied bitwise with the corresponding receptive field features and summed, then processed by 1×1 convolutions to restore the original number of channels, and finally multiplied element-wise with the initial input features. This effectively suppresses complex background interference while achieving dynamic focusing and highlight activation of multi-scale tea bud targets.
[0014] Solution 2: A method for detecting tea buds based on an improved YOLOv8 model according to Solution 1, comprising the following steps: S1: Acquire tea leaf image data and preprocess it to obtain a dataset, which is divided into a training set and a test set; S2: Construct and train an improved YOLOv8 model; the improved YOLOv8 model is constructed by improving the backbone network of the original YOLOv8 model, replacing the two lowest convolutional blocks with AMConv modules, replacing the original SPPF module with SPPFCSPC modules, and adding an LSKBlock dynamic attention mechanism module before the SPPFCSPC module; input the training set into the improved YOLOv8 model and optimize the model; S3: Input the image of the tea leaves to be tested into the trained improved YOLOv8 model, and output the tea bud recognition result.
[0015] Solution 3: A tea bud detection system based on the improved YOLOv8 model of Solution 1, including a data acquisition module, a data processing module and a recognition module; The data acquisition module is used to acquire tea image data and preprocess it; The data processing module specifically includes an improved YOLOv8 model, which specifically improves the backbone network of the original YOLOv8 model by replacing the two lowest convolutional blocks with AMConv modules, replacing the original SPPF module with SPPFCSPC modules, and adding an LSKBlock dynamic attention mechanism module before the SPPFCSPC module. The recognition module is used to output the recognition results of tea buds.
[0016] The beneficial effects of this invention are as follows: (1) Significantly improves noise resistance and fidelity of small targets, while being extremely lightweight. AMConv overcomes the shortcomings of traditional downsampling, which tends to amplify spot noise and erase details of small targets. It not only effectively smooths high-frequency interference under complex lighting conditions, but also completely preserves the fine-grained edge texture of tea buds before feature dimensionality reduction. At the same time, it greatly reduces the number of model parameters and computational complexity (FLOPs), perfectly meeting the strict computing power constraints and real-time requirements of agricultural edge computing devices.
[0017] (2) Significantly improves the overall recall and localization accuracy of multi-scale targets. SPPFCSPC breaks through the perception barrier of a single receptive field in deep networks, achieving lossless complementarity between macro background (such as the direction of tea tree branches) and micro details (such as high-resolution local buds and leaves). This effectively solves the problem of easy missed detection of multi-scale small targets in complex agronomic backgrounds and significantly enhances the stability of the model on deep feature mapping.
[0018] (3) The LSKblock dynamic attention mechanism enhances the ability to resist occlusion interference and the robustness of dynamic environments. Faced with severe occlusion by branches and leaves and drastic changes in target scale in natural field environments, this invention endows the model with the ability to adaptively adjust the receptive field (field of vision). This mechanism can accurately distinguish the feature differences between tea buds and homogeneous dark green old leaves, effectively filter background noise, and greatly improve the visual recognition robustness under dense occlusion and extreme conditions.
[0019] (4) A perfect engineering balance between high precision and high real-time performance is achieved. In summary, the overall detection network of the present invention achieves efficient and accurate identification in complex unstructured environments without relying on expensive high-performance computing hardware, providing a standardized visual positioning solution with great industrial application value for intelligent harvesting robots.
[0020] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a flowchart of the tea bud detection method based on the improved YOLOv8 model of the present invention. Figure 2 Here is a structural diagram of the AMConv module; Figure 3 Here is a diagram of the SPPFCSPC module structure; Figure 4 This is a structural diagram of the LSKblock dynamic attention mechanism module. Detailed Implementation
[0022] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0023] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0024] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0025] Please see Figures 1-4 This invention provides a method and system for tea bud detection based on multi-scale dynamic feature fusion. The invention is based on an improved single-stage target detection network (reconstructed using YOLOv8 as the baseline network). By introducing a lightweight feature dimensionality reduction module (AMConv), a cross-stage multi-scale feature fusion module (SPPFCSPC), and a highly selective convolutional kernel dynamic attention mechanism module (LSKblock), it achieves high-precision and lightweight detection of tea buds in complex natural environments.
[0026] like Figure 2 As shown, the AMConv module works as follows: First, average pooling is performed on the input feature map to smooth abrupt noise such as light spots and stabilize the spatial distribution of features. Then, the preprocessed features are divided into two paths along the channel dimension for parallel computation. The left branch completes basic spatial downsampling and macroscopic semantic extraction through a traditional 3×3 convolution with a stride of 2. The core right branch adopts a reverse topology structure of "first performing cross-channel feature depth reorganization through 1×1 convolution, and then performing saliency screening and dimensionality reduction through max pooling", so as to salvage and preserve the fine-grained edge features of tiny tea buds to the greatest extent before the feature resolution is destroyed. Finally, the features extracted by these two paths are concatenated along the channel dimension to output a fused feature map with strong noise resistance and extremely high fidelity for small targets.
[0027] like Figure 3 As shown, the SPPFCSPC module works as follows: First, 1×1 convolutions are used to perform channel dimensionality reduction and adaptive soft segmentation on the deep input feature map, constructing a functionally complementary main branch and cross-stage bypass branches. The main branch expands the equivalent receptive field step by step by stacking multiple max pooling layers in sequence (and establishing jump splicing connections between the outputs of each pooling layer) to fully extract the macroscopic contextual semantics of the tea tree. At the same time, the cross-stage bypass branches act as a lossless "information express," directly transmitting high-resolution microscopic detail features without any pooling compression across layers. Finally, the multi-scale macroscopic semantics output by the main branch and the high-fidelity local details output by the bypass branches are concatenated in the channel dimension, perfectly realizing the multi-scale complementary advantages of deep features in terms of spatial resolution and global receptive field.
[0028] like Figure 4 As shown, the working process of the LSKblock dynamic attention mechanism module is as follows: First, the input features are sequentially processed through depthwise separable convolutions with different dilation rates to extract small receptive field features representing local microscopic details and large receptive field features representing global macroscopic context. Then, these two feature paths are dimensionality-reduced by 1×1 convolutions and concatenated along the channels. Parallel average pooling and max pooling are then performed across channels to extract a two-dimensional spatial feature map containing a smooth background tone and high-frequency saliency features. Next, this spatial feature map is processed by convolution and the Sigmoid activation function to generate a spatial weight mask containing two independent channels, precisely quantifying the adaptive selection tendency of each pixel for large and small receptive field features. Finally, the weights of these two channels are multiplied bitwise with their corresponding receptive field features and summed. After restoring the original number of channels through 1×1 convolutions, the weights are multiplied element-wise with the initial input features. This effectively suppresses complex background interference while achieving dynamic focusing and specular activation of multi-scale tea bud targets.
[0029] Finally, the above three modules were incorporated into the YOLOv8 framework, resulting in the final detection algorithm framework as follows: Figure 1 As shown, the two lowest-level convolutions in the backbone of the original YOLOv8 framework are replaced with the designed AMConv; the original SPPF module is replaced and upgraded to the SPPFCSPC module; the attention mechanism LSKBlock module is added; and the loss function remains unchanged.
[0030] Verification experiment: To verify the effectiveness of the proposed method (YOLO-ASL) and the beneficial effects of the various improved modules, this embodiment conducted rigorous ablation studies on a self-built tea bud dataset. 1) Experimental environment and evaluation indicators: The deep learning framework used in this embodiment is PyTorch. Objective evaluation metrics include: accuracy (P), mean average precision (mAP50 and mAP50-95), number of parameters (Para / M), and number of floating-point operations (GFLOPs / G).
[0031] 2) Correspondence analysis between experimental data results and technical effects: Using the original YOLOv8n as the baseline model, the three core modules proposed in this invention (AMConv, SPPFCSPC, and LSKblock) were gradually introduced. The experimental data comparison is shown in Table 1. The baseline model (original YOLOv8) achieved an accuracy (P) of 83.8%, mAP50 of 84.4%, mAP50-95 of 63.1%, a computational cost of 8.1 GFLOPs, and a parameter count of 3.01M. At this stage, the model exhibited limited feature extraction capabilities when facing complex environments.
[0032] Table 1 Comparison of effects of different structural models
[0033] Model A (Baseline + AMConv): After introducing the lightweight feature reduction module AMConv, thanks to its front-end smoothing and the inverse topology design of "first 1×1 fusion then max pooling screening," the fine-grained features of tiny tea buds are greatly preserved. Data shows that its mAP50 jumps to 87.6% (an improvement of 3.2%). More importantly, this module extensively uses parameterless pooling algorithms, resulting in a reduction of the overall parameter count (Para) to 2.9M and GFLOPs to 8.0. This set of experimental data strongly demonstrates that the AMConv module of this invention achieves extreme lightweighting while significantly improving noise resistance and fidelity for small targets.
[0034] Model B (Baseline + SPPFCSPC): When only the SPPFCSPC module is introduced, the model's mAP50 is improved to 87.8% by relying on the multi-scale semantic complementarity of its backbone and cross-stage bypass. Experimental data demonstrate that this multi-scale fusion strategy effectively breaks down the perceptual barrier of deep features and significantly reduces the false negative rate.
[0035] Model C (Baseline + LSKblock): When only the LSKblock module is introduced, the mAP50 steadily improves to 85.8% thanks to the dynamic view selection mechanism. Experimental data demonstrate that the dynamic attention mechanism effectively enhances the model's feature focusing ability when faced with occlusion.
[0036] The complete solution of this invention (YOLO-ASL = Baseline + AMConv + SPPFCSPC + LSKblock): After deeply integrating the above three improvement strategies, the complete detection network provided by this invention exhibits the most outstanding performance. Its accuracy (P) reaches 90.7% (a significant improvement of 6.9% over the baseline), mAP50 reaches a maximum of 89.8% (an improvement of 5.4%), and the more stringent mAP50-95 metric also jumps to 69.4% (an improvement of 6.3%). At the same time, the overall number of parameters (4.5M) and computational cost (9.2 GFLOPs) remain at a highly competitive lightweight level.
[0037] 3) Experimental conclusions: The complete and rigorous ablation experimental data fully demonstrate that the tea bud detection method based on multi-scale dynamic feature fusion proposed in this invention not only avoids any exclusion between its functional modules, but also forms an excellent synergistic effect. Compared with existing technologies, this invention, under the premise of strictly controlling the number of model parameters and computational overhead, significantly improves the detection accuracy and anti-occlusion robustness of tiny tea buds in complex field environments, perfectly achieving the invention's objectives and realizing extremely significant engineering application effects.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An improved YOLOv8 model for detecting tea buds, comprising a backbone network, a neck network, and a detection head connected in sequence, characterized in that, The backbone network of the original YOLOv8 model is improved by replacing the two bottom convolutional blocks with a lightweight feature dimensionality reduction module, namely the AMConv module; replacing the original SPPF module with a cross-stage multi-scale feature fusion module, namely the SPPFCSPC module; and adding a dynamic attention mechanism module with large selective convolutional kernels, namely the LSKBlock dynamic attention mechanism module, before the SPPFCSPC module; where SPPF represents improved spatial pyramid pooling. The SPPFCSPC module deeply integrates multi-scale serial pooling with the feature splitting mechanism of cross-stage local networks. It utilizes cross-stage bypass to transmit high-resolution micro-details that have not been destroyed by pooling, and then performs complementary splicing with the macro-semantics of the large receptive field extracted from the main branch. The LSKBlock module is designed to enable the model to adaptively adjust its receptive field based on the actual size of the target and the occlusion situation by constructing a multi-scale context-aware network and utilizing dynamic kernel recombination.
2. The improved YOLOv8 model for detecting tea buds according to claim 1, characterized in that, The AMConv module specifically includes: First, performing average pooling preprocessing on the input feature map to smooth abrupt noise and stabilize the spatial distribution of features; then, dividing the preprocessed features into two equal paths along the channel dimension for parallel computation. One branch completes basic spatial downsampling and macroscopic semantic extraction through a traditional 3×3 convolution with a stride of 2; the other branch adopts a reverse topology structure of "first performing cross-channel feature depth reorganization through 1×1 convolution, and then performing saliency screening and dimensionality reduction through max pooling", thereby rescuing and preserving the fine-grained edge features of tiny tea buds before the feature resolution is destroyed; finally, splicing and aggregating the features extracted by the two paths along the channel dimension to output a fused feature map with both strong noise resistance and extremely high fidelity for small targets.
3. The improved YOLOv8 model for detecting tea buds according to claim 1, characterized in that, The SPPFCSPC module specifically includes: First, using 1×1 convolution to perform channel dimensionality reduction and adaptive soft segmentation on the deep input feature map, constructing a functionally complementary main branch and cross-stage bypass branches; wherein, the main branch expands the equivalent receptive field step by step by stacking multiple max pooling layers in sequence and establishing jump splicing connections between the outputs of each pooling layer to fully extract the macroscopic contextual semantics of the tea tree; at the same time, the cross-stage bypass branches act as a lossless "information express," directly transmitting high-resolution microscopic detail features without any pooling compression across layers; finally, the multi-scale macroscopic semantics output by the main branch and the high-fidelity local details output by the bypass branches are spliced and aggregated in the channel dimension.
4. The improved YOLOv8 model for detecting tea buds according to claim 1, characterized in that, The LSKBlock dynamic attention mechanism module specifically includes: First, the input features are sequentially processed through depthwise separable convolutions with different dilation rates to extract small receptive field features representing local micro-details and large receptive field features representing global macro-context. Then, the two features are dimensionality reduced by 1×1 convolution and concatenated along the channels, and then cross-channel average pooling and max pooling are performed in parallel to extract a two-dimensional spatial feature map containing a smooth background tone and high-frequency saliency features. Then, the two-dimensional spatial feature map is processed by convolution and the Sigmoid activation function to generate a spatial weight mask containing two independent channels. Finally, the weights of the two channels are multiplied bitwise with the corresponding receptive field features and summed, then processed by 1×1 convolution to restore the original number of channels, and then multiplied element-wise with the initial input features.
5. A method for detecting tea buds based on the improved YOLOv8 model according to any one of claims 1 to 4, characterized in that, Includes the following steps: S1: Acquire tea leaf image data and preprocess it to obtain a dataset, which is divided into a training set and a test set; S2: Construct and train an improved YOLOv8 model; the improved YOLOv8 model is constructed by improving the backbone network of the original YOLOv8 model, replacing the two lowest convolutional blocks with AMConv modules, replacing the original SPPF module with SPPFCSPC modules, and adding an LSKBlock dynamic attention mechanism module before the SPPFCSPC module; input the training set into the improved YOLOv8 model and optimize the model; S3: Input the image of the tea leaves to be tested into the trained improved YOLOv8 model, and output the tea bud recognition result.
6. A tea bud detection system based on the improved YOLOv8 model according to any one of claims 1 to 4, characterized in that, It includes a data acquisition module, a data processing module, and a recognition module; The data acquisition module is used to acquire tea image data and preprocess it; The data processing module specifically includes an improved YOLOv8 model, which specifically improves the backbone network of the original YOLOv8 model by replacing the two lowest convolutional blocks with AMConv modules, replacing the original SPPF module with SPPFCSPC modules, and adding an LSKBlock dynamic attention mechanism module before the SPPFCSPC module. The recognition module is used to output the recognition results of tea buds.
7. A computer storage medium storing a computer program, characterized in that, When the program runs, it executes the tea bud detection method described in claim 5.