Net cover specification dynamic matching method based on multi-dimensional strawberry size distribution

By using a dynamic matching method for the specifications of the netting based on the multi-dimensional size distribution of strawberries and deep learning technology to process strawberry dual-view images and weight data, the problem of poor packaging protection caused by fruit shape differences in traditional strawberry packaging methods is solved. This achieves efficient and precise strawberry packaging, reducing damage and costs.

CN122020200AInactive Publication Date: 2026-05-12GUANGXI HAORONG AGRICULTURAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGXI HAORONG AGRICULTURAL TECHNOLOGY CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional strawberry packaging methods are difficult to adapt to differences in fruit shape, resulting in poor packaging protection and easy damage to strawberries during sorting, as well as high costs.

Method used

A dynamic matching method for netting specifications based on multi-dimensional strawberry size distribution is adopted. By collecting strawberry dual-view images and weight data, deep learning technology is used for feature extraction and fusion to dynamically match netting specifications. This includes viewpoint feature calibration, fruit shape contour enhancement, three-dimensional morphology feature extraction, and heterogeneous feature fusion, avoiding the sorting process and accurately matching strawberry shape.

Benefits of technology

Reduces damage to strawberries during sorting, improves packaging protection, adapts to various fruit shapes, reduces labor costs, increases operational efficiency, accurately matches netting specifications, and reduces spoilage during transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020200A_ABST
    Figure CN122020200A_ABST
Patent Text Reader

Abstract

The invention discloses a net cover specification dynamic matching method based on multi-dimensional strawberry size distribution. The method comprises the steps that A1, strawberry double-view-angle images and strawberry weight data are collected and preprocessed respectively; a2, respectively extracting initial morphological features, and then carrying out dual-view feature fusion to obtain dual-view fusion features; a3, inputting the dual-view fusion features into a fruit shape contour enhancement network to obtain contour enhancement features; a4, extracting three-dimensional morphological characteristics of the strawberries; a5, strawberry weight features are extracted, heterogeneous feature fusion is carried out in combination with strawberry three-dimensional morphological features, and strawberry fusion features are obtained; a6, initial net sleeve specification features and final net sleeve specification features are extracted; and A7, according to the final net cover specification features, target net cover specification labels are extracted, and finally the net cover packaging operation of the strawberries is completed. The method can solve the problem that a traditional packaging method is difficult to adapt to strawberry shape differences, and consequently the packaging protection effect is poor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fruit packaging technology, and in particular to a method for dynamically matching the specifications of mesh sleeves based on the multi-dimensional size distribution of strawberries. Background Technology

[0002] Strawberries, as a fruit with a delicate and easily damaged skin, require careful packaging with netting during transportation and storage to prevent damage. The core of this process is to use netting of the appropriate size and shape to cushion and restrain the strawberries, reducing friction and compression and thus lowering the spoilage rate. The general process typically includes strawberry harvesting, pre-treatment, size matching, netting installation, and subsequent boxing. However, in practice, due to the significant differences in strawberry shapes—from the standard conical to the oblate and other irregular shapes—and the varying sizes and three-dimensional forms of individual strawberries, achieving a proper size fit between the netting and the strawberries presents several challenges.

[0003] Traditional methods for solving the aforementioned compatibility issues mainly involve adding a strawberry sorting and classification step before matching the netting. Strawberries are divided into different grades based on factors such as fruit diameter and shape, either manually or using sorting equipment. Strawberries of the same grade are then matched with netting of the same size. However, this method has several drawbacks. First, the strawberries are easily damaged by bumping and squeezing during sorting, increasing the risk of spoilage later. Second, the additional sorting process significantly lengthens the production line operation time at the production site, increasing labor and equipment costs. Even after classification, strawberries of the same grade still exhibit significant differences in shape. Using uniform netting can lead to problems such as flat strawberries not fitting snugly, being damaged by shaking during transportation, and conical strawberries being crushed by the netting, resulting in flesh damage. Furthermore, traditional classification often relies on a single dimension of fruit diameter, which cannot accurately reflect the differences in the three-dimensional shape of strawberries. Some irregularly shaped strawberries are difficult to classify into existing categories, requiring manual matching of netting. This not only results in low operational efficiency but also increases the risk of improper netting fit due to human error, ultimately affecting the packaging's protective effect.

[0004] With the expansion of deep learning technology in agricultural product processing, some solutions have attempted to use deep learning to assist in strawberry netting matching. The general approach is to acquire two-dimensional image information of strawberries through image acquisition equipment, and then use deep learning models to extract features from the images to obtain some morphological or size features of the strawberries for netting matching. However, such solutions still have drawbacks: they mostly extract single or a few dimensional features such as fruit diameter based on two-dimensional images, which cannot accurately represent the three-dimensional shape of strawberries and are difficult to adapt to the complex and diverse fruit shape differences of strawberries. As a result, it is still necessary to rely on the previous sorting and classification process to help improve the compatibility. This fails to solve the problems of sorting damage, high cost, and difficulty in adapting irregularly shaped fruits, and it is difficult to fully guarantee the packaging protection effect. Summary of the Invention

[0005] In view of this, the present invention aims to provide a method for dynamically matching the specifications of netting based on the multi-dimensional strawberry size distribution, so as to solve the problem that traditional packaging methods are difficult to adapt to the differences in strawberry shape, resulting in poor packaging protection.

[0006] A method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution includes: A1: Acquire strawberry dual-view images and strawberry weight data, and preprocess them separately to obtain preprocessed strawberry dual-view images and preprocessed strawberry weight data; A2: Based on the preprocessed strawberry dual-view images, extract the initial morphological features for each view, and then perform dual-view feature fusion to obtain dual-view fused features; A3: Input the dual-view fusion features into the fruit shape contour enhancement network to enhance and optimize the contour features, and obtain the contour enhancement features; A4: Extract the 3D morphological features of the strawberry based on the contour enhancement features; A5: Based on the preprocessed strawberry weight data, extract the strawberry weight features, and then combine them with the strawberry three-dimensional morphology features to perform heterogeneous feature fusion to obtain the strawberry fused features; A6: Based on the strawberry fusion characteristics, extract the initial netting specification features and the final netting specification features; A7: Based on the final netting specification characteristics, feature mapping is completed through a multilayer perceptron to obtain netting specification classification features. Then, the target netting specification labels are extracted through the Softmax and Argmax functions, and finally, the netting packaging operation of strawberries is completed.

[0007] Furthermore, step A1 also includes: A11: Acquires dual-view images of strawberries using an industrial camera, with the data type being a color pixel matrix, including two sets of sub-view data: a top view and a side view of the strawberry; simultaneously, acquires strawberry weight data using a weighing sensor, with the data type being numerical data. A12: The strawberry dual-view image data is preprocessed by Gaussian filtering for noise reduction and bilinear interpolation for resolution unification to obtain the preprocessed strawberry dual-view image. A13: The strawberry weight data was preprocessed using a three-fold standard deviation constant removal and maximum / minimum normalization method to obtain the preprocessed strawberry weight data.

[0008] Furthermore, step A2 also includes: A21: Based on the preprocessed strawberry dual-view images, extract the initial morphological features for each viewpoint; A22: Based on the initial morphological features of the two perspectives, perform dual-view feature fusion to obtain dual-view fused features; The initial morphological feature extraction process includes: processing the single-view image through a convolutional layer, batch normalization, and LeakyReLU function to obtain the original image features; constructing a view feature calibration function, processing the original image features through batch normalization, a 1×1 convolutional layer, adding a calibration bias term, and the Sigmoid function, and then performing a Hadamard product operation on the original image features and the result of the view feature calibration function to obtain the initial morphological features; The extraction process of the dual-view fusion features includes: splicing the initial morphological features of the two views, and calculating the view gating weights of each view through layer normalization, multilayer perceptron, gating scaling factor, and Sigmoid function; then performing Hadamard product on the view gating weights of each view with the corresponding initial morphological features, and adding the results element by element, and then processing them through GeLU function and layer normalization to obtain the dual-view fusion features.

[0009] It should be further explained that strawberry fruit shapes have significant irregularities such as conical and flattened round, and the fruit stem, seeds and other structures are easily obscured in single-view shooting, so that the single-view image cannot fully reflect the true shape of the strawberry. At the same time, the strawberry features under different views are prone to information redundancy or deviation. If they are directly used for subsequent netting specification matching, the netting will be misfitted due to inaccurate feature representation. In step A2 of this invention, the preprocessed strawberry dual-view image is first processed by convolutional layer processing, batch normalization and LeakyReLU function operation on each viewpoint in sequence to initially extract the original image features of the single viewpoint. Among them, the LeakyReLU function can retain more detailed features than the traditional ReLU function, preventing the subtle differences in strawberry shape from being ignored. Based on this, the original image features are calibrated using a viewpoint feature calibration function. Specifically, the original image features are batch normalized and processed by a convolutional layer. The calibration result is obtained by combining the calibration bias term and the Sigmoid function. The original image features are then combined with the calibration result to perform a Hadamard product operation to obtain the initial morphological features of a single viewpoint. This is to specifically eliminate feature deviations caused by shooting angle and occlusion in a single viewpoint. For example, for the horizontal contour features of a flat, round strawberry that are easily occluded, calibration can enhance the effective feature signal and ensure the accuracy of the initial morphological features of a single viewpoint. The process then proceeds to the dual-view feature fusion stage. First, the initial morphological features of the two views are dimensionally stitched together. After layer normalization and multilayer perceptron processing, the view gating weights of each view are calculated using gating scaling factors and the Sigmoid function. This dynamically allocates the contribution of the dual-view features, avoiding redundancy and confusion between different view features. Priority is given to retaining view information that is more effective in representing the shape of the strawberry. For example, when one view clearly presents the vertical height of the strawberry and the other view is good at reflecting the horizontal width, the weight will be tilted towards the key view. Finally, the initial morphological features of each view are combined with the corresponding view gating weights using the Hadamard product. The results are then summed element by element and processed by the GeLU function and layer normalization to obtain the dual-view fusion features. This integrates the complementary information of the two views, providing reliable basic features for subsequent fruit shape contour enhancement, 3D morphology extraction, and net specification matching, ensuring that subsequent steps can adapt to strawberries with different fruit shapes. Existing technologies for strawberry netting matching mostly rely on single-view images to extract single-dimensional features such as fruit diameter, or simply stitch together features from dual-view images without considering single-view bias and feature redundancy. Even the few dual-view solutions lack targeted calibration and weight allocation mechanisms. Compared to existing technologies, this invention has the following advantages: First, it optimizes single-view features through a view feature calibration function, avoiding fruit shape representation bias caused by a single view, which is especially suitable for scenarios with many irregularly shaped strawberries. Second, it achieves the fusion of dual-view features through view gating weights, rather than simple stitching, effectively eliminating redundant information and strengthening core fruit shape features. Third, the entire technical solution does not rely on prior strawberry sorting and classification, and can directly extract accurate features from individual strawberries, reducing damage to the strawberry skin caused by sorting and avoiding increased sorting costs, thus better meeting the actual needs of strawberry production line packaging.

[0010] Furthermore, the fruit contour enhancement network in step A3 also includes: After processing the dual-view fusion features through a 3×3 convolutional layer, they are added element-wise with the dual-view fusion features obtained after global average pooling to obtain the dual-view fusion residual features. The images of the two views in the preprocessed strawberry dual-view image are stitched together and processed by a convolutional layer, ReLU function, and transposed convolution to obtain the fruit shape template matrix. The result of processing the dual-view fusion residual features through a multilayer perceptron and Sigmoid function is combined with the result of processing the dual-view fusion residual features with the Laplacian operator and then with the result of Hadamard product of the fruit shape template matrix. Finally, this result is added with the dual-view fusion residual features to obtain the contour enhancement features.

[0011] It should be further explained that the natural texture of the seeds and stems on the strawberry skin, as well as the slight noise that is unavoidable when shooting on the production line, can easily obscure the true boundary of the fruit shape. In addition, strawberries have a variety of irregular shapes such as conical and oblate. Traditional contour extraction methods cannot accurately distinguish between effective shape contours and interference information, resulting in blurred shape boundaries of irregular fruits, which affects the subsequent size judgment of the netting specifications. Regardless of whether the strawberry is a regular conical shape or an irregular flattened oval shape, its basic outline is the core basis for matching the size of the mesh. The lack of basic information will directly lead to the deviation of subsequent processing. In step A3 of this invention, the dual-view fusion features are first input into the network, and then processed by convolutional layers and added element-wise with the results of global average pooling to obtain dual-view fusion residual features. Among them, the convolutional layer can further refine the contour details in the dual-view fusion features, and global average pooling can retain the overall shape information of the strawberry. The residual features formed by the combination of the two avoid the loss of basic contour information in subsequent processing and lay the foundation for contour extraction. Subsequently, the preprocessed dual-view strawberry images were stitched together and processed by convolutional layers, ReLU function and transposed convolution to obtain the fruit shape template matrix. Based on the general fruit shape features of strawberries, a constraint benchmark was constructed to focus on the core boundary of the strawberry fruit shape, avoiding misjudging non-core areas such as the protruding part of the fruit stem and irregular seed clusters as the fruit shape outline. Especially for irregular fruits, it can effectively define the true shape range and prevent large deviations in the outline extraction. Finally, based on the dual-view fusion residual features, the Laplacian operator is used to enhance the details of the contour edges, making the boundary lines of the strawberry contour clearer and representing the characteristics such as the maximum horizontal contour of the flat-round strawberry and the vertical height contour of the conical strawberry. At the same time, MLP and the Sigmoid function are used to generate suppression weights, and the Hadamard product of the features processed by the Laplacian operator and the fruit shape template matrix is ​​weighted to suppress interference information such as seed texture and shooting noise. Because these interference information can make the contour edges messy, if they are not suppressed, it will lead to misjudgment of the actual size of the strawberry. For example, misjudging the dense area of ​​seeds as the contour edge will make the net size too small. Finally, by adding the interference-suppressed features to the dual-view fusion residual features, a clear and realistic contour enhancement feature is obtained, which provides a high-quality feature foundation for subsequent three-dimensional morphology feature extraction. Existing technologies for strawberry contour extraction mostly employ general edge detection algorithms or simple convolution operations, lacking specific suppression mechanisms for interference sources such as strawberry seeds and stems, and also lacking specific constraints for strawberry shape. They can only extract coarse contour information, with poor results for irregularly shaped fruits. Compared to existing technologies, this invention has the following advantages: First, it preserves the basic contour information of the strawberry shape through a residual structure, avoiding the loss of details; second, it uses a fruit shape template matrix to achieve strawberry-specific shape constraints, improving the accuracy of irregular fruit contour extraction; third, it achieves a synergistic effect of contour enhancement and interference suppression through the combination of the Laplacian operator with MLP and the Sigmoid function, accurately extracting the true strawberry contour and providing reliable support for subsequent 3D morphological feature extraction and net size matching, thus improving the accuracy of net adaptation from the source.

[0012] Furthermore, the extraction process of the strawberry three-dimensional morphological features in step A4 also includes: First, the contour enhancement features are processed by a convolutional layer with a kernel size of 3×3. At the same time, the view gating weights of the two views are concatenated and processed by a multilayer perceptron. The results of the above two processing steps are then processed by a Hadamard product and then by a convolutional layer with a kernel size of 1×1 and a Sigmoid function to obtain the fruit shape attention constraint matrix. The average value of the two viewpoint gating weights is used to perform a Hadamard product with the fruit shape attention constraint matrix, and then 1 is added. This product is then used to perform a Hadamard product with the contour enhancement features processed by the attention mechanism, and the contour enhancement features are processed sequentially to obtain the contour attention features. The contour attention features are processed sequentially by a 3×3 convolutional layer, a ReLU function, and a 1×1 convolutional layer, and then added element-wise with the contour enhancement features to obtain the three-dimensional morphological features of the strawberry.

[0013] It should be further explained that although strawberries may have the same fruit diameter, they have differences in three-dimensional shape such as conical and oblate. Conical strawberries have a larger longitudinal dimension, while oblate strawberries have a more prominent lateral dimension. Traditional netting matching only relies on planar dimensional features such as fruit diameter, which makes it difficult to distinguish these differences of "different shapes with the same diameter". As a result, conical strawberries are crushed and damaged due to insufficient netting size, and oblate strawberries are damaged by shaking and rubbing during transportation because the netting does not fit the fruit shape tightly, which affects the packaging protection effect. In step A4 of this invention, firstly, combining the viewpoint gating weights obtained in the previous dual-view fusion stage, the contour enhancement features are first processed by convolution. At the same time, the viewpoint gating weights of the two views are concatenated dimensionally and then processed by a multilayer perceptron. The results of the two processing steps are then subjected to Hadamard product operation, and finally processed by Sigmoid function and convolution to obtain the fruit shape attention constraint matrix. The viewpoint gating weights already contain more effective information for fruit shape representation in the dual view. Combining them with the contour enhancement features allows the constraint matrix to match the strawberry-specific fruit shape, avoiding the adaptation bias of the general constraint matrix for irregular strawberries, and defining the core range for subsequent three-dimensional morphological feature extraction. Subsequently, the contour enhancement features are processed using an attention mechanism, focusing on the key contour regions of the strawberry's three-dimensional shape. For example, for conical strawberries, the focus is on the contour regions related to vertical height; for oblate strawberries, the focus is on the contour regions related to horizontal width. The attention processing result is then subjected to a Hadamard product operation with "1 plus the average of the two viewpoint gate weights and the Hadamard product of the fruit shape attention constraint matrix". Finally, the Hadamard product operation is performed again with the contour enhancement features to obtain the contour attention features. Through attention focus and dual weight constraints, the key feature signals of the strawberry's three-dimensional shape are strengthened, and the redundant information in the planar dimension is weakened. This achieves the differentiation of "different shapes with the same diameter" strawberries at the feature level and avoids feature confusion caused by the lack of three-dimensional information. Finally, the contour attention features are sequentially processed by convolution, ReLU function operation and convolution, and then added element-wise with the contour enhancement features to obtain the strawberry three-dimensional morphology features. This ensures that the three-dimensional morphology features simultaneously cover the strawberry's contour boundary and three-dimensional spatial size information. When matching the mesh specifications in the future, it can accurately correspond to the actual spatial requirements of strawberries of different shapes such as conical and oval, and solve the problem of mesh compression or poor fit. Existing technologies for extracting strawberry morphological features are mostly limited to measuring the diameter and height of a single plane. Even the few solutions that attempt to extract three-dimensional features mostly use general 3D feature extraction models and do not design specific constraints and enhancement mechanisms for the "different shapes with the same diameter" characteristics of strawberries. Compared with existing technologies, the advantages of this invention are: by combining the fruit shape attention constraint matrix and attention mechanism, it can achieve precise focusing and feature enhancement of key areas of the three-dimensional morphology of strawberries, effectively distinguish "different shapes with the same diameter" strawberries, greatly improve the accuracy of netting matching for strawberries of different shapes, and reduce packaging damage.

[0014] Furthermore, step A5 also includes: A51: Extract strawberry weight features based on the preprocessed strawberry weight data; A52: Based on the three-dimensional morphological characteristics and weight characteristics of strawberries, heterogeneous features are fused to obtain the strawberry fused features; The calculation process for the strawberry fusion feature includes: First, the Hadamard product operation is performed on the three-dimensional morphological features and weight features of strawberries. The operation result is then processed by a multilayer perceptron and a Softmax function to obtain a multi-source feature attention fusion matrix. Next, the strawberry 3D morphological features and the multi-source feature attention fusion matrix are subjected to Hadamard product, and then added element-wise with the strawberry 3D morphological features to obtain the calibrated strawberry 3D morphological features. The calibrated strawberry 3D morphological features are processed by a convolutional layer, and the strawberry weight features are multiplied by the strawberry weight feature weight matrix and then processed by a multilayer perceptron. The two processing results are then subjected to a Hadamard product to obtain the strawberry fusion features.

[0015] It should be further explained that strawberries with the same three-dimensional shape can have different levels of flesh fullness, which is directly reflected in different weights. The tightness of the netting needs to be matched not only with the three-dimensional dimensions of the strawberry, but also with the fullness of the flesh, taking into account the synergistic effect of both. In step A5 of this invention, the preprocessed strawberry weight data is first processed by a multilayer perceptron to extract the strawberry weight features; The process then proceeds to the heterogeneous feature fusion step A52. First, the strawberry 3D morphology features and strawberry weight features are subjected to Hadamard product operation. Then, a multilayer perceptron and Softmax function are used to process the multi-source feature attention fusion matrix, dynamically allocating the weight ratios of 3D morphology features and weight features. The influence of the two features is flexibly adjusted for strawberries with different plumpness levels. For example, for plump conical strawberries, the weight of the weight feature is appropriately increased. Next, the strawberry 3D morphology features are added element-wise with the Hadamard product result of itself and the multi-source feature attention fusion matrix to obtain the calibrated strawberry 3D morphology features. The representation deviation of the 3D morphology features is corrected by the feedback of the weight features, so that the calibrated features can simultaneously reflect the spatial size and flesh plumpness of the strawberry. Finally, the calibrated strawberry three-dimensional morphological features were convolved, and the result of multiplying the strawberry weight features and the strawberry weight feature weight matrix was processed by a multilayer perceptron. The two processing results were then subjected to a Hadamard product to obtain the strawberry fusion features, realizing the integration of two-dimensional features of three-dimensional morphology and weight. This provides a dual basis for the accurate matching of netting specifications, taking into account both spatial size and fruit plumpness. Existing technologies for matching strawberry netting mostly employ only a single dimension of three-dimensional morphological or weight features. Compared to existing technologies, the advantages of this invention are: by using a multi-source feature attention fusion matrix to achieve dynamic weight allocation and calibration of morphological and weight features, the fused features are more closely aligned with the actual properties of strawberries. This ensures, from a feature perspective, that the tightness of the netting is precisely matched with the shape and plumpness of the strawberries, further reducing the spoilage rate of strawberries during transportation.

[0016] Furthermore, the extraction process of the final netting specification features in step A6 also includes: First, the strawberry fusion feature is multiplied by the netting specification weight matrix, and then processed by ReLU function, batch normalization, and multilayer perceptron to obtain the initial netting specification feature; The initial netting specification features are then processed by a convolutional layer, while the strawberry fusion features are processed by a multilayer perceptron. The results of the two processing operations are then performed by a Hadamard product, and finally added element-wise to the initial netting specification features to obtain the final netting specification features.

[0017] It should be further explained that matching the specifications of the netting needs to take into account both the three-dimensional shape of the strawberry and the fullness of the flesh. However, the traditional netting specification matching only relies on single-dimensional characteristics such as fruit diameter, which cannot integrate multi-dimensional information. This results in a large deviation in the specification matching results for some irregularly shaped fruits or strawberries of special weight, which still requires manual adjustment. In step A6 of this invention, the strawberry fusion features obtained in the previous stage are first calculated with the netting specification weight matrix. Then, the features are processed sequentially by the ReLU function, batch normalization, and multilayer perceptron to obtain the initial netting specification features. The strawberry fusion features simultaneously cover the three-dimensional morphology and flesh fullness information of the strawberry. The netting specification weight matrix can be specifically adapted to the parameter requirements of the netting specifications. The ReLU function is used to enhance the nonlinear representation ability of the features. Batch normalization avoids gradient anomalies during feature extraction. The multilayer perceptron can fully explore the potential correlation between the fusion features and the netting specifications to ensure that the initial netting specification features have basic matching value. Subsequently, the initial netting specification features are processed by convolutional layers, while the strawberry fusion features are processed by a multilayer perceptron. The results of the two processing steps are then subjected to a Hadamard product operation and added element-wise to the initial netting specification features to obtain the final netting specification features. Among these steps, the convolutional layer further refines the key parameters in the initial specification features, the multilayer perceptron's reprocessing of the fusion features strengthens the input of information in the morphology and weight dimensions, the Hadamard product operation of the two can optimize the specification features, and the design of residual connections is necessary to effectively retain the effective information in the initial netting specification features and avoid feature loss during the optimization process. The final output netting specification features can simultaneously take into account the three-dimensional shape and flesh fullness requirements of the strawberry.

[0018] Furthermore, step A7 also includes: A71: Based on the final netting specification characteristics, feature mapping is completed through a multilayer perceptron consisting of three fully connected layers to obtain netting specification classification characteristics; A72: Based on the classification characteristics of netting specifications, the probability distribution results corresponding to all netting specifications are first calculated using the Softmax function, and then the index corresponding to the result with the highest probability value in the probability distribution results is selected using the Argmax function to determine the target netting specification label that matches the current strawberry. A73: Input the target netting specification label into the strawberry packaging execution system and call the execution system to complete the strawberry netting packaging operation.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention effectively solves the problem that traditional packaging methods are difficult to adapt to the differences in strawberry shape, resulting in poor packaging protection. By acquiring strawberry dual-view images and weight data, and after a series of feature processing and multi-dimensional fusion, the netting specifications are dynamically matched. There is no need to add an extra sorting step, which reduces the damage of strawberries during the sorting process. It adapts to the diverse shapes of strawberries and solves the problems of loose fit, transportation shaking or pressure damage caused by uniform netting. It also reduces manual bottom-up intervention and improves work efficiency.

[0020] (2) In view of the problems that strawberries have many irregular shapes, are easily obstructed when photographed from a single perspective, and have redundant deviations in features from different perspectives, this invention uses a perspective feature calibration function to eliminate the obstruction and angle deviation of a single perspective. For example, it strengthens the lateral contour features of obstructed flat and round strawberries to ensure the accuracy of single perspective features. Then, it dynamically allocates the contribution of dual perspectives through perspective gating weights, prioritizes the retention of effective information and eliminates redundancy, and finally integrates the complementary information of dual perspectives to obtain fused features, thus solving the one-sidedness of single perspective feature extraction.

[0021] (3) To address the problem that strawberry skin texture and shooting noise can easily obscure the contour boundary, and that the extraction deviation of irregular fruit contours is large, affecting the judgment of net size, this invention first constructs residual features through convolution and global average pooling to completely preserve the basic contour information of strawberries, and then constructs a fruit shape template matrix to focus on the core boundary of the fruit shape, avoiding misjudgment of non-core areas and accurately defining the range of irregular fruit shape; at the same time, it combines the Laplacian operator to enhance the contour edge details, while suppressing interference from skin texture, noise and other factors, and finally obtains clear and realistic contour enhancement features, improving the extraction accuracy of irregular fruit contours, avoiding size misjudgment, and providing a high-quality foundation for subsequent three-dimensional shape extraction.

[0022] (4) In response to the problem that traditional methods of relying on planar features cannot distinguish between strawberries of the same diameter but different shapes, resulting in the netting being squeezed or not fitting tightly, this invention combines the pre-view gating weight to construct a fruit shape attention constraint matrix, matches the strawberry's specific fruit shape, focuses on the key contour area of ​​strawberries of different shapes through an attention mechanism, and then strengthens the three-dimensional feature signal through double weight constraints, thereby achieving effective differentiation of "same diameter but different shapes" strawberries from the feature level. The final extracted three-dimensional morphological features simultaneously cover contour and three-dimensional size information, and can accurately adapt to the spatial requirements of strawberries of different shapes such as conical and flat round when matching netting in the future, solving the problem of netting being squeezed or not fitting tightly due to shape misjudgment, and significantly improving the packaging protection effect. Attached Figure Description

[0023] Figure 1 A flowchart illustrating a method for dynamically matching netting specifications based on multi-dimensional strawberry size distribution provided by the present invention; Figure 2 The feature diagrams show the initial morphological features of strawberries from two perspectives, as provided by this invention. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings, but this is not intended to limit the present invention in any way. Any modifications or substitutions made based on the teachings of the present invention shall fall within the protection scope of the present invention.

[0025] Example 1: A method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution, such as... Figure 1 As shown, it includes the following steps: A1: Acquire dual-view images and weight data of strawberries, and preprocess them separately to obtain preprocessed dual-view images and weight data of strawberries, including: A11: Acquires dual-view images of strawberries using an industrial camera, with the data type being a color pixel matrix, including two sets of sub-view data: a top view and a side view of the strawberry; simultaneously, acquires strawberry weight data using a weighing sensor, with the data type being numerical data. A12: The strawberry dual-view image data is preprocessed by Gaussian filtering for noise reduction and bilinear interpolation for resolution unification to obtain the preprocessed strawberry dual-view image. A13: The strawberry weight data was preprocessed using a three-fold standard deviation constant removal and maximum / minimum normalization method to obtain the preprocessed strawberry weight data.

[0026] A2: Based on the preprocessed strawberry dual-view images, initial morphological features are extracted for each viewpoint, and then dual-view feature fusion is performed to obtain dual-view fused features, including: A21: Based on the preprocessed strawberry dual-view images, extract initial morphological features for each viewpoint, such as... Figure 2 As shown, the calculation method is as follows: ; ; in, Let be the original image features of the i-th viewpoint, where i is the viewpoint index. , For the LeakyReLU function, For batch normalization, This is a convolutional layer with a kernel size of 5×5. This is the image of the i-th viewpoint in the preprocessed strawberry dual-view image. Let be the initial morphological features of the i-th viewpoint. For Hadama accumulation, The viewpoint feature calibration function is calculated as follows: ; in, For the Sigmoid function, This is a convolutional layer with a kernel size of 1×1. For calibration bias terms; A22: Based on the initial morphological features from two perspectives, dual-view feature fusion is performed to obtain dual-view fused features. The calculation method is as follows: ; ; in, Let i be the view gating weight for the i-th view. It is a multilayer perceptron. For layer normalization, This is a dimension splicing operation. This is the gating scaling factor. As a dual-view fusion feature, For GeLU functions, The view gating weights for the first view. The initial morphological features are from the first perspective. To add element by element, For the view gating weights of the second view, This represents the initial morphological features from the second perspective.

[0027] A3: Input the dual-view fusion features into the fruit shape contour enhancement network, perform contour feature enhancement and optimization, and obtain contour enhancement features. The calculation method of the fruit shape contour enhancement network is as follows: ; ; ; in, To fuse residual features from two perspectives, This is a convolutional layer with a kernel size of 3×3. For global average pooling, For contour enhancement features, For the Laplace operator, For the fruit-shaped template matrix, For transposed convolution, For ReLU function, It is a convolutional layer. These are the first and second perspective images from the preprocessed strawberry dual-view image, respectively.

[0028] A4: Based on the contour enhancement features, extract the 3D morphological features of the strawberry. The calculation method is as follows: ; ; ; in, For contour attention features, For attention mechanisms, For the fruit-shaped attention constraint matrix, This describes the three-dimensional morphological characteristics of strawberries.

[0029] A5: Based on the preprocessed strawberry weight data, strawberry weight features are extracted, and then combined with strawberry three-dimensional morphological features for heterogeneous feature fusion to obtain strawberry fused features, including: A51: Based on the preprocessed strawberry weight data, extract the strawberry weight features. The calculation method is as follows: ; in, For strawberry weight characteristics, The data shows the weight of the strawberries after preprocessing. A52: Based on the three-dimensional morphological characteristics and weight characteristics of strawberries, heterogeneous feature fusion is performed to obtain the strawberry fused features. The calculation method is as follows: ; ; ; in, This is a multi-source feature attention fusion matrix. For the Softmax function, To calibrate the three-dimensional morphological features of the strawberry, It is a characteristic of strawberry fusion. This is the weight matrix for strawberry weight features.

[0030] A6: Based on the strawberry fusion characteristics, the initial netting specification features and the final netting specification features are extracted. The calculation method is as follows: ; in, Initial netting specifications and characteristics, This is a weight matrix for netting specifications. Final specifications and characteristics of the mesh sleeve.

[0031] The specific parameter settings for the neural network module that extracts netting specification features in step A6 are as follows: The multilayer perceptron used to calculate the initial net size features contains three fully connected layers, with the first fully connected layer having 512 neurons, the second layer having 256 neurons, and the third layer having 128 neurons. The momentum parameter of the batch normalized layer is configured to 0.9, and the epsilon parameter is configured as follows: ; The netting specification weight matrix has a dimension of 128×64, and its initial values ​​are initialized using a He normal distribution. The convolutional layer used to optimize the initial netting specification features employs a 2D convolutional operation with a kernel size of 3×3, a stride of 1, and same padding to ensure that the feature map size after convolution is consistent with the initial netting specification features. The MLP used in conjunction with this convolutional layer contains two fully connected layers: the first layer has 64 neurons and the second layer has 32 neurons, with no additional activation functions.

[0032] Specifically, for scenarios where the proportion of irregularly shaped strawberries is high and the adaptation of size characteristics to irregular fruit morphology needs to be strengthened, this invention also provides a calculation method that introduces depthwise separable convolution and attention residual mechanism to replace step A6. The calculation method is as follows: ; ; in, It is an exponential linear unit. It is a depthwise separable convolution.

[0033] A7: Based on the final netting specification characteristics, feature mapping is performed using a multilayer perceptron to obtain netting specification classification features. Then, the target netting specification labels are extracted using the Softmax and Argmax functions. Finally, the netting packaging operation for strawberries is completed, including: A71: Based on the final netting specification characteristics, feature mapping is completed through a multilayer perceptron consisting of three fully connected layers to obtain netting specification classification characteristics; A72: Based on the classification characteristics of netting specifications, the probability distribution results corresponding to all netting specifications are first calculated using the Softmax function, and then the index corresponding to the result with the highest probability value in the probability distribution results is selected using the Argmax function to determine the target netting specification label that matches the current strawberry. A73: Input the target netting specification label into the strawberry packaging execution system and call the execution system to complete the strawberry netting packaging operation.

[0034] For the modules related to extracting the net sleeve specification label and performing packaging in step A7, the specific parameter settings are as follows: A multilayer perceptron consisting of three fully connected layers for feature mapping is used, with the number of neurons decreasing according to the feature dimension. The first fully connected layer has 128 neurons, the second layer has 64 neurons, and the third layer has 3 neurons. The weight parameters of this multilayer perceptron are initialized using a He normal distribution. Each fully connected layer is followed by a batch normalization layer with a momentum parameter set to 0.9 and an epsilon parameter set to... After the batch normalization layer, the ReLU activation function is applied. After the third fully connected layer, no activation function is set, and the netting specification classification features are directly output. The Softmax function performs a normalization operation on the dimensions of the netting specification classification features and outputs the probability distribution results corresponding to the three netting specifications. The Argmax function selects the index corresponding to the element with the largest value in the probability distribution results. This index is mapped one-to-one with the preset netting specification labels. Index 0 corresponds to the smallest specification netting, and index 2 corresponds to the largest specification netting.

[0035] The neural network modules involved in this invention include: dual-view feature extraction, fruit shape contour enhancement network, three-dimensional morphology feature extraction, heterogeneous feature fusion, and netting specification feature extraction modules. The training method is as follows: First, a training dataset is constructed. The data source is preprocessed strawberry dual-view images, strawberry weight data, and corresponding labeled netting specifications. The dataset is divided into a training set, a validation set, and a test set in a ratio of 7:2:1, which are used for model training, performance verification, and generalization ability testing, respectively. During training, the cross-entropy loss function of the net size classification task was used as the optimization objective to measure the deviation between the net size classification features output by the model and the true labels. The Adam optimizer was selected to co-optimize the learnable parameters of each module of the network, and an initial learning rate was set. Weight decay coefficient By adaptively adjusting the learning rate, training efficiency and convergence stability can be improved. During training, a batch training strategy is adopted, with a batch size of 32. A step-wise learning rate decay mechanism is introduced, which decays the learning rate to 0.5 times the current value every 10 iterations. Training is terminated when the validation set loss does not decrease significantly for 15 consecutive iterations. The preset training cycle limit is 100 cycles.

[0036] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0037] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0038] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for dynamically matching netting specifications based on multi-dimensional strawberry size distribution, characterized in that, Includes the following steps: A1: Acquire strawberry dual-view images and strawberry weight data, and preprocess them separately to obtain preprocessed strawberry dual-view images and preprocessed strawberry weight data; A2: Based on the preprocessed strawberry dual-view images, extract the initial morphological features for each view, and then perform dual-view feature fusion to obtain dual-view fused features; A3: Input the dual-view fusion features into the fruit shape contour enhancement network to enhance and optimize the contour features, and obtain the contour enhancement features; A4: Extract the 3D morphological features of the strawberry based on the contour enhancement features; A5: Based on the preprocessed strawberry weight data, extract the strawberry weight features, and then combine them with the strawberry three-dimensional morphology features to perform heterogeneous feature fusion to obtain the strawberry fused features; A6: Based on the strawberry fusion characteristics, extract the initial netting specification features and the final netting specification features; A7: Based on the final netting specification characteristics, feature mapping is completed through a multilayer perceptron to obtain netting specification classification features. Then, the target netting specification labels are extracted through the Softmax and Argmax functions, and finally, the netting packaging operation of strawberries is completed.

2. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 1, characterized in that, Step A1 includes: A11: Acquires dual-view images of strawberries using an industrial camera, with the data type being a color pixel matrix, including two sets of sub-view data: a top view and a side view of the strawberry; simultaneously, acquires strawberry weight data using a weighing sensor, with the data type being numerical data. A12: The strawberry dual-view image data is preprocessed by Gaussian filtering for noise reduction and bilinear interpolation for resolution unification to obtain the preprocessed strawberry dual-view image. A13: The strawberry weight data was preprocessed using a three-fold standard deviation constant removal and maximum / minimum normalization method to obtain the preprocessed strawberry weight data.

3. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 1, characterized in that, Step A2 includes: A21: Based on the preprocessed strawberry dual-view images, extract the initial morphological features for each viewpoint; A22: Based on the initial morphological features of the two perspectives, perform dual-view feature fusion to obtain dual-view fused features; The initial morphological feature extraction process includes: processing the single-view image through a convolutional layer, batch normalization, and LeakyReLU function to obtain the original image features; constructing a view feature calibration function, processing the original image features through batch normalization, a 1×1 convolutional layer, adding a calibration bias term, and the Sigmoid function, and then performing a Hadamard product operation on the original image features and the result of the view feature calibration function to obtain the initial morphological features; The extraction process of the dual-view fusion features includes: splicing the initial morphological features of the two views, and calculating the view gating weights of each view through layer normalization, multilayer perceptron, gating scaling factor, and Sigmoid function; then performing Hadamard product on the view gating weights of each view with the corresponding initial morphological features, and adding the results element by element, and then processing them through GeLU function and layer normalization to obtain the dual-view fusion features.

4. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 3, characterized in that, The fruit contour enhancement network in step A3 includes: After processing the dual-view fusion features through a 3×3 convolutional layer, they are added element-wise with the dual-view fusion features obtained after global average pooling to obtain the dual-view fusion residual features. The images of the two views in the preprocessed strawberry dual-view image are stitched together and processed by a convolutional layer, ReLU function, and transposed convolution to obtain the fruit shape template matrix. The result of processing the dual-view fusion residual features through a multilayer perceptron and Sigmoid function is combined with the result of processing the dual-view fusion residual features with the Laplacian operator and then with the result of Hadamard product of the fruit shape template matrix. Finally, this result is added with the dual-view fusion residual features to obtain the contour enhancement features.

5. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 4, characterized in that, The extraction process of the three-dimensional morphological features of strawberries in step A4 includes: First, the contour enhancement features are processed by a convolutional layer with a kernel size of 3×3. At the same time, the view gating weights of the two views are concatenated and processed by a multilayer perceptron. The results of the above two processing steps are then processed by a Hadamard product and then by a convolutional layer with a kernel size of 1×1 and a Sigmoid function to obtain the fruit shape attention constraint matrix. The average value of the two viewpoint gating weights is used to perform a Hadamard product with the fruit shape attention constraint matrix, and then 1 is added. This product is then used to perform a Hadamard product with the contour enhancement features processed by the attention mechanism, and the contour enhancement features are processed sequentially to obtain the contour attention features. The contour attention features are processed sequentially by a 3×3 convolutional layer, a ReLU function, and a 1×1 convolutional layer, and then added element-wise with the contour enhancement features to obtain the three-dimensional morphological features of the strawberry.

6. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 5, characterized in that, Step A5 includes: A51: Extract strawberry weight features based on the preprocessed strawberry weight data; A52: Based on the three-dimensional morphological characteristics and weight characteristics of strawberries, heterogeneous features are fused to obtain the strawberry fused features; The calculation process for the strawberry fusion feature includes: First, the Hadamard product operation is performed on the three-dimensional morphological features and weight features of strawberries. The operation result is then processed by a multilayer perceptron and a Softmax function to obtain a multi-source feature attention fusion matrix. Next, the strawberry 3D morphological features and the multi-source feature attention fusion matrix are subjected to Hadamard product, and then added element-wise with the strawberry 3D morphological features to obtain the calibrated strawberry 3D morphological features. The calibrated strawberry 3D morphological features are processed by a convolutional layer, and the strawberry weight features are multiplied by the strawberry weight feature weight matrix and then processed by a multilayer perceptron. The two processing results are then subjected to a Hadamard product to obtain the strawberry fusion features.

7. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 5, characterized in that, The extraction process of the final netting specification features in step A6 includes: First, the strawberry fusion feature is multiplied by the netting specification weight matrix, and then processed by ReLU function, batch normalization, and multilayer perceptron to obtain the initial netting specification feature; The initial netting specification features are then processed by a convolutional layer, while the strawberry fusion features are processed by a multilayer perceptron. The results of the two processing operations are then performed by a Hadamard product, and finally added element-wise to the initial netting specification features to obtain the final netting specification features.

8. The method for dynamic matching of netting specifications based on multi-dimensional strawberry size distribution according to claim 5, characterized in that, Step A7 includes: A71: Based on the final netting specification characteristics, feature mapping is completed through a multilayer perceptron consisting of three fully connected layers to obtain netting specification classification characteristics; A72: Based on the classification characteristics of netting specifications, the probability distribution results corresponding to all netting specifications are first calculated using the Softmax function, and then the index corresponding to the result with the highest probability value in the probability distribution results is selected using the Argmax function to determine the target netting specification label that matches the current strawberry. A73: Input the target netting specification label into the strawberry packaging execution system and call the execution system to complete the strawberry netting packaging operation.