A tea garden sprout intelligent detection method and system based on machine vision
By constructing a parallel dual-branch processing structure and adaptive attention fusion technology, we have achieved accurate matching and fusion of multi-scale features of tea garden buds. This solves the problems of incomplete feature extraction and target recognition deviation in traditional detection methods, improves detection efficiency and accuracy, and adapts to complex tea garden environments.
Patent Information
- Application Number
- CN202610034121.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional methods for detecting tender buds in tea gardens cannot adapt to the differences in characteristics of tender buds at different growth stages and of different varieties. When faced with complex scenarios such as shading by branches and leaves and uneven lighting, feature extraction is incomplete and target recognition is biased. It is difficult to balance detection efficiency and accuracy, and it is hard to meet the needs of large-scale and intelligent production in tea gardens.
A machine vision-based intelligent detection method for tea garden buds is adopted. By constructing a parallel dual-branch processing structure and integrating multiple sets of heterogeneous scale-aware feature extraction units, the method captures the local texture details and global contour semantics of the buds, performs feature reconstruction and adaptive attention fusion, and combines cross-scale dynamic visual matching modeling to achieve accurate matching and fusion of multi-scale bud features.
It improves the accuracy and real-time performance of tea garden bud detection, adapts to complex scenarios, reduces the rate of missed and false detections, and provides reliable intelligent production technology support.
Smart Images

Figure CN122135195A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, and more specifically, to a machine vision-based intelligent detection method and system for tea garden buds. Background Technology
[0002] With the rapid development of smart agriculture, machine vision technology is gradually being applied in crop growth monitoring, agricultural product harvesting and other processes. As an important economic crop planting scenario, tea gardens have an increasing demand for the accuracy and real-time performance of bud detection. Currently, various agricultural intelligent detection technologies are constantly iterating, providing technical support for the intelligent upgrading of tea garden production, and also putting forward higher practical requirements for the adaptability and robustness of bud detection in tea gardens.
[0003] Traditional methods for detecting tea buds often rely on manual visual identification or single-scale machine vision detection solutions. These methods cannot adapt to the differences in the characteristics of buds at different growth stages and of different varieties in tea gardens. When faced with complex scenarios such as shading by branches and leaves and uneven lighting, incomplete feature extraction and target recognition deviations are likely to occur. It is difficult to balance detection efficiency and accuracy, and it is hard to meet the needs of large-scale and intelligent production operations in tea gardens.
[0004] Therefore, it is necessary to design an intelligent detection method and system for tea garden buds based on machine vision to solve the problems of the detection accuracy of existing technologies being greatly affected by the tea garden environment, poor adaptability to the identification of buds of different sizes, and insufficient real-time performance due to the complexity of the detection structure. Summary of the Invention
[0005] In view of this, the present invention proposes a machine vision-based intelligent detection method and system for tea garden buds, aiming to solve at least one of the problems in the background art.
[0006] In one aspect, this invention proposes a machine vision-based intelligent detection method for tea garden buds, comprising: Collect images of the tea garden scene and preprocess the collected images; A parallel dual-branch processing structure is constructed. The first branch integrates multiple sets of heterogeneous scale-aware feature extraction units to simultaneously capture the local texture details and global contour semantics of the buds and generate multi-scale aware feature maps. The overlapping and occluded bud regions in the multi-scale perception feature map are extracted. By mining the contextual correlation of adjacent regions, the overlapping and occluded bud regions are reconstructed to obtain an enhanced multi-dimensional feature map. The enhanced multidimensional representation map is detected and decoded through the second branch, and a feature interaction channel between cross branches is established simultaneously. In the process of feature extraction in the first branch and detection and decoding in the second branch, a multi-dimensional adaptive attention fusion technique is used to assign weights to the extracted sprout features. A cross-scale dynamic visual matching modeling approach is adopted to dynamically match and fuse feature maps corresponding to sprouts at different scales, and to perform adaptive fine-grained prediction of sprout features based on the fusion results. The related processing units for feature extraction and detection decoding in the dual-branch system are subjected to structural adaptive parameter pruning or parameter fusion, merging the multi-branch processing structure into a single-branch processing structure, and outputting the detection results.
[0007] Furthermore, the preprocessing includes noise filtering, scale normalization, and illumination compensation; Among them, an adaptive filtering method is used to filter noise in the image; When the grayscale variance of the acquired image is greater than the preset grayscale variance threshold, a multi-scale filtering kernel is used to perform noise filtering. When the gray-level variance of the acquired image is less than or equal to the preset gray-level variance threshold, a single-scale filtering kernel is used to perform noise filtering. Image scaling is used to normalize the image. The scaling ratio is determined based on the proportion of the bud area in the image, and the total number of pixels in the scaled image remains constant. Illumination compensation is performed on the image by adjusting the luminance component. When the average luminance value of the image does not match the preset standard luminance value, the luminance difference between the average luminance value and the preset standard luminance value is calculated, and the luminance component of the image is adjusted according to the luminance difference.
[0008] Furthermore, the feature extraction unit of the first branch is composed of multiple groups, each including a heterogeneous convolutional structure, and each convolutional structure corresponds to the positional semantic features, contour geometric features, and scale-aware features of the modeling bud. When the bud scale corresponding to the feature extraction unit is less than the preset scale threshold, the number of channels in the convolution structure is increased. When the sprout scale corresponding to the feature extraction unit is greater than or equal to the preset scale threshold, the kernel size of the convolution structure is increased. The arrangement order of multiple feature extraction units is adaptively configured according to their corresponding bud scale.
[0009] Furthermore, the feature interaction channel includes a forward transmission channel and a confidence-driven reverse feedback channel; The synchronous establishment of feature interaction channels across branches includes: The semantic features of the bud location, the geometric features of the contour, and the scale-aware features extracted from the first branch are transmitted to the second branch in real time through the forward transmission channel to assist in the monitoring of the mask. The detection and decoding structure information of the second branch is transmitted to the first branch through the reverse feedback channel; The feedback signal sent from the reverse feedback channel to the first branch is determined based on the confidence level of the bud in the detection and decoding results of the second branch and the preset confidence threshold. When the confidence level of the bud is greater than the preset confidence threshold, it is determined that the reverse feedback channel sends an enhanced feedback signal to the first branch. When the confidence level of the bud is less than or equal to the preset confidence threshold, the reverse feedback channel is determined to send an adjustment feedback signal to the first branch, triggering the first branch to perform local re-extraction and fine-tuning of the location, contour and scale perception features of the region.
[0010] Furthermore, the multi-dimensional attention fusion includes the fusion of channel attention and spatial attention; The process employs a multi-dimensional adaptive attention fusion technique to assign weights to the extracted sprout features. The sprout feature weight assignment includes: Obtain the channel response values of the corresponding channels of the scale-aware features and contour geometric features of the bud in the feature map, as well as the gradient magnitude of the pixels; The attention weights of the corresponding channels for the sprout scale perception features and contour geometric features are dynamically calibrated based on the channel response values and preset response thresholds. The spatial attention weight of the corresponding pixel is adjusted based on the magnitude threshold of the pixel and the preset gradient magnitude threshold.
[0011] Furthermore, the step of employing multi-dimensional adaptive attention fusion technology to assign weights to the extracted sprout features also includes: When the channel response value of the sprout feature in the feature map is greater than the preset response threshold, the attention weight of the corresponding channel is increased. When the channel response value of the sprout feature in the feature map is less than or equal to the preset response threshold, the attention weight of the corresponding channel is suppressed. When the gradient magnitude of a pixel is greater than a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is increased. When the gradient magnitude of a pixel is less than or equal to a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is reduced.
[0012] Furthermore, the method of employing cross-scale dynamic visual matching modeling dynamically matches and fuses feature maps corresponding to buds at different scales, and performs adaptive fine-grained prediction of bud features based on the fusion result, including: Identify the target bud to be processed and extract all scale-sensing feature maps corresponding to the target bud from the multi-scale sensing feature pyramid. For each pair of feature maps at different scales, calculate the feature distance between them; Based on the feature distance and a preset distance threshold, determine whether the feature maps of the two scales match: When the feature distance is less than a preset distance threshold, the feature maps of the two scales are determined to be successfully matched. When the feature distance is greater than or equal to a preset distance threshold, the feature map matching at the two scales is determined to be unsuccessful. A fusion operation is performed on all the perceptual feature maps of different scales that are determined to be successfully matched.
[0013] Furthermore, the adaptive parameter pruning or parameter fusion includes convolutional layer parameter integration and detection layer parameter integration; Perform convolutional layer parameter integration operation on the convolutional layer that extracts semantic features of sprout location, geometric features of contour, and scale-aware features; Perform a detection layer parameter integration operation on the detection layer that outputs the location coordinates, contour information, and scale category of the sprout; The adaptive parameter pruning or parameter fusion operation is performed on the relevant processing units of feature extraction and detection decoding in the dual-branch process to merge the multi-branch processing structure into a single-branch processing structure and output the detection result, including: The parameter quantity in the relevant processing unit for feature extraction and detection decoding is obtained, and the parameter integration operation method is determined based on the parameter quantity and the preset parameter threshold. When the number of parameters in the processing unit exceeds the preset parameter threshold, adaptive parameter pruning or parameter fusion is performed using parameter pruning. When the number of parameters in the processing unit is less than or equal to the preset parameter threshold, adaptive parameter trimming or parameter fusion is performed using parameter fusion.
[0014] Furthermore, after parameter integration, the difference between the output features of the single-branch processing structure and the output features of the multi-branch processing structure is calculated, and the parameters of the single-branch processing structure are verified based on the difference and the preset difference threshold. When the difference is less than a preset difference threshold, the parameters of the single-branch processing structure are determined to be effectively integrated. When the difference is greater than or equal to the preset difference threshold, the parameters of the single-branch processing structure are determined to be invalid integration, and the adaptive parameter pruning or parameter fusion operation is re-executed.
[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: It improves the basic quality of feature extraction by preprocessing tea garden images; it accurately collects multi-scale bud features using a dual-branch parallel structure and multiple sets of feature extraction units of different sizes; it repairs occluded / overlapping bud features by combining the correlation of adjacent feature regions, ensuring feature integrity; it achieves bidirectional feature complementarity through a dual-branch feature interaction channel; and it rationally allocates feature weights through multi-dimensional attention fusion to strengthen bud features and suppress interference. Cross-scale dynamic visual modeling enables accurate matching and fusion of multi-scale perceptual features and adaptive prediction. Adaptive parameter cropping or parameter fusion simplifies the processing structure, balancing detection accuracy and efficiency, effectively adapting to complex tea garden scenarios, and accurately outputting bud detection results, providing reliable technical support for intelligent tea garden production.
[0016] On the other hand, the present invention also proposes a machine vision-based intelligent detection system for tea garden buds, applied to a machine vision-based intelligent detection method for tea garden buds, comprising: The image preprocessing module is used to acquire images of the tea garden scene and preprocess the acquired images; The feature extraction module is used to construct the first branch of the dual-branch parallel processing structure. It integrates multiple sets of convolutional units of heterogeneous scales to capture the positional semantics, contour geometry and scale-aware features of the sprout respectively. Each unit is arranged from small to large according to the sprout scale and dynamically adjusted according to the target scale to generate a hierarchical multi-scale-aware feature map. The feature repair module is used to extract occluded and overlapping bud regions in the multi-scale perceptual feature map, and reconstruct the semantic and structural information of the occluded parts by mining the contextual correlation of adjacent non-occluded regions, and output an enhanced multi-dimensional feature map. The interactive detection module is used to construct the second branch of the dual-branch parallel processing structure, and to detect and decode multi-dimensional feature maps, while establishing a bidirectional feature interaction channel between the two branches. The weight allocation module is used to adaptively calibrate the extracted bud features through multi-dimensional attention fusion technology during the first branch feature extraction and the second branch detection and decoding process. The feature prediction module is used to dynamically match and fuse perceptual feature maps of the same target bud at different scales using a cross-scale dynamic visual modeling approach, and to perform adaptive prediction of bud features based on the fusion results. The control integration module is used to adaptively prune or fuse the relevant processing units of feature extraction and detection decoding in the dual branches, merge the multi-branch processing structure into a single-branch processing structure, and output the final bud detection result after verifying the integration effectiveness.
[0017] It is understandable that the above-mentioned intelligent detection method and system for tea garden buds based on machine vision has the same beneficial effects, and will not be elaborated further here. Attached Figure Description
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a machine vision-based intelligent detection method for tea garden buds, provided as an embodiment of the present invention.
[0019] Figure 2 This is a functional block diagram of a machine vision-based intelligent detection system for tea garden buds, provided as an embodiment of the present invention. Detailed Implementation
[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] See Figure 1 As shown in some embodiments of this application, this embodiment provides a machine vision-based intelligent detection method for tea garden buds, including the following steps: S100: Acquire images of the tea garden scene and preprocess the acquired images; S200: Construct a parallel dual-branch processing structure. The first branch integrates multiple sets of heterogeneous scale-aware feature extraction units to simultaneously capture the local texture details and global contour semantics of the bud and generate a multi-scale aware feature map. S300: Extract overlapping and occluded bud regions from the multi-scale perceptual feature map. By mining the contextual relationships between adjacent regions, perform feature reconstruction on the overlapping and occluded bud regions to obtain an enhanced multi-dimensional feature map. S400: The enhanced multi-dimensional representation map is detected and decoded through the second branch, and a feature interaction channel between cross branches is established simultaneously. S500: In the process of feature extraction in the first branch and detection and decoding in the second branch, a multi-dimensional adaptive attention fusion technique is used to assign weights to the extracted sprout features. S600: It adopts a cross-scale dynamic visual matching modeling method to dynamically match and fuse feature maps corresponding to sprouts at different scales, and performs adaptive fine-grained prediction of sprout features based on the fusion results. S700: Performs structural adaptive parameter pruning or parameter fusion on the relevant processing units of feature extraction and detection decoding in the dual branches, merges the multi-branch processing structure into a single-branch processing structure, and outputs the detection results.
[0022] Understandably, preprocessing improves image quality, providing a reliable foundation for feature extraction; multi-scale feature extraction units enable comprehensive acquisition of multi-scale perceptual features of buds, solving the problem of incomplete single-scale perceptual feature extraction; occlusion feature repair mechanisms fill feature gaps in occluded and overlapping areas, reducing false negative and false positive rates; dual-branch interactive channels enable bidirectional feedback between features and detection results, optimizing detection accuracy; multi-dimensional attention fusion strengthens bud features, suppresses background interference, and improves feature effectiveness; cross-scale dynamic modeling enables accurate adaptation of multi-scale buds, expanding the detection range; adaptive parameter pruning or parameter fusion simplifies the processing structure, reduces computational load, and ensures real-time detection requirements.
[0023] Specifically, in S100, preprocessing includes noise filtering, scale normalization, and illumination compensation.
[0024] An adaptive filtering method is used to filter noise from the image; When the grayscale variance of the acquired image is greater than the preset grayscale variance threshold, a multi-scale filtering kernel is used to perform noise filtering. When the gray-level variance of the acquired image is less than or equal to the preset gray-level variance threshold, a single-scale filtering kernel is used to perform noise filtering. Image scaling is used to normalize the image. The scaling ratio is determined based on the proportion of the bud area in the image, and the total number of pixels in the scaled image remains constant. Illumination compensation is performed on the image by adjusting the luminance component. When the average luminance value of the image does not match the preset standard luminance value, the luminance difference between the average luminance value and the preset standard luminance value is calculated, and the luminance component of the image is adjusted according to the luminance difference.
[0025] In this embodiment, scene images containing tender buds are captured on-site in the tea garden using image acquisition devices (such as industrial cameras or high-definition cameras). The acquisition range covers tea gardens in different areas and at different growth stages to ensure the diversity of image samples. Subsequently, preprocessing operations are performed on the acquired raw images.
[0026] In this embodiment, the adaptive filtering noise filtering process specifically involves: calculating the image grayscale variance, and then applying the calculated grayscale variance σ... 2The filter kernel type is determined by comparing it with the preset grayscale variance threshold T1. When σ 2 When the value is greater than T1, it indicates severe image noise interference (such as images acquired during strong winds or sandstorms, or images with dense noise caused by equipment sensor malfunctions). In this case, a multi-scale filtering kernel is selected to perform noise filtering. Specifically, a combination of "small-sized filtering kernel + large-sized filtering kernel" is used: first, a small-sized filtering kernel (such as a 3×3 window) is used to filter out subtle noise in the image, and then a large-sized filtering kernel (such as a 5×5 or 7×7 window) is used to filter out coarse noise in the image, ensuring comprehensive noise removal.
[0027] When σ 2 When T1 is less than or equal to 1, it indicates that the image has a uniform gray-level distribution and relatively low noise interference (e.g., an image acquired under clear, windless conditions). In this case, a single-scale filtering kernel is selected for noise filtering. Specifically, a fixed-size filtering kernel (e.g., a 3×3 window) is used to perform a single filtering pass, improving processing efficiency while ensuring noise reduction. During the filtering process, the filtering kernel traverses the entire image using a sliding window, performs a weighted average of the pixel gray-level values within each window, and replaces the original gray-level value of the center pixel of the window with the calculated average, thus completing the noise filtering. In this embodiment, the scale normalization process based on the proportion of the bud area is as follows: The threshold segmentation method is used to initially identify the bud area (by using the gray level difference between the bud and the background, a gray level threshold is set to distinguish the bud from the background). The number of pixels in the bud area S1 and the total number of pixels in the image Stotal are counted. The proportion of the bud area R is calculated by the formula: R=S1 / Stotal.
[0028] Based on the calculated proportion R of the sprout area, the scaling ratio k is dynamically determined. The core principle is to ensure that the proportion of the sprout area in the scaled image is within a preset reasonable range (such as 10%-30%), so as to avoid the sprout area being too small, which would lead to the omission of subsequent feature extraction, or too large, which would limit the field of view of the image.
[0029] For example, when R < 10%, it means that the proportion of the sprout in the image is too small, and the scaling ratio k needs to be increased (enlarge the image) to increase the proportion of the sprout area in the scaled image to a reasonable range. When R > 30%, it means that the proportion of the sprout is too large, and the scaling ratio k needs to be reduced (the image needs to be reduced) to ensure that the surrounding environment of the sprout is fully presented and to avoid the loss of boundaries during feature extraction; when 10% ≤ R ≤ 30%, the default scaling ratio k0 (such as 1:1) is used.
[0030] Based on a determined scaling ratio k, the image is scaled using a bilinear interpolation algorithm to ensure smooth pixel transitions and prevent distortion of the sprout outline caused by scaling. Simultaneously, the total number of pixels in the scaled image is strictly controlled to remain constant (e.g., uniformly 640×640 pixels) to ensure consistent input specifications for subsequent feature extraction units and avoid mismatches in feature extraction parameters due to differences in image size.
[0031] In this embodiment, the specific process of illumination compensation based on brightness difference is as follows: For the scaled image, extract the luminance component of each pixel and calculate the average luminance value Lavg of all pixels.
[0032] The calculated average brightness value Lavg is compared with the preset standard brightness value L0, and the brightness difference ΔL is calculated using the formula: ΔL=Lavg-L0.
[0033] When ΔL≠0, it indicates a deviation between the current image brightness and the ideal brightness, requiring illumination compensation. When ΔL>0, it indicates the image is too bright (e.g., an image captured at noon on a sunny day), requiring a reduction in the luminance component. The adjustment magnitude is positively correlated with the absolute value of ΔL (the larger ΔL, the greater the reduction). When ΔL<0, it indicates the image is too dark (e.g., an image captured on a cloudy day, in the early morning, or at dusk), requiring an increase in the luminance component. Again, the adjustment magnitude is positively correlated with the absolute value of ΔL (the larger the absolute value of ΔL, the greater the increase). During the adjustment process, only the luminance component of the image is changed, without altering the hue and saturation, to avoid errors in the identification of bud features due to color distortion.
[0034] When ΔL=0, it means that the image brightness meets the requirements and no additional compensation is needed.
[0035] Understandably, the preprocessing stage achieves a balance between noise reduction and detail preservation through adaptive noise filtering; scale regularization based on the proportion of the bud area ensures the uniformity of image specifications and the effectiveness of bud features; and illumination compensation based on brightness differences solves the problem of uneven image brightness under complex lighting conditions. After preprocessing, the output image possesses the characteristics of "low noise, uniform specifications, balanced brightness, and clear bud features," effectively reducing interference during subsequent multi-scale perceptual feature extraction, improving the completeness and accuracy of feature extraction, and providing high-quality input data for subsequent core stages such as dual-branch parallel processing structure and multi-dimensional attention fusion. This is a key prerequisite for achieving accurate and efficient detection of tea garden buds.
[0036] Specifically, in S200, the feature extraction units of the first branch are multiple groups, each including a heterogeneous convolutional structure. Each convolutional structure corresponds to the positional semantic features, contour geometric features, and scale-aware features of the modeling bud. When the bud scale corresponding to the feature extraction unit is smaller than the preset scale threshold, the number of channels in the convolutional structure is increased. When the sprout scale corresponding to the feature extraction unit is greater than or equal to the preset scale threshold, the kernel size of the convolution structure is increased. The arrangement order of multiple feature extraction units is adaptively configured according to their corresponding bud scale.
[0037] In this embodiment, the adaptive structure configuration is preferably arranged from smallest to largest.
[0038] It is understandable that the convolutional structure is the core functional component of the feature extraction unit. It is a technical structure that extracts local features of an image by sliding the convolutional kernel across the image. The convolutional kernel is the size of the window in the convolutional structure that performs the sliding calculation. The larger the size, the wider the image area it covers. The size and number of channels of the convolutional kernel directly determine the range and richness of detail of the feature extraction.
[0039] In this embodiment, a large number of image samples of buds at different scales are collected, and the actual size of each sample (such as pixel length and area) is measured. The critical value of different scale levels is calculated as a preset scale threshold T2. For example, if the maximum pixel area of a small-scale bud is S1 and the minimum pixel area of a medium-scale bud and leaf is S2, then T2 can be set as (S1+S2) / 2 to distinguish between small-scale and medium-scale buds.
[0040] For each feature extraction unit, its corresponding bud scale is compared with a preset scale threshold T2, and the parameters of the convolution structure are adjusted accordingly. When the bud scale corresponding to the feature extraction unit is <T2 (i.e., small-scale buds, such as bud tips), the features of these buds are mainly subtle textures and precise locations, with a small overall outline. Therefore, it is necessary to increase the number of channels in the convolutional structure. Increasing the number of channels allows the convolutional structure to capture more subtle feature information simultaneously (such as the fuzzy texture of the bud tip and the edge pixel position of the bud tip), avoiding subsequent positioning deviations due to the loss of feature details. For example, increasing the basic number of channels from 64 to 128 enhances the ability to capture subtle features.
[0041] When the bud scale corresponding to the feature extraction unit is ≥T2 (i.e., large-scale buds, such as one bud and one leaf, or one bud and two leaves), the features of this type of bud are mainly based on its overall outline and size. A larger acquisition range is needed to cover the entire bud area, therefore, the kernel size of the convolutional structure needs to be increased. Increasing the kernel size allows the convolutional structure to cover a wider image area during sliding computation, fully capturing the bud's outline boundaries and overall scale-aware features, avoiding outline loss due to insufficient acquisition range. For example, increasing the basic kernel size from 3×3 to 5×5 or 7×7 improves the overall feature acquisition capability.
[0042] In this embodiment, the features of the tender shoots are collected through each feature extraction unit. The specific implementation process is as follows: The tea garden image after preprocessing (noise filtering, scale normalization, and illumination compensation) is input into the first branch, and multiple feature extraction units perform parallel traversal processing on the image. The convolutional structure in each unit moves across the image via a sliding window, performing convolution calculations on the pixels within the window: For units corresponding to small-scale buds, the high-channel-count convolutional structure focuses on capturing areas with subtle changes in pixel grayscale in the image, extracting the bud's position coordinates (represented by the coordinates of the center pixel of the window) and subtle texture features, while also initially capturing the contour boundaries; For units corresponding to large-scale buds, the convolutional structure with large-size kernels focuses on capturing continuous edge regions in the image, extracting the complete contour curve of the bud (represented by the coordinate set of edge pixels), and calculating the bud's scale (such as area and aspect ratio) based on the number of pixels in the covered area.
[0043] Each feature extraction unit integrates the collected location semantic features, contour geometric features, and scale-aware features into a feature vector, which is then output to the subsequent processing module to form a preliminary feature map of the corresponding scale bud.
[0044] The specific implementation process of arranging multiple groups of feature extraction units in ascending order of scale is as follows: Multiple feature extraction units that have been configured and completed feature acquisition are arranged in ascending order of their corresponding bud scale. For example, units corresponding to small-scale buds are arranged at the beginning, units corresponding to medium-scale one bud and one leaf are arranged in the middle, and units corresponding to large-scale one bud and two leaves are arranged at the end.
[0045] Understandably, the first branch feature extraction unit is the core foundation of the dual-branch parallel processing structure, and its performance directly determines the accuracy of subsequent detection and decoding. The multi-scale perceptual feature map output by this unit contains core features such as the position, outline, and scale of the buds at different growth stages, providing high-quality feature data support for the detection and decoding of the second branch. At the same time, it lays the foundation for information transmission in the dual-branch feature interaction channel and the weight allocation of multi-dimensional attention fusion, and is a key link in realizing accurate identification, localization, and scale determination of tea garden buds.
[0046] Understandably, by configuring multiple sets of differentiated feature extraction units, comprehensive coverage of sprout features across all scales was achieved; by adjusting dynamic parameters based on scale thresholds, accurate feature acquisition of "focusing on details at small scales and the overall picture at large scales" was realized; and by designing the feature fusion by scale, the smoothness of subsequent feature fusion was ensured.
[0047] Specifically, in S300, region analysis is performed on the multi-scale perceptual feature map generated in S200. A connected component detection algorithm is used to extract continuous regions from the feature map to determine whether there is bud occlusion or overlap. When the area of a connected region exceeds a preset threshold, it is determined that the region is occluded or overlapped by a sprout (because the area of a single sprout's connected region is relatively fixed, occlusion or overlap will increase the region area). Subsequently, feature restoration is performed on the regions determined to be occluded or overlapping: feature information of adjacent non-occluded regions (such as texture, contour, and color features of adjacent regions) is extracted; by analyzing the correlation between adjacent feature regions (such as grayscale difference of feature pixels and texture similarity), interpolation algorithms are used to supplement and restore the feature information of the occluded area—for example, when the feature similarity between adjacent non-occluded regions and the occluded region is high, weighted interpolation is used to extend the features of the non-occluded region to the occluded region, filling the feature gaps in the occluded area. After feature restoration is completed, the restored feature information is integrated with the original multi-scale perceptual feature map to update and obtain a multi-dimensional feature map, which contains complete and missing multi-scale sprout features.
[0048] Specifically, in S400, the feature interaction channel includes a forward transmission channel and a confidence-driven reverse feedback channel. The synchronous establishment of feature interaction channels across branches includes: The semantic features of the bud location, the geometric features of the contour, and the scale-aware features extracted from the first branch are transmitted to the second branch in real time through the forward transmission channel to assist in the monitoring of the mask. The detection and decoding structure information of the second branch is transmitted to the first branch through the reverse feedback channel; The feedback signal sent from the reverse feedback channel to the first branch is determined based on the confidence level of the bud in the detection and decoding results of the second branch and the preset confidence threshold. When the confidence level of the bud is greater than the preset confidence threshold, it is determined that the reverse feedback channel sends an enhanced feedback signal to the first branch. When the confidence level of the bud is less than or equal to the preset confidence threshold, the reverse feedback channel is determined to send an adjustment feedback signal to the first branch, triggering the first branch to perform local re-extraction and fine-tuning of the location, contour and scale perception features of the region.
[0049] Understandably, the updated multi-dimensional feature map of S300 is input into the second branch. The second branch analyzes the feature map through the detection and decoding algorithm to determine whether there is a bud in the feature map and the initial position of the bud. That is, the core of detection and decoding is to transform the abstract feature information into specific detection results (such as the determination of "there is a bud" or "there is no bud").
[0050] It is understandable that while performing detection and decoding in the second branch, a feature interaction channel is established between the two branches: The forward channel transfers the effective bud features extracted from the first branch to the second branch, providing accurate feature support for the detection and decoding of the second branch. The specific process is as follows: After the first branch completes the acquisition of the positional semantic features, contour geometric features, and scale-aware features of the corresponding scale buds, it integrates these features into a structured feature vector, which is then transmitted in real time to the feature input end of the second branch through the forward channel. Location semantic features are transmitted in the form of a set of pixel coordinates, which clearly defines the specific location of the sprout in the image; The outline geometric features are transmitted in the form of grayscale variation curves of edge pixels, clearly defining the outer boundary of the bud.
[0051] The reverse feedback channel transmits the detection and decoding information (such as detection confidence and preliminary detection results) from the second branch to the first branch, providing feedback for the feature extraction optimization of the first branch. The specific process is as follows: After receiving the feature data transmitted from the forward channel, the second branch analyzes the feature data through a detection and decoding algorithm to determine whether the corresponding area is a bud and calculates the confidence level of the determination result. The confidence level is calculated based on the matching degree between the feature data and the labeled bud feature library. The higher the matching degree, the greater the confidence level.
[0052] The calculated confidence level of the bud is compared with the preset confidence threshold T3 to determine the type of feedback signal: When the confidence level of the bud is greater than T3, it indicates that the features extracted by the first branch have a high degree of matching with the actual bud features, and the detection result is highly reliable. The reverse feedback channel sends an enhanced feedback signal to the first branch. This signal contains the location information of the region where the features are currently extracted, which informs the first branch that the feature extraction quality of this region is high. When this region is detected again in the future, the same feature extraction parameters can be used first to strengthen the feature acquisition of this region. At the same time, when the first branch receives the enhanced feedback signal, it increases the feature extraction weight of the corresponding region in the subsequent feature extraction process, and prioritizes the acquisition of features from this region.
[0053] When the confidence level of the bud is ≤ T3, it indicates that the features extracted by the first branch are biased. For example, features of old leaves may be extracted, or the features of the bud may be incomplete, indicating insufficient reliability of the detection results. At this time, the reverse feedback channel sends an adjustment feedback signal to the first branch. This signal contains the location information of the currently detected suspected bud area, informing the first branch that the feature extraction of this area is biased and needs to be re-extracted. Simultaneously, when the first branch receives the adjustment feedback signal, it locates the area specified by the signal, restarts the feature extraction process for that area, adjusts the parameters of the feature extraction unit (such as adjusting the convolution kernel size and the number of channels), collects more accurate location, contour, and scale-aware features, and then retransmits them to the second branch for detection and decoding through the forward channel.
[0054] Understandably, the feature interaction channel is the core link in the dual-branch parallel processing structure, overcoming the limitations of single-branch operation. The forward channel enables effective transfer of feature data, providing accurate data for the second branch's detection and decoding. The feedback mechanism of the reverse feedback channel allows the feature extraction process of the first branch to be optimized in real-time based on the detection results, forming a closed-loop processing flow of "feature extraction - detection verification - feature optimization." Through dynamic judgment of confidence and threshold, this channel can specifically enhance the acquisition of effective features and correct the extraction of ineffective features, effectively improving the accuracy of sprout feature extraction, reducing the false positive and false negative rates, and ensuring efficient collaboration between the two branches, providing core support for the final output of accurate sprout detection results.
[0055] Specifically, in S500, the dimensional adaptive attention fusion includes the fusion of channel attention and spatial attention; The process employs a multi-dimensional adaptive attention fusion technique to assign weights to the extracted sprout features. The sprout feature weight assignment includes: Obtain the channel response values of the corresponding channels of the scale-aware features and contour geometric features of the bud in the feature map, as well as the gradient magnitude of the pixels; The attention weights of the corresponding channels for the sprout scale perception features and contour geometric features are dynamically calibrated based on the channel response values and preset response thresholds. The spatial attention weight of the corresponding pixel is adjusted based on the magnitude threshold of the pixel and the preset gradient magnitude threshold.
[0056] Specifically, when the channel response value of the sprout feature in the feature map is greater than the preset response threshold, the attention weight of the corresponding channel is increased. When the channel response value of the sprout feature in the feature map is less than or equal to the preset response threshold, the attention weight of the corresponding channel is reduced. Specifically, when the gradient magnitude of a pixel is greater than a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is increased. When the gradient magnitude of a pixel is less than or equal to a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is reduced.
[0057] It is understandable that a multi-dimensional attention fusion technique is introduced throughout the process of feature extraction in the first branch and detection and decoding in the second branch, and weights are assigned to the extracted bud features from both channel and spatial dimensions.
[0058] In this embodiment, when allocating channel attention weights, the response value of each channel is calculated for the features corresponding to different channels in the feature map (such as color channel, texture channel, and contour channel). When the response value of a certain channel is greater than a preset threshold, it indicates that the channel contains richer bud features, so the attention weight of the channel is increased to strengthen its feature signal. When the response value is less than or equal to the preset threshold, it indicates that the background interference of the channel is strong, so its weight is reduced to weaken the interference signal.
[0059] When assigning spatial attention weights, the gradient magnitude of each pixel in the feature map is calculated. The gradient magnitude reflects the edge sharpness of the pixel. The gradient magnitude of the sprout edge is higher. When the gradient magnitude of a pixel is greater than the preset threshold, it means that the pixel belongs to the edge or core area of the sprout, and its spatial attention weight is increased. When the gradient magnitude is less than or equal to the preset threshold, it means that the pixel belongs to the background area, and its weight is reduced.
[0060] Understandably, the preset response threshold is a pre-set critical value used to determine the effectiveness of feature channels. It is determined by statistically analyzing the response data of a large number of sprout feature channels and serves as the basis for adjusting channel attention weights. Similarly, the preset gradient magnitude threshold is a pre-set critical value used to determine whether a pixel belongs to the edge region of a sprout. It is determined by statistically analyzing the gradient data of a large number of sprout edge pixels and serves as the basis for adjusting spatial attention weights.
[0061] Understandably, by adjusting the weights of the channel attention dimension, the effective feature channels were precisely selected, and the representation of the bud scale and outline geometric features was strengthened; by adjusting the weights of the spatial attention dimension, the spatial region of the bud was precisely focused, and the interference from the background region was suppressed.
[0062] Specifically, in S600, the method of adopting cross-scale dynamic visual matching modeling to dynamically match and fuse feature maps corresponding to buds at different scales, and performing adaptive fine-grained prediction of bud features based on the fusion result, includes: Identify the target bud to be processed and extract all scale-sensing feature maps corresponding to the target bud from the multi-scale sensing feature pyramid. Calculate the feature distance between perceptual feature maps of different scales pairwise; Based on the feature distance and a preset distance threshold, determine whether the feature maps at the two scales match: When the feature distance is less than a preset distance threshold, the feature maps of the two scales are considered to be successfully matched. If the feature distance is greater than or equal to a preset distance threshold, the feature map matching between the two scales is deemed to have failed. A fusion operation is performed on all the perceptual feature maps of different scales that are determined to be successfully matched.
[0063] In this embodiment, based on the multi-scale perceptual feature map output by the first branch (after multi-dimensional attention fusion weighting processing), the target sprout to be processed is determined by a preliminary localization algorithm: traversing all feature maps, identifying regions with sprout features (such as specific textures and edge contours), each independent sprout region is a target sprout to be processed, and recording the preliminary position coordinates of each target sprout in the image.
[0064] Subsequently, all scale-aware feature maps corresponding to each target bud are extracted: based on the initial position coordinates of the target bud, feature maps containing the position information of the target bud are selected from the small, medium, and large scale-aware feature maps generated in the first branch, forming a unique feature map set for that target bud. For example, if a target bud is a single bud and a single leaf (medium scale), its unique feature map set should include a small-scale perception feature map (recording bud details), a medium-scale perception feature map (recording the overall morphology of the single bud and a single leaf), and a large-scale perception feature map (recording the contour of the bud's relationship with its surrounding environment), ensuring full-scale perception features coverage of the target bud.
[0065] Subsequently, dynamic matching is performed on these feature maps of different scales: the feature distance between each pair of feature maps is calculated. The feature distance reflects the similarity between the two feature maps. The Euclidean distance or cosine similarity method is used to calculate the feature distance. The calculated feature distance is compared with a preset distance threshold. When the feature distance is less than the threshold, it is determined that the two feature maps correspond to the associated features of the same target bud, and the match is successful. When the feature distance is greater than or equal to the threshold, it is determined that the match is unsuccessful (corresponding to features of different buds).
[0066] Subsequently, a fusion operation is performed on all successfully matched perceptual feature maps of different scales. A weighted summation method is used to integrate features of different scales into a single fused feature map. The fusion weights are determined based on the scale of the feature maps. Larger-scale feature maps contain richer information about the overall outline and scale of the sprout, and therefore have higher weights to ensure the overall geometric features of the outline. Smaller-scale feature maps contain richer information about the subtle textures and precise locations of the sprout, and therefore have relatively lower weights to supplement subtle texture features. Simultaneously, it is ensured that the sum of the weights of all feature maps is 1.
[0067] Finally, adaptive prediction of bud features is performed based on the fused feature map. According to the distribution of the fused features, the growth stage, precise location, complete outline and other information of the bud are automatically determined to achieve accurate adaptation of buds at multiple scales.
[0068] Understandably, feature distance is an indicator used to quantify the similarity of features between two feature maps. The smaller the feature distance, the more similar the features carried by the two feature maps, and the more likely they correspond to the same target bud; conversely, the greater the feature difference, the more significant the difference. The preset distance threshold is a pre-set critical value used to determine whether feature maps match. It is determined by statistically analyzing a large amount of feature distance data from perceptual feature maps of the same target bud at different scales, and is the core basis for distinguishing between "the same bud feature" and "different bud features".
[0069] Understandably, by “locking the target bud and extracting a unique feature map”, the confusion between different bud features is avoided, reducing the risk of false detection. By dynamically matching feature distances, effective feature maps of the same target are accurately selected, eliminating the interference of invalid features and improving the reliability of feature data. By weighted fusion and integrating multi-scale perception features, the shortcomings of incomplete representation of single-scale perception features are made up for, and a complete representation of bud features is achieved.
[0070] It is understandable that the fusion feature map output after the fusion operation provides high-quality core data support for subsequent adaptive parameter pruning or parameter fusion and final detection result output. It can significantly improve the detection accuracy of buds at different growth stages, and is especially suitable for complex scenarios in tea gardens where buds at multiple scales are mixed. It is a key technical support to ensure the universality and accuracy of the detection method of this invention.
[0071] Specifically, in S700, adaptive parameter pruning or parameter fusion includes convolutional layer parameter integration and detection layer parameter integration; Perform convolutional layer parameter integration operation on the convolutional layer that extracts semantic features of sprout location, geometric features of contour, and scale-aware features; Perform a detection layer parameter integration operation on the detection layer that outputs the location coordinates, contour information, and scale category of the bud.
[0072] Specifically, adaptive parameter pruning or fusion operations are performed on the relevant processing units of feature extraction and detection decoding in the dual-branch process to merge the multi-branch processing structure into a single-branch processing structure, and the detection results are output, including: Obtain the parameter quantity in the relevant processing units of feature extraction and detection decoding, and determine the parameter integration operation method based on the parameter quantity and the preset parameter threshold; When the number of parameters in a processing unit exceeds the preset parameter threshold, adaptive parameter pruning or parameter fusion is performed by pruning parameters to remove redundant parameters (such as parameters that contribute very little to feature extraction) and retain core parameters. When the number of parameters in the processing unit is less than or equal to the preset parameter threshold, the parameter fusion method is used to perform adaptive parameter pruning or parameter fusion operation, and the parameters of multiple branches are merged into a set of parameters through weighted average and other algorithms.
[0073] Understandably, the number of parameters refers to the total number of learnable parameters contained in a processing unit, directly reflecting the complexity and computational load of the unit. The larger the number of parameters, the heavier the computational burden. The preset parameter threshold is a pre-set critical value used to determine the complexity of a processing unit. It is determined by statistically analyzing the number of parameters and computational efficiency data of each processing unit in a multi-branch structure, and is the core basis for selecting the parameter integration method.
[0074] Understandably, through the above integration operations, the originally complex dual-branch multi-processing unit structure can be merged into a single-branch single-processing unit structure.
[0075] Specifically, after parameter integration, the difference between the output features of the single-branch processing structure and the output features of the multi-branch processing structure is calculated, and the parameters of the single-branch processing structure are verified based on the difference and the preset difference threshold. When the difference is less than the preset difference threshold, it means that the parameters of the integrated single-branch structure have not lost detection accuracy. Therefore, the parameters of the single-branch processing structure are determined to be effectively integrated, and the detection result of the single-branch structure is output. When the difference is greater than or equal to the preset difference threshold, it indicates that there is a deviation in the parameters of the integrated single-branch structure. The parameters of the single-branch processing structure are then determined to be invalidally integrated, and the adaptive parameter pruning or parameter fusion operation is re-executed until the integration verification is valid and the detection result of the single-branch structure is output.
[0076] Understandably, the difference degree is an indicator used to quantify the similarity of output features between the integrated single-branch structure and the original multi-branch structure. The smaller the difference degree, the closer the performance of the integrated structure is to the original structure; conversely, the greater the difference degree, the more significant the performance degradation. The preset difference degree threshold is a pre-set critical value used to determine the effectiveness of adaptive parameter pruning or parameter fusion. It is determined by statistically analyzing the correlation between detection accuracy and difference degree across a large number of samples, ensuring that the integrated structure meets the detection accuracy requirements.
[0077] Understandably, the integrated single-branch structure is validated. After the integration is verified to be effective, the single-branch structure outputs the final detection results, including the location coordinates of the buds, complete outline information, scale category, etc., providing accurate data for intelligent tea garden operations.
[0078] Understandably, transforming the complex two-branch multi-unit structure into a single-branch structure significantly reduces the number of parameters and computational load, improves the model's running speed, and enables it to adapt to the real-time detection needs of embedded devices in tea gardens. By separately integrating convolutional layers and detection layers, and dynamically selecting parameter pruning and fusion, the core performance of the original model is preserved to the maximum extent, avoiding the degradation of detection accuracy caused by structural simplification. Through a closed-loop effect verification, the performance of the integrated model is ensured to be stable and reliable, guaranteeing the accuracy of the detection results.
[0079] As can be seen, this embodiment improves the basic quality of feature extraction by preprocessing tea garden images, accurately collects multi-scale bud features with the help of a dual-branch parallel structure and multiple sets of feature extraction units of different sizes, and repairs occluded / overlapping bud features by combining the correlation of adjacent feature regions to ensure feature integrity; achieves bidirectional feature complementarity through dual-branch feature interaction channels, and rationally allocates feature weights through multi-dimensional attention fusion to strengthen bud features and suppress interference; cross-scale dynamic visual modeling realizes accurate matching and fusion of multi-scale perceptual features and adaptive prediction, and simplifies the processing structure by adaptive parameter cropping or parameter fusion, taking into account both detection accuracy and efficiency, effectively adapting to complex tea garden scenarios, accurately outputting bud detection results, and providing reliable technical support for intelligent tea garden production.
[0080] refer to Figure 2 In another embodiment of this application, a machine vision-based intelligent detection system for tea garden buds is applied to a machine vision-based intelligent detection method for tea garden buds, comprising: The image preprocessing module is used to acquire images of the tea garden scene and preprocess the acquired images; The feature extraction module is used to construct the first branch of the dual-branch parallel processing structure. It integrates multiple sets of convolutional units of heterogeneous scales to capture the positional semantics, contour geometry and scale-aware features of the sprout respectively. Each unit is arranged from small to large according to the sprout scale and dynamically adjusted according to the target scale to generate a hierarchical multi-scale-aware feature map. The feature repair module is used to extract occluded and overlapping bud regions in the multi-scale perceptual feature map, and reconstruct the semantic and structural information of the occluded parts by mining the contextual correlation of adjacent non-occluded regions, and output an enhanced multi-dimensional feature map. The interactive detection module is used to construct the second branch of the dual-branch parallel processing structure, and to detect and decode multi-dimensional feature maps, while establishing a bidirectional feature interaction channel between the two branches. The weight allocation module is used to adaptively calibrate the extracted bud features through multi-dimensional attention fusion technology during the first branch feature extraction and the second branch detection and decoding process. The feature prediction module is used to dynamically match and fuse perceptual feature maps of the same target bud at different scales using a cross-scale dynamic visual modeling approach, and to perform adaptive prediction of bud features based on the fusion results. The control integration module is used to adaptively prune or fuse the relevant processing units of feature extraction and detection decoding in the dual branches, merge the multi-branch processing structure into a single-branch processing structure, and output the final bud detection result after verifying the integration effectiveness.
[0081] Specifically, the image preprocessing module, feature extraction module, feature repair module, interactive detection module, weight allocation module, feature prediction module, and control integration module are connected through communication, and the control integration module controls and coordinates the operation of each module.
[0082] Understandably, a machine vision-based intelligent detection method and system for tea garden buds has the same beneficial effects, and will not be elaborated upon here.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A machine vision-based intelligent detection method for tea garden buds, characterized in that, include: Collect images of the tea garden scene and preprocess the collected images; A parallel dual-branch processing structure is constructed. The first branch integrates multiple sets of heterogeneous scale-aware feature extraction units to simultaneously capture the local texture details and global contour semantics of the buds and generate multi-scale aware feature maps. The overlapping and occluded bud regions in the multi-scale perception feature map are extracted. By mining the contextual correlation of adjacent regions, the overlapping and occluded bud regions are reconstructed to obtain an enhanced multi-dimensional feature map. The enhanced multidimensional representation map is detected and decoded through the second branch, and a feature interaction channel between cross branches is established simultaneously. In the process of feature extraction in the first branch and detection and decoding in the second branch, a multi-dimensional adaptive attention fusion technique is used to assign weights to the extracted sprout features. A cross-scale dynamic visual matching modeling approach is adopted to dynamically match and fuse feature maps corresponding to sprouts at different scales, and to perform adaptive fine-grained prediction of sprout features based on the fusion results. The related processing units for feature extraction and detection decoding in the dual-branch system are subjected to structural adaptive parameter pruning or parameter fusion, merging the multi-branch processing structure into a single-branch processing structure, and outputting the detection results.
2. The method according to claim 1, characterized in that, The preprocessing includes noise filtering, scale normalization, and illumination compensation. Among them, an adaptive filtering method is used to filter noise in the image; When the grayscale variance of the acquired image is greater than the preset grayscale variance threshold, a multi-scale filtering kernel is used to perform noise filtering. When the gray-level variance of the acquired image is less than or equal to the preset gray-level variance threshold, a single-scale filtering kernel is used to perform noise filtering. Image scaling is used to normalize the image. The scaling ratio is determined based on the proportion of the bud area in the image, and the total number of pixels in the scaled image remains constant. Illumination compensation is performed on the image by adjusting the luminance component. When the average luminance value of the image does not match the preset standard luminance value, the luminance difference between the average luminance value and the preset standard luminance value is calculated, and the luminance component of the image is adjusted according to the luminance difference.
3. The method according to claim 2, characterized in that, The feature extraction unit of the first branch consists of multiple groups, each including a heterogeneous convolutional structure. Each convolutional structure corresponds to the positional semantic features, contour geometric features, and scale-aware features of the modeling bud. When the bud scale corresponding to the feature extraction unit is less than the preset scale threshold, the number of channels in the convolution structure is increased. When the sprout scale corresponding to the feature extraction unit is greater than or equal to the preset scale threshold, the kernel size of the convolution structure is increased. The arrangement order of multiple feature extraction units is adaptively configured according to their corresponding bud scale.
4. The method according to claim 3, characterized in that, The feature interaction channel includes a forward transmission channel and a confidence-driven reverse feedback channel; The synchronous establishment of feature interaction channels across branches includes: The semantic features of the bud location, the geometric features of the contour, and the scale-aware features extracted from the first branch are transmitted to the second branch in real time through the forward transmission channel to assist in the monitoring of the mask. The detection and decoding structure information of the second branch is transmitted to the first branch through the reverse feedback channel; The feedback signal sent from the reverse feedback channel to the first branch is determined based on the confidence level of the bud in the detection and decoding results of the second branch and the preset confidence threshold. When the confidence level of the bud is greater than the preset confidence threshold, it is determined that the reverse feedback channel sends an enhanced feedback signal to the first branch. When the confidence level of the bud is less than or equal to the preset confidence threshold, the reverse feedback channel is determined to send an adjustment feedback signal to the first branch, triggering the first branch to perform local re-extraction and fine-tuning of the location, contour and scale perception features of the region.
5. The method according to claim 4, characterized in that, The multi-dimensional attention fusion includes the fusion of channel attention and spatial attention; The process employs a multi-dimensional adaptive attention fusion technique to assign weights to the extracted sprout features. The sprout feature weight assignment includes: Obtain the channel response values of the corresponding channels of the scale-aware features and contour geometric features of the bud in the feature map, as well as the gradient magnitude of the pixels; The attention weights of the corresponding channels for the sprout scale perception features and contour geometric features are dynamically calibrated based on the channel response values and preset response thresholds. The spatial attention weight of the corresponding pixel is adjusted based on the magnitude threshold of the pixel and the preset gradient magnitude threshold.
6. The method according to claim 5, characterized in that, The method employs multi-dimensional adaptive attention fusion technology to assign weights to the extracted sprout features. The sprout feature weight assignment also includes: When the channel response value of the sprout feature in the feature map is greater than the preset response threshold, the attention weight of the corresponding channel is increased. When the channel response value of the sprout feature in the feature map is less than or equal to the preset response threshold, the attention weight of the corresponding channel is suppressed. When the gradient magnitude of a pixel is greater than a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is increased. When the gradient magnitude of a pixel is less than or equal to a preset gradient magnitude threshold, the spatial attention weight of the corresponding pixel is reduced.
7. The method according to claim 6, characterized in that, The method employs a cross-scale dynamic visual matching modeling approach to dynamically match and fuse feature maps corresponding to buds at different scales, and performs adaptive fine-grained prediction of bud features based on the fusion results, including: Identify the target bud to be processed and extract all scale-sensing feature maps corresponding to the target bud from the multi-scale sensing feature pyramid. For each pair of feature maps at different scales, calculate the feature distance between them; Based on the feature distance and a preset distance threshold, determine whether the feature maps of the two scales match: When the feature distance is less than a preset distance threshold, the feature maps of the two scales are determined to be successfully matched. When the feature distance is greater than or equal to a preset distance threshold, the feature map matching at the two scales is determined to be unsuccessful. A fusion operation is performed on all the perceptual feature maps of different scales that are determined to be successfully matched.
8. The method according to claim 7, characterized in that, The adaptive parameter pruning or parameter fusion includes convolutional layer parameter integration and detection layer parameter integration; Perform convolutional layer parameter integration operation on the convolutional layer that extracts semantic features of sprout location, geometric features of contour, and scale-aware features; Perform a detection layer parameter integration operation on the detection layer that outputs the location coordinates, contour information, and scale category of the sprout; The adaptive parameter pruning or parameter fusion operation is performed on the relevant processing units of feature extraction and detection decoding in the dual-branch process to merge the multi-branch processing structure into a single-branch processing structure and output the detection result, including: The parameter quantity in the relevant processing unit for feature extraction and detection decoding is obtained, and the parameter integration operation method is determined based on the parameter quantity and the preset parameter threshold. When the number of parameters in the processing unit exceeds the preset parameter threshold, adaptive parameter pruning or parameter fusion is performed using parameter pruning. When the number of parameters in the processing unit is less than or equal to the preset parameter threshold, adaptive parameter trimming or parameter fusion is performed using parameter fusion.
9. The method according to claim 8, characterized in that, After parameter integration, the difference between the output features of the single-branch processing structure and the output features of the multi-branch processing structure is calculated, and the parameters of the single-branch processing structure are verified based on the difference and the preset difference threshold. When the difference is less than a preset difference threshold, the parameters of the single-branch processing structure are determined to be effectively integrated. When the difference is greater than or equal to the preset difference threshold, the parameters of the single-branch processing structure are determined to be invalid integration, and the adaptive parameter pruning or parameter fusion operation is re-executed.
10. A machine vision-based intelligent detection system for tea garden buds, applied to a machine vision-based intelligent detection method for tea garden buds as described in any one of claims 1-9, characterized in that, include: The image preprocessing module is used to acquire images of the tea garden scene and preprocess the acquired images; The feature extraction module is used to construct the first branch of the dual-branch parallel processing structure. It integrates multiple sets of convolutional units of heterogeneous scales to capture the positional semantics, contour geometry and scale-aware features of the sprout respectively. Each unit is arranged from small to large according to the sprout scale and dynamically adjusted according to the target scale to generate a hierarchical multi-scale-aware feature map. The feature repair module is used to extract occluded and overlapping bud regions in the multi-scale perceptual feature map, and reconstruct the semantic and structural information of the occluded parts by mining the contextual correlation of adjacent non-occluded regions, and output an enhanced multi-dimensional feature map. The interactive detection module is used to construct the second branch of the dual-branch parallel processing structure, and to detect and decode multi-dimensional feature maps, while establishing a bidirectional feature interaction channel between the two branches. The weight allocation module is used to adaptively calibrate the extracted bud features through multi-dimensional attention fusion technology during the first branch feature extraction and the second branch detection and decoding process. The feature prediction module is used to dynamically match and fuse perceptual feature maps of the same target bud at different scales using a cross-scale dynamic visual modeling approach, and to perform adaptive prediction of bud features based on the fusion results. The control integration module is used to adaptively prune or fuse the relevant processing units of feature extraction and detection decoding in the dual branches, merge the multi-branch processing structure into a single-branch processing structure, and output the final bud detection result after verifying the integration effectiveness.
