Strawberry identification and positioning method oriented to natural picking scene

By constructing a cross-scene feature set and a hierarchical transfer learning mechanism, a strawberry recognition model that is adapted to the target natural scene is generated, and the environmental adaptability and robustness of strawberry recognition and positioning in natural picking scenes is solved, and an efficient and universal visual perception solution is achieved.

CN120496059APending Publication Date: 2025-08-15泰州学院

Patent Information

Application Number
CN202510571687.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the existing technology, in the strawberry identification and positioning method in natural picking scenarios, it is difficult to adapt to multi-scale color distortion, contour fracture and texture interference in complex field environments, and a large amount of target scene data needs to be re-collected during model migration, which is inefficient in deployment.

Method used

A cross-scene feature set is constructed, and a generalized strawberry recognition model is generated through multimodal feature fusion and hierarchical transfer learning mechanisms is used, and a transfer learning is carried out in combination with the environmental dynamic features of the target natural scene, generating a dedicated recognition model that is adapted to the target natural scene, and optimizing the generalization ability of the model through incremental learning.

Benefits of technology

It significantly enhances the environmental adaptability and robustness of strawberry recognition in natural scenes, solves the problems of color distortion and contour fracture caused by light fluctuations, branches and leaves occlusion, reduces the data acquisition needs of target scenes, and improves the accuracy of fruit maturity difference identification and multi-scale occlusion positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496059A_ABST
    Figure CN120496059A_ABST
Patent Text Reader

Abstract

The invention discloses a strawberry identification and positioning method in a natural picking scene, and relates to the technical field of image identification, and the method comprises the steps: obtaining an environment parameter range in a natural scene; constructing a cross-scene feature set; training an initial neural network model based on the cross-scene feature set, and generating a universal strawberry recognition model; for a target natural scene, obtaining real-time environment parameters of the target natural scene; carrying out transfer learning based on the universal strawberry recognition model, and generating a special recognition model matched with the target natural scene; under a plurality of natural scenes, applying the special identification models matched with the natural scenes, and collecting model execution results of the scenes; and optimizing the universal strawberry recognition model through incremental learning, and improving the generalization ability of the strawberry recognition model to a new scene. The strawberry recognition method has the advantages that the environmental adaptability and robustness of strawberry recognition in a natural scene are remarkably enhanced by constructing a cross-scene feature set and a hierarchical transfer learning mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a method for identifying and locating strawberries in a natural picking scenario. Background Art

[0002] With the development of intelligent agriculture, vision-based strawberry picking robots have become a research hotspot. However, their recognition accuracy in natural scenes is significantly restricted by dynamic environmental changes. Traditional methods often rely on static image datasets in laboratory environments to train models. These methods are not robust enough to lighting fluctuations, foliage occlusion, and differences in fruit maturity, resulting in poor cross-scene generalization capabilities. Existing technologies typically use single feature extraction or fixed threshold segmentation strategies, which are difficult to adapt to the multi-scale color distortion, contour fractures, and texture interference problems in complex field environments. In addition, large amounts of target scene data must be re-collected during model migration, resulting in low deployment efficiency.

[0003] While existing solutions, such as transfer learning-based recognition frameworks, can mitigate some of the differences between scenarios, they lack a mechanism for correlating features across scenarios, leading to catastrophic forgetting during incremental model optimization. Furthermore, most methods fail to consider the dynamic mapping relationship between environmental parameters and feature space, making it impossible to achieve scenario-adaptive fine-tuning of model parameters. Building a recognition model that balances generalizability with scenario specificity and continuously integrates knowledge from multiple scenarios poses a key challenge in improving strawberry recognition and positioning accuracy in natural picking scenarios. Summary of the Invention

[0004] To solve the above technical problems, a method for identifying and locating strawberries in natural picking scenarios is provided. This technical solution solves the problem that the above-mentioned existing technologies usually adopt a single feature extraction or fixed threshold segmentation strategy, which is difficult to adapt to the multi-scale color distortion, contour fracture and texture interference in complex field environments. In addition, a large amount of target scene data needs to be re-collected during model migration, resulting in low deployment efficiency.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0006] A strawberry identification and positioning method for natural picking scenarios, comprising:

[0007] Obtaining a range of environmental parameters in a natural scene, wherein the environmental parameters include lighting conditions, shading degree, and maturity;

[0008] Set up several groups of sample environments within the range of environmental parameters in natural scenes;

[0009] Simulating a sample environment and collecting strawberry image data in the sample environment;

[0010] Extract the color, shape, and texture features of strawberries and construct a cross-scene feature set;

[0011] Train the initial neural network model based on the cross-scene feature set to generate a general strawberry recognition model;

[0012] For a target natural scene, obtaining real-time environmental parameters of the target natural scene;

[0013] Performing transfer learning based on the general strawberry recognition model, adjusting model parameters in combination with the dynamic characteristics of the environment in the target natural scene, and generating a dedicated recognition model adapted to the target natural scene;

[0014] Applying the dedicated recognition model adapted to the natural scene in multiple natural scenes, and collecting model execution results for each scene;

[0015] Based on the model execution results of each scenario, the general strawberry recognition model is optimized through incremental learning to improve its generalization ability for new scenarios.

[0016] Preferably, extracting the color, shape and texture features of strawberries and constructing a cross-scene feature set specifically includes:

[0017] Convert the strawberry image data into the HSV color space, and select pixel areas with a hue higher than a preset threshold and a saturation higher than a first threshold as candidate strawberry areas;

[0018] Perform edge detection on the candidate strawberry area, extract the shape contour and calculate its similarity with the standard strawberry template, and retain the contours with similarity higher than the second threshold;

[0019] Analyze the texture complexity of the candidate area using the local binary pattern algorithm and select texture features with a complexity lower than a third threshold;

[0020] The color, shape and texture features are encapsulated into a triplet feature set to obtain a cross-scene feature set.

[0021] Preferably, performing transfer learning based on the universal strawberry recognition model, adjusting model parameters in combination with the dynamic characteristics of the environment in the target natural scene, and generating a dedicated recognition model adapted to the target natural scene specifically include:

[0022] Determine the actual environmental parameter range of the target natural scene based on the real-time environmental parameters of the target natural scene;

[0023] Extracting a targeted scene feature set adapted to the target natural scene from the cross-scene feature set based on the actual environmental parameter range of the target natural scene;

[0024] Based on the targeted scene feature set, targeted reinforcement learning is performed on the general strawberry recognition model to obtain a dedicated recognition model adapted to the target natural scene.

[0025] Preferably, the method of performing targeted reinforcement learning on the universal strawberry recognition model based on the targeted scene feature set to obtain a dedicated recognition model adapted to the target natural scene specifically includes:

[0026] Freeze the feature extraction layer parameters of the general strawberry recognition model, and perform intensive training and adjustment on the top-level parameters of the general strawberry recognition model based on the targeted scene feature set to obtain an initial dedicated recognition model;

[0027] Based on the application data of the initial dedicated recognition model in the target natural scene, the feature extraction layer of the general strawberry recognition model is gradually unfrozen, and the initial dedicated recognition model is trained through feedback learning based on the application data of the initial dedicated recognition model in the target natural scene to obtain a dedicated recognition model adapted to the target natural scene.

[0028] Preferably, applying the dedicated recognition model adapted to the natural scene in multiple natural scenes and collecting the model execution results for each scene specifically includes:

[0029] Based on the model execution results, the image data collected during the actual application process is obtained, and the recognition results corresponding to the image data are obtained based on the model execution results;

[0030] An incremental sample dataset is constructed using image data as input features and the recognition results corresponding to the image data as output features.

[0031] Preferably, the method of optimizing the universal strawberry recognition model through incremental learning based on the model execution results of each scenario to improve its generalization ability for new scenarios specifically includes:

[0032] Based on the model execution results in all scenarios, determine the interval emphasis density of each environmental parameter in the natural picking scenario;

[0033] Based on the interval emphasis density of each environmental parameter, several sample data sets are selected from the incremental sample data set as incremental learning samples, and when selecting the incremental learning samples, it is ensured that the interval distribution of all samples in each environmental parameter matches the interval emphasis density of the environmental parameter;

[0034] Incremental learning optimization is performed on the general strawberry recognition model based on the determined incremental learning samples.

[0035] Preferably, performing incremental learning optimization on the universal strawberry recognition model based on the determined incremental learning samples specifically includes:

[0036] Based on cross entropy loss, a loss function for a general strawberry recognition model is constructed;

[0037] Construct several regularized loss functions based on the loss function of the general strawberry recognition model;

[0038] The incremental learning samples are divided into a training set and a first test set in a ratio of 4:1;

[0039] Using the test set, the general strawberry recognition model is incrementally trained based on each regularized loss function to obtain an enhanced general strawberry recognition model;

[0040] Based on the number of samples in the first test set, a corresponding number of cross-scene feature samples are selected from the cross-scene feature set as the second test set;

[0041] Based on the comprehensive loss performance of each enhanced general strawberry recognition model in the first test set and the second test set, the final general strawberry recognition model is determined.

[0042] Preferably, the loss function based on the universal strawberry recognition model constructs several regularized loss functions:

[0043] The expression of the regularized loss function is:

[0044]

[0045] Among them, μ1 is the coefficient of L1 regularization term, μ2 is the coefficient of L2 regularization term, θ j is the jth parameter of the neural network of the general strawberry recognition model, L(θ) is the loss function of the general strawberry recognition model, and L'(θ) is the regularization loss function;

[0046] Within the set search range of μ1 and μ2, several groups of μ1-μ2 combinations are obtained, and a regularized loss function is obtained based on each group of μ1-μ2 combinations.

[0047] Preferably, determining the final universal strawberry recognition model based on the comprehensive loss performance of each enhanced universal strawberry recognition model in the first test set and the second test set specifically includes:

[0048] Calculate the loss values of the enhanced universal strawberry recognition model on the first test set and the second test set based on the loss function of the universal strawberry recognition model, respectively, and record them as the first loss value and the second loss value;

[0049] Perform weighted summation based on the first loss value and the second loss value to obtain a comprehensive loss value;

[0050] The enhanced universal strawberry recognition model corresponding to the minimum comprehensive loss value is selected as the final universal strawberry recognition model.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] This invention significantly enhances the environmental adaptability and robustness of strawberry recognition in natural scenes by constructing a cross-scene feature set and a hierarchical transfer learning mechanism. Based on a multimodal feature fusion strategy, it effectively solves the problems of color distortion and contour breakage caused by illumination fluctuations and occlusion by branches and leaves. Through the collaborative optimization of parameter freezing and incremental learning, it achieves scene adaptive fine-tuning while maintaining the versatility of the model, significantly reducing the data collection requirements for the target scene. Combined with dynamic matching of environmental parameters and a regularized constraint mechanism, it significantly improves the accuracy of fruit maturity difference recognition and multi-scale occlusion positioning in complex environments, while strengthening the model's knowledge inheritance ability during cross-scene migration, providing a more efficient and universal visual perception solution for agricultural picking robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a flow chart of the strawberry identification and positioning method proposed by the present invention in a natural picking scenario;

[0054] Figure 2 A flow chart of a method for generating a dedicated recognition model adapted to the target natural scene in the present invention;

[0055] Figure 3 Flowchart of the method for obtaining a dedicated recognition model adapted to a target natural scene in the present invention;

[0056] Figure 4 This is a flow chart of the method for collecting model execution results for each scenario in the present invention;

[0057] Figure 5 This is a flow chart of a method for optimizing the universal strawberry recognition model through incremental learning in the present invention;

[0058] Figure 6 A flow chart of the method for performing incremental learning optimization on a universal strawberry recognition model in the present invention;

[0059] Figure 7 This is a flow chart of the method for determining the final universal strawberry recognition model in the present invention. DETAILED DESCRIPTION

[0060] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.

[0061] Reference Figure 1 As shown, a strawberry recognition and positioning method for natural picking scenarios includes:

[0062] Obtain the range of environmental parameters in natural scenes, including lighting conditions, occlusion level, and maturity;

[0063] Determining environmental parameter ranges requires long-term observation and statistical analysis of actual farmland scenarios. For example, light sensors can be used to quantify the range of light intensity at different times of day, image segmentation techniques can be used to assess the proportion of area obscured by branches and leaves, and maturity grading criteria, such as color gradients and fruit firmness, can be used to define maturity intervals. The boundary values of the parameter ranges must encompass extremes of typical natural conditions, such as strong midday sunlight, diffuse reflections on overcast days, and partial or complete obscuration, to ensure comprehensiveness in subsequent sample environment settings.

[0064] Set up several groups of sample environments within the range of environmental parameters in natural scenes;

[0065] The sample environment sets were designed using orthogonal experimental methods or Latin hypercube sampling to ensure that different environmental parameter combinations, such as low light + high occlusion and medium light + medium maturity, cover the multidimensional feature space. Each sample environment set was implemented using controllable experimental devices, such as adjustable light sources and occlusion simulation frames, to accurately replicate the parameter combinations of natural scenes and provide standardized conditions for data collection.

[0066] Simulating a sample environment and collecting strawberry image data in the sample environment;

[0067] Image acquisition requires the use of a multispectral camera or depth sensor, capturing multimodal data of strawberries, including RGB and near-infrared, under different parameter combinations, while also recording environmental parameter labels. To enhance data diversity, dynamic interference can be introduced, such as simulating wind-blown branches and gradual changes in lighting. Data augmentation techniques, such as random rotation and noise injection, can be used to expand the sample size and ensure full representation of cross-scene features.

[0068] Extract the color, shape, and texture features of strawberries and construct a cross-scene feature set;

[0069] Specifically include:

[0070] Convert the strawberry image data into the HSV color space, and select pixel areas with a hue higher than a preset threshold and a saturation higher than a first threshold as candidate strawberry areas;

[0071] Perform edge detection on the candidate strawberry area, extract the shape contour and calculate its similarity with the standard strawberry template, and retain the contours with similarity higher than the second threshold;

[0072] Analyze the texture complexity of the candidate area using the local binary pattern algorithm and select texture features with a complexity lower than a third threshold;

[0073] The color, shape and texture features are encapsulated into a triplet feature set to obtain a cross-scene feature set.

[0074] Specifically, an operable embodiment is proposed below:

[0075] Perform color space conversion on the strawberry image data and extract pixel areas with hue (H) greater than 0.9 and saturation (S) higher than 0.6 in the HSV channel as candidate strawberry areas;

[0076] The edge detection algorithm is used to extract the shape contour of the candidate area, and its similarity with the standard strawberry template is calculated, and the contours with similarity higher than 0.8 are retained;

[0077] The texture complexity of the candidate area is analyzed by the local binary pattern (LBP) algorithm, and texture features with complexity lower than the threshold T are screened;

[0078] The color, shape and texture features are encapsulated into a triple feature set, denoted as F, where F = {(H, S), E, L}, E is the similarity with the standard strawberry template, and L is the complexity.

[0079] Color features are constructed using histogram statistics and dominant color clustering in HSV space. Shape features are extracted through edge detection (such as the Canny operator) and then Fourier descriptors or Hu moments are calculated. Texture features quantify surface roughness using local binary patterns (LBP) or gray-level co-occurrence matrices (GLCMs). When constructing the feature set, normalization is performed, and principal component analysis (PCA) is used to reduce redundancy, resulting in a lightweight, cross-scene feature representation.

[0080] Train the initial neural network model based on the cross-scene feature set to generate a general strawberry recognition model;

[0081] For a target natural scene, obtaining real-time environmental parameters of the target natural scene;

[0082] Transfer learning is performed based on the general strawberry recognition model. The model parameters are adjusted based on the dynamic characteristics of the environment in the target natural scene to generate a dedicated recognition model adapted to the target natural scene.

[0083] Transfer learning employs a progressive fine-tuning strategy: first, the feature extraction layers are frozen, and only the fully connected layers are fine-tuned to adapt to the data distribution of the target scene. Domain adversarial training (e.g., DANN) is then used to align the feature spaces of the source and target scenes, mitigating performance degradation caused by environmental differences. Finally, an attention mechanism dynamically weights cross-scene and scene-specific features to achieve an adaptive balance of model parameters.

[0084] Apply specialized recognition models adapted to natural scenarios in multiple natural scenes and collect model execution results for each scene;

[0085] Based on the model execution results of each scenario, the general strawberry recognition model is optimized through incremental learning to improve its generalization ability for new scenarios.

[0086] During the optimization process, multiple scene nodes are allowed to collaboratively train general-purpose models while protecting local data privacy, ultimately achieving distributed and continuous evolution of the model's generalization capabilities.

[0087] Reference Figure 2 As shown in the figure, transfer learning is performed based on the general strawberry recognition model. In combination with the dynamic characteristics of the environment in the target natural scene, the model parameters are adjusted to generate a dedicated recognition model adapted to the target natural scene. Specifically, the following steps are involved:

[0088] Determine the actual environmental parameter range of the target natural scene based on the real-time environmental parameters of the target natural scene;

[0089] Extracting a targeted scene feature set adapted to the target natural scene from the cross-scene feature set based on the actual environmental parameter range of the target natural scene;

[0090] Based on the targeted scene feature set, targeted reinforcement learning is performed on the general strawberry recognition model to obtain a dedicated recognition model adapted to the target natural scene.

[0091] By dynamically matching the target scene's environmental parameters with the cross-scene feature library, the strawberry recognition model achieves efficient and accurate adaptation. Targeted feature sets are screened based on the real-time environmental parameter range, effectively focusing on key discriminant information in the target scene, such as chromatic aberration compensation under strong light and contour restoration under dense occlusion, significantly improving the scene relevance of feature representation. Through a reinforcement learning mechanism, the general model is targeted and optimized, retaining cross-scene general knowledge while injecting target environment specificity, allowing the model to quickly adapt to changes in local lighting distribution, occlusion patterns, and maturity gradients. This reduces reliance on target scene annotated data while ensuring the stability and accuracy of identification and positioning in complex farmland environments, providing a flexible and low-cost model deployment solution for diverse natural picking scenarios.

[0092] Reference Figure 3 As shown in the figure, based on the targeted scene feature set, the general strawberry recognition model is subjected to targeted reinforcement learning, and a dedicated recognition model adapted to the target natural scene is obtained, which specifically includes:

[0093] Freeze the feature extraction layer parameters of the general strawberry recognition model, and perform intensive training and adjustment on the top-level parameters of the general strawberry recognition model based on the targeted scene feature set to obtain an initial dedicated recognition model;

[0094] Based on the application data of the initial dedicated recognition model in the target natural scene, the feature extraction layer of the general strawberry recognition model is gradually unfrozen, and the initial dedicated recognition model is trained through feedback learning based on the application data of the initial dedicated recognition model in the target natural scene to obtain a dedicated recognition model adapted to the target natural scene.

[0095] A layered migration and gradual unfreezing strategy is adopted to achieve a dynamic balance between common feature inheritance and scene feature mining during the model optimization process. By freezing the feature extraction layer, common knowledge across scenes is retained, avoiding the risk of overfitting due to insufficient target scene data; the enhanced training of top-level parameters quickly adapts to local feature patterns in the target environment, such as occlusion form and maturity distribution, significantly shortening the model convergence time. Subsequently, the underlying parameters are gradually unfrozen and combined with feedback learning, so that the feature extraction layer can adaptively refine its sensitivity to the lighting conditions and texture details of the target scene while maintaining its original generalization ability. This prevents catastrophic forgetting and enhances the model's accuracy in analyzing complex environmental changes. Ultimately, a dedicated recognition model that balances stability and specificity is formed, significantly reducing the resource consumption of model iterative updates.

[0096] Reference Figure 4 As shown, a dedicated recognition model adapted to the natural scene is applied in multiple natural scenes, and the model execution results of each scene are collected, including:

[0097] Based on the model execution results, the image data collected during the actual application process is obtained, and the recognition results corresponding to the image data are obtained based on the model execution results;

[0098] An incremental sample dataset is constructed using image data as input features and the recognition results corresponding to the image data as output features.

[0099] Through the feedback loop of model execution results, a self-supervised incremental learning mechanism is constructed, which significantly reduces the cost of manual labeling and improves the efficiency of continuous model optimization. Pseudo-labeled samples are automatically generated using image data from actual scenes and model prediction results. Highly reliable recognition results are screened as training labels through confidence thresholds to achieve simultaneous automation of data collection and labeling. The incremental sample dataset fully integrates the dynamic environmental characteristics of the target scene, such as lighting gradients and occlusion morphological evolution, enabling the model to capture long-tail distributions that are difficult to reproduce in traditional static datasets. At the same time, the difference in feature distribution between the training phase and the application phase is aligned through domain adaptation methods, effectively alleviating performance degradation caused by environmental parameter drift, providing high-quality data support for the closed-loop self-evolution of the model, and ensuring the long-term stability of the recognition system under complex variables such as seasonal changes and cropping pattern adjustments.

[0100] Reference Figure 5As shown in the figure, based on the model execution results in various scenarios, the general strawberry recognition model is optimized through incremental learning to improve its generalization ability for new scenarios. Specifically, the following are performed:

[0101] Based on the model execution results in all scenarios, determine the interval emphasis density of each environmental parameter in the natural picking scenario;

[0102] Based on the interval emphasis density of each environmental parameter, several sample data sets are selected from the incremental sample data set as incremental learning samples. When selecting incremental learning samples, ensure that the interval distribution of all samples in each environmental parameter matches the interval emphasis density of the environmental parameter;

[0103] Incremental learning optimization is performed on the general strawberry recognition model based on the determined incremental learning samples.

[0104] Through an incremental learning mechanism that focuses on density-driven environmental parameter intervals, the model optimization direction is precisely aligned with the dynamic characteristics of natural scenes. Based on the results of multi-scenario execution, key intervals of environmental parameter distribution are mined, such as high occlusion and low light combinations, and specific maturity thresholds. Incremental samples that match the actual needs of the scene are dynamically screened to avoid the problem of key area feature dilution caused by traditional random sampling. Through a parameter interval density matching strategy, incremental learning samples cover high-frequency and edge scenes in the real environment in terms of lighting, occlusion, and maturity, enhancing the model's ability to model complex long-tail distributions. Combined with adaptive weight allocation and knowledge distillation technology, a dynamic balance between cross-scenario common features and local environment-specific features is maintained during the optimization process, significantly improving the model's robustness in extreme or gradual environments. At the same time, computational redundancy during incremental training is reduced, providing an efficient and stable model iteration path for the continuous environmental changes in agricultural picking scenes.

[0105] Reference Figure 6 As shown in FIG, the incremental learning optimization of the general strawberry recognition model based on the determined incremental learning samples specifically includes:

[0106] Based on cross entropy loss, a loss function for a general strawberry recognition model is constructed;

[0107] Construct several regularized loss functions based on the loss function of the general strawberry recognition model;

[0108] The incremental learning samples are divided into a training set and a first test set in a ratio of 4:1;

[0109] Using the test set, the general strawberry recognition model is incrementally trained based on each regularized loss function to obtain an enhanced general strawberry recognition model;

[0110] Based on the number of samples in the first test set, a corresponding number of cross-scene feature samples are selected from the cross-scene feature set as the second test set;

[0111] Based on the comprehensive loss performance of each enhanced general strawberry recognition model in the first test set and the second test set, the final general strawberry recognition model is determined.

[0112] Through the regularization loss optimization mechanism driven by dual test sets, the synergistic improvement of model generalization ability and scene adaptability is achieved. The basic objective function is constructed based on cross-entropy loss, combined with regularization constraints to effectively suppress the risk of overfitting in incremental learning; the dynamic partitioning strategy of the training set and the first test set is used to ensure the convergence stability of the model on the incremental data of the target scene. The second test set is constructed by a cross-scene feature set, forcing the model to take into account both the retention of historical scene knowledge and the fusion of new scene features during the optimization process, avoiding cross-scene performance degradation caused by incremental training. Finally, based on the adaptive model screening strategy of the comprehensive loss of dual test sets, the weight distribution between the model's local environment adaptation and global generalization ability is automatically balanced, forming a robust model architecture that can cope with complex conditions such as illumination changes and occlusion pattern migration, significantly reducing the cost of manual intervention in model tuning, and providing a highly reliable and self-evolving visual recognition solution for agricultural picking scenarios.

[0113] Based on the loss function of the general strawberry recognition model, several regularized loss functions are constructed as follows:

[0114] The expression of the regularized loss function is:

[0115]

[0116] Among them, μ1 is the coefficient of L1 regularization term, μ2 is the coefficient of L2 regularization term, θ j is the jth parameter of the neural network of the general strawberry recognition model, L(θ) is the loss function of the general strawberry recognition model, and L'(θ) is the regularization loss function;

[0117] Within the set search range of μ1 and μ2, several groups of μ1-μ2 combinations are obtained, and a regularized loss function is obtained based on each group of μ1-μ2 combinations.

[0118] Specifically, the μ1-μ2 combination is determined as follows:

[0119] Within the set search range of μ1, several values are taken according to the search step size to form the search value set of μ1. In the same way, several values are taken within the search range of μ2 to form the search value set of μ2. Then, the elements in the search value set of μ1 and the search value set of μ2 are arbitrarily combined in pairs to obtain several groups of μ1-μ2 search value combinations, and each regularized loss function is trained to enhance the universal strawberry recognition model.

[0120] Through the automated search and collaborative optimization mechanism of regularization parameter combinations, the dynamic trade-off between model complexity and generalization performance is effectively balanced. Based on a gridded parameter space traversal strategy, the combined effects of L1 sparsity constraints and L2 smoothness constraints are systematically explored to avoid the subjective bias of manual parameter adjustment. Through exhaustive pairwise combinations, diverse regularization loss functions are generated to simultaneously suppress the model's tendency to overfit to incremental data and redundant memory of cross-scene features during incremental learning, thereby enhancing the robust expression of model weight parameters. Combining parallel training with multiple loss functions and dual test set validation, the optimal regularization combination that adapts to the incremental feature distribution of the target scene while maintaining historical knowledge inheritance is dynamically selected, significantly improving the model's parameter convergence stability under complex conditions such as illumination heterogeneity and occlusion polymorphism, providing an efficient and interpretable regularization constraint paradigm for the continuous self-optimization of agricultural vision models.

[0121] Reference Figure 7 As shown in the figure, based on the comprehensive loss performance of each enhanced universal strawberry recognition model in the first test set and the second test set, the final universal strawberry recognition model is determined to include:

[0122] Calculate the loss values of the enhanced universal strawberry recognition model on the first test set and the second test set based on the loss function of the universal strawberry recognition model, respectively, and record them as the first loss value and the second loss value;

[0123] Perform weighted summation based on the first loss value and the second loss value to obtain a comprehensive loss value;

[0124] The specific comprehensive loss value is calculated using the following formula:

[0125] L=w1L1+w2L2

[0126] Among them, is the comprehensive loss value, is the first loss value, is the second loss value, and is the weight value. On the basis of satisfying w1+w2=1, as the number of natural scenes applied by the model increases, the value of w1 gradually increases.

[0127] The enhanced universal strawberry recognition model corresponding to the minimum comprehensive loss value is selected as the final universal strawberry recognition model.

[0128] Through a dynamic weighted dual-test set evaluation mechanism, an intelligent balance is achieved between the ability to adapt to new scenarios and the generalization performance across scenarios during the incremental optimization process of the model. Based on the dual verification of the first test set (incremental data) and the second test set (cross-scenario features), the model is forced to establish a constraint boundary between local scene adaptation and global knowledge inheritance to prevent cross-scenario performance degradation caused by incremental learning. Through a gradual adjustment strategy of the weight value w1, the model focuses on the target scene in the early stage and converges quickly. As the number of application scenarios accumulates, the emphasis on the distribution of scene environments is gradually increased. Combined with a comprehensive loss minimization screening mechanism, the optimal balance point between scene specificity and versatility in the model parameter space is automatically located, significantly improving the model's anti-interference ability and long-term stability in complex and changeable natural picking environments such as seasonal light migration and occlusion pattern evolution, providing an adaptive optimization path for the multi-scenario co-evolution of agricultural vision models.

[0129] In summary, the advantages of the present invention are: by constructing a cross-scene feature set and a hierarchical transfer learning mechanism, the environmental adaptability and robustness of strawberry recognition in natural scenes are significantly enhanced. Based on a multimodal feature fusion strategy, the color distortion and contour breakage problems caused by illumination fluctuations and occlusion of branches and leaves are effectively solved; through the coordinated optimization of parameter freezing and incremental learning, scene adaptive fine-tuning is achieved while maintaining the versatility of the model, greatly reducing the data collection requirements of the target scene; combined with the dynamic matching of environmental parameters and the regularization constraint mechanism, the accuracy of fruit maturity difference recognition and multi-scale occlusion positioning in complex environments is significantly improved, while the knowledge inheritance ability of the model during cross-scene migration is strengthened, providing a more efficient and universal visual perception solution for agricultural picking robots.

[0130] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions merely illustrate the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.

Claims

1. A strawberry identification and positioning method for natural picking scenes, characterized in that: include: Obtaining a range of environmental parameters in a natural scene, wherein the environmental parameters include lighting conditions, shading degree, and maturity; Set up several groups of sample environments within the range of environmental parameters in natural scenes; Simulating a sample environment and collecting strawberry image data in the sample environment; Extract the color, shape, and texture features of strawberries and construct a cross-scene feature set; Train the initial neural network model based on the cross-scene feature set to generate a general strawberry recognition model; For a target natural scene, obtaining real-time environmental parameters of the target natural scene; Performing transfer learning based on the general strawberry recognition model, adjusting model parameters in combination with the dynamic characteristics of the environment in the target natural scene, and generating a dedicated recognition model adapted to the target natural scene; Applying the dedicated recognition model adapted to the natural scene in multiple natural scenes, and collecting model execution results for each scene; Based on the model execution results of each scenario, the general strawberry recognition model is optimized through incremental learning to improve its generalization ability for new scenarios.

2. The strawberry identification and positioning method for natural picking scenes according to claim 1, characterized in that: Extracting the color, shape, and texture features of strawberries and constructing a cross-scene feature set specifically includes: Convert the strawberry image data into the HSV color space, and select pixel areas with a hue higher than a preset threshold and a saturation higher than a first threshold as candidate strawberry areas; Perform edge detection on the candidate strawberry area, extract the shape contour and calculate its similarity with the standard strawberry template, and retain the contours with similarity higher than the second threshold; Analyze the texture complexity of the candidate area using the local binary pattern algorithm and select texture features with a complexity lower than a third threshold; The color, shape and texture features are encapsulated into a triplet feature set to obtain a cross-scene feature set.

3. The strawberry identification and positioning method for natural picking scenes according to claim 2, characterized in that: The transfer learning based on the universal strawberry recognition model, combining the dynamic characteristics of the environment in the target natural scene, adjusting the model parameters, and generating a dedicated recognition model adapted to the target natural scene specifically include: Determine the actual environmental parameter range of the target natural scene based on the real-time environmental parameters of the target natural scene; Extracting a targeted scene feature set adapted to the target natural scene from the cross-scene feature set based on the actual environmental parameter range of the target natural scene; Based on the targeted scene feature set, targeted reinforcement learning is performed on the general strawberry recognition model to obtain a dedicated recognition model adapted to the target natural scene.

4. The strawberry identification and positioning method for natural picking scenes according to claim 3, characterized in that: The method of performing targeted reinforcement learning on the universal strawberry recognition model based on the targeted scene feature set to obtain a dedicated recognition model adapted to the target natural scene specifically includes: Freeze the feature extraction layer parameters of the general strawberry recognition model, and perform intensive training and adjustment on the top-level parameters of the general strawberry recognition model based on the targeted scene feature set to obtain an initial dedicated recognition model; Based on the application data of the initial dedicated recognition model in the target natural scene, the feature extraction layer of the general strawberry recognition model is gradually unfrozen, and the initial dedicated recognition model is trained through feedback learning based on the application data of the initial dedicated recognition model in the target natural scene to obtain a dedicated recognition model adapted to the target natural scene.

5. The strawberry identification and positioning method for natural picking scenes according to claim 4, characterized in that: The applying the dedicated recognition model adapted to the natural scene in multiple natural scenes and collecting the model execution results of each scene specifically includes: Based on the model execution results, the image data collected during the actual application process is obtained, and the recognition results corresponding to the image data are obtained based on the model execution results; An incremental sample dataset is constructed using image data as input features and the recognition results corresponding to the image data as output features.

6. The strawberry identification and positioning method for natural picking scenarios according to claim 5, characterized in that: The execution results of the model based on each scenario are used to optimize the general strawberry recognition model through incremental learning to improve its generalization ability for new scenarios. Specifically, the following steps are performed: Based on the model execution results in all scenarios, determine the interval emphasis density of each environmental parameter in the natural picking scenario; Based on the interval emphasis density of each environmental parameter, several sample data sets are selected from the incremental sample data set as incremental learning samples, and when selecting the incremental learning samples, it is ensured that the interval distribution of all samples in each environmental parameter matches the interval emphasis density of the environmental parameter; Incremental learning optimization is performed on the general strawberry recognition model based on the determined incremental learning samples.

7. The strawberry identification and positioning method for natural picking scenarios according to claim 6, characterized in that: The incremental learning optimization of the universal strawberry recognition model based on the determined incremental learning samples specifically includes: Based on cross entropy loss, a loss function for a general strawberry recognition model is constructed; Construct several regularized loss functions based on the loss function of the general strawberry recognition model; The incremental learning samples are divided into a training set and a first test set in a ratio of 4:1; Using the test set, the general strawberry recognition model is incrementally trained based on each regularized loss function to obtain an enhanced general strawberry recognition model; Based on the number of samples in the first test set, a corresponding number of cross-scene feature samples are selected from the cross-scene feature set as the second test set; Based on the comprehensive loss performance of each enhanced general strawberry recognition model in the first test set and the second test set, the final general strawberry recognition model is determined.

8. The strawberry identification and positioning method for natural picking scenarios according to claim 7, characterized in that: The loss function based on the universal strawberry recognition model constructs several regularized loss functions: The expression of the regularized loss function is: Among them, μ1 is the coefficient of L1 regularization term, μ2 is the coefficient of L2 regularization term, θ j is the jth parameter of the neural network of the general strawberry recognition model, L(θ) is the loss function of the general strawberry recognition model, and L'(θ) is the regularization loss function; Within the set search range of μ1 and μ2, several groups of μ1-μ2 combinations are obtained, and a regularized loss function is obtained based on each group of μ1-μ2 combinations.

9. The strawberry identification and positioning method for natural picking scenarios according to claim 8, characterized in that: The method of determining the final universal strawberry recognition model based on the comprehensive loss performance of each enhanced universal strawberry recognition model in the first test set and the second test set specifically includes: Calculate the loss values of the enhanced universal strawberry recognition model on the first test set and the second test set based on the loss function of the universal strawberry recognition model, respectively, and record them as the first loss value and the second loss value; Perform weighted summation based on the first loss value and the second loss value to obtain a comprehensive loss value; The enhanced universal strawberry recognition model corresponding to the minimum comprehensive loss value is selected as the final universal strawberry recognition model.

Citation Information

Patent Citations

  • Method, device and apparatus for object recognition of audio data, and storage medium

    CN109410956A

  • Binocular stereoscopic vision detection method for appearance quality of crisp strawberries

    CN115545383A

  • Fast migration method of strategy in uncertain scene based on neural network optimization

    CN118674012A

  • Strawberry maturity rapid discrimination method and system based on machine learning

    CN119206712A

  • Machine vision detection method based on deep learning

    CN119495422A

Cited By

  • Medicine filling dose automatic identification method and system

    CN121436091A