Recognition model optimization method based on fruit and vegetable characteristics, image processing method and equipment

Through deep learning technology combining images and three-dimensional information, a recognition model based on fruit and vegetable characteristics is constructed, and the combined mask technology and robotic arm optimal grasping strategy are adopted to solve the limitations in the performance of fruit and vegetable sorting system and the damage to fruit and vegetable in the existing technology. The problem has achieved efficient and accurate fruit and vegetable sorting.

CN119478926AInactive Publication Date: 2025-02-18SUZHOU FANSHENG VISION TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411700158.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing automated fruit and vegetable sorting system is limited in its performance when dealing with complex backgrounds, variable lighting conditions and diverse fruit and vegetable characteristics, and lacks effective utilization of three-dimensional information of fruit and vegetable, resulting in inaccurate picking force and position selection, which can easily lead to fruit and vegetable. damage.

Method used

Through deep learning technology, combining image data and three-dimensional information of fruits and vegetables, a recognition model based on fruit and vegetable characteristics is constructed, and the dynamic adjustment of sensitive weights in the loss function, image processing of joint mask technology, and optimal grasping strategy of robotic arms are realized. High-precision identification and sorting of fruit and vegetable characteristics.

Benefits of technology

It improves the efficiency and accuracy of fruit and vegetable sorting, reduces fruit and vegetable damage, reduces labor costs, and meets the needs of modern fruit and vegetable processing industries for high-efficiency and high-quality sorting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478926A_ABST
    Figure CN119478926A_ABST
Patent Text Reader

Abstract

The invention discloses an identification model optimization method based on fruit and vegetable characteristics, an image processing method and equipment, and relates to the field of fruit and vegetable sorting. The core of the scheme lies in innovative application of a deep learning model, sensitivity of the model to different errors is dynamically adjusted by introducing a sensitive weight into a loss function, and prediction accuracy is remarkably improved. The image processing method utilizes a joint mask technology, combines RGB and depth images, accurately extracts fruit and vegetable features, and enhances the recognition capability. And the sorting equipment automatically adjusts the grabbing strategy of the mechanical arm according to the three-dimensional shape and position information of the fruits and vegetables, and precise sorting is achieved. According to the whole scheme, the automation and intelligence level of fruit and vegetable sorting is improved, the labor cost is reduced, fruit and vegetable damage is reduced, the operation efficiency and accuracy are improved, and technical innovation is brought to the fruit and vegetable processing industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fruit and vegetable sorting, and in particular to a recognition model optimization method based on fruit and vegetable features, an image processing method and equipment. Background Art

[0002] With the continuous development of agricultural technology, the automation level of post-harvest processing of fruits and vegetables has gradually become the key to improving production efficiency and reducing costs. In the process of fruit and vegetable sorting, the traditional manual sorting method is not only inefficient, but also costly, and it is difficult to meet the needs of large-scale production. In addition, the accuracy and consistency of manual sorting are also difficult to guarantee, especially when faced with large quantities or irregularly shaped fruits and vegetables. Therefore, automated fruit and vegetable sorting technology came into being, aiming to improve the efficiency and accuracy of sorting through technical means.

[0003] In the field of automated sorting technology, the application of image recognition and machine learning technologies is gradually increasing. However, existing automated sorting systems often rely on simple image processing and primary machine learning models, which are limited in performance when dealing with complex backgrounds, variable lighting conditions, and diverse fruit and vegetable characteristics. In addition, these systems often lack effective use of the three-dimensional information of fruits and vegetables, resulting in inaccuracies in gripping force and position selection, which can easily cause damage to fruits and vegetables.

[0004] In order to solve the above problems, the present invention proposes a recognition model optimization method based on fruit and vegetable features, an image processing method and corresponding fruit and vegetable sorting equipment. The present invention uses deep learning technology, combined with image data and three-dimensional information of fruits and vegetables, to achieve high-precision recognition and sorting of fruit and vegetable features, and improves the automation and intelligence level of the sorting process. Through the dynamic adjustment of sensitive weights in the loss function, image processing of joint mask technology and the optimal grasping strategy of the robotic arm, the present invention can effectively improve the efficiency and accuracy of fruit and vegetable sorting, reduce fruit and vegetable damage, reduce labor costs, and meet the needs of the modern fruit and vegetable processing industry for high-efficiency and high-quality sorting. Summary of the invention

[0005] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a recognition model optimization method based on fruit and vegetable features, an image processing method and a device, so as to solve one or more problems in the prior art.

[0006] To achieve the above object, the technical solution of the present invention is as follows: A method for optimizing a recognition model based on fruit and vegetable features comprises the following steps: Receive image data of fruits and vegetables, determine their shapes according to the number of vertical and horizontal pixels in the image data, and output shape features.

[0007] Different convolution kernels are constructed according to the shape characteristics of fruits and vegetables, and the convolution kernels are used to extract scale features in image data.

[0008] Multiple feature processing units are constructed in the connection layer. Different weights are assigned to scale features by using the connection layer. Different feature processing units are used to process different scale features, and these scale features are fused.

[0009] Build multiple detection heads and receive data through different detection heads.

[0010] Sensitive weights are introduced into the loss function, the error between the predicted box and the true box is calculated through the loss function, and different weights are assigned to the error.

[0011] In the above technical solution, by constructing a deep learning model for fruit and vegetable features, the accuracy of image recognition can be improved, the feature extraction process can be optimized, and the model's ability to recognize the shape and scale features of fruits and vegetables can be enhanced, thereby improving the accuracy of fruit and vegetable sorting.

[0012] Furthermore, the method further comprises the following steps: Construct training and validation sets based on image data of fruits and vegetables.

[0013] The training set is input into the deep learning model for training.

[0014] Use the deep learning model to predict the validation set and dynamically adjust the loss function based on the feedback data of the validation set.

[0015] In the above technical solution, by performing model training and evaluation based on the training set and validation set constructed based on fruit and vegetable image data, it can be ensured that the model has good generalization ability, reduce the risk of overfitting, and improve the stability and reliability of the model in practical applications.

[0016] Specifically, dynamically adjusting the loss function based on the feedback data of the validation set includes: When the training set is input into the deep learning model for training, the error is calculated through the loss function, and a larger weight is given to the larger error.

[0017] When using a deep learning model to predict the validation set, the error is calculated through the loss function, and the larger the error, the smaller the weight is assigned. And as the number of validation adjustments increases, the weight assigned to large errors gradually decreases.

[0018] In the above technical solution, the weights in the loss function are dynamically adjusted so that the model can pay more attention to reducing large errors during the training and verification stages. As the number of verifications increases, the sensitivity to large errors gradually decreases, which helps the model balance performance at different stages and improves overall robustness.

[0019] Specifically, assigning different weights to different errors includes: Position-sensitive weights are introduced into the loss function. The distance error between the center of the predicted box and the center of the true box is calculated through the loss function, and the error term is weighted according to the size of the error.

[0020] The scale-sensitive weight is introduced into the loss function. The vertical and horizontal scale errors between the predicted box and the real box are calculated through the loss function, and the error term is weighted according to the error size.

[0021] In the above technical solution, the introduction of position-sensitive weights and scale-sensitive weights can enable the model to more accurately adjust the errors in the prediction of the position and scale of fruits and vegetables and improve the accuracy of the prediction, which is crucial to improving the efficiency of fruit and vegetable sorting and reducing misclassification.

[0022] In order to achieve a complete technical effect, the second set of technical solutions adopted by the present invention is an image processing method, characterized in that it includes the following steps: An RGB image and a depth image captured by an image sensor are received, and image registration processing is performed on the RGB image and the depth image.

[0023] Make a depth mask from the depth image.

[0024] Filter invalid information in RGB images through depth mask.

[0025] The RGB image is converted into an HSV image, a color histogram analysis is performed, and an SV threshold mask is generated according to the threshold of the SV parameter.

[0026] The depth mask and the SV threshold mask are combined to generate a joint mask.

[0027] The joint mask is used to extract the feature data of the original image.

[0028] Output image data.

[0029] In the above technical solution, the image processing method can effectively filter out invalid information and extract characteristic data of fruits and vegetables through the combination of image registration and depth mask, improve the quality and availability of image data, and provide more accurate input data for deep learning models. Specifically, extracting feature data of the original image using the joint mask includes the following steps: In the HSV image, pixels that meet the conditions are screened according to the SV threshold mask, and they are used as foreground pixels, and the remaining pixels are used as background pixels to generate a binary image.

[0030] The joint mask is used to screen the connected domains whose color features and depth features are consistent with the characteristics of fruits and vegetables.

[0031] The edge information of the connected domain is used to generate the contour data of fruits and vegetables, which is then subjected to noise reduction processing to output the contour information.

[0032] A contour mask is generated according to the contour information, and the fruit and vegetable area in the original image is extracted through the contour mask to generate image data containing only the fruit and vegetable data, and the image data is output.

[0033] In the above technical solution, the joint mask is used to extract the feature data of the original image, which can more accurately identify the contours and areas of fruits and vegetables, improve the quality and availability of image data, provide more accurate image features for fruit and vegetable sorting, and thus improve the accuracy of sorting. Specifically, the image processing method also includes the following pre-steps: Preprocessing: normalize the image.

[0034] Remove noise from images.

[0035] Adjust the contrast and brightness of the image to enhance features.

[0036] In the above technical solution, the image preprocessing step can improve the quality of image data, reduce the impact of noise and illumination changes on image recognition, and improve the accuracy and robustness of fruit and vegetable sorting. In order to achieve a complete technical effect, the third set of technical solutions adopted by the present invention is a fruit and vegetable sorting device, comprising a computing unit, an image sensor, an image processing unit, a mechanical arm, and a storage unit, wherein the mechanical arm is controlled by the computing unit, and Prediction of fruits and vegetables based on deep learning model, Dynamically adjust the gripping force of the robotic arm according to the size and predicted weight of fruits and vegetables.

[0037] According to the shape of fruits and vegetables and the degree of surface damage, the robotic arm's grasping angle is dynamically adjusted to actively avoid the damaged parts of the fruits and vegetables, and the target sorting area for the fruits and vegetables is selected.

[0038] Select the sorting target area for fruits and vegetables according to the type of fruits and vegetables.

[0039] In the above technical solution, the fruit and vegetable sorting equipment dynamically adjusts the gripping force and angle of the robotic arm through the prediction of the deep learning model, which can reduce fruit and vegetable damage, improve sorting accuracy and efficiency, and at the same time reduce dependence on manual monitoring and improve the level of automation.

[0040] Furthermore, a computer program is stored in the storage unit, and the computer program enables the computing unit to execute the recognition model optimization method based on fruit and vegetable features when running.

[0041] In the above technical solution, integrating the deep learning model structure optimization method into the fruit and vegetable sorting equipment can improve the intelligence level of the equipment, achieve more efficient and accurate fruit and vegetable sorting, and enhance the processing capacity and adaptability of the equipment.

[0042] Furthermore, the computer program enables the image processing unit to execute the image processing method when it is running.

[0043] In the above technical solution, integrating the image processing method into the fruit and vegetable sorting equipment can further improve the processing efficiency and quality of image data, provide more accurate input data for the deep learning model, and thus improve the accuracy and efficiency of fruit and vegetable sorting. Compared with the prior art, the beneficial technical effects of the present invention are as follows (i) Sensitive weights in the loss function: By introducing sensitive weights in the loss function, the present invention can assign different weights to errors of different types and sizes, thereby optimizing the model's learning process. This method of dynamically adjusting weights increases the model's sensitivity to key errors, thereby focusing more on reducing these errors during the training process, and improving the model's prediction accuracy and robustness.

[0044] (ii) Joint masking: Using joint masking technology, the present invention combines depth masking and color histogram analysis to effectively extract the feature data of fruits and vegetables from complex backgrounds. This technology improves the quality of image preprocessing, enhances the accuracy of feature recognition, and provides more accurate input for subsequent deep learning models, thereby improving the efficiency and accuracy of fruit and vegetable sorting.

[0045] (III) Robotic arm: The present invention calculates the optimal gripping point of the robotic arm by considering the position, shape and depth information of fruits and vegetables in three-dimensional space. By comprehensively considering the multi-dimensional information of fruits and vegetables, the method of the present invention enables the robotic arm to adapt to fruits and vegetables of different types and states, achieve more accurate gripping, reduce damage to fruits and vegetables, and improve the automation level and efficiency of sorting operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of the steps of a recognition model optimization method based on fruit and vegetable features in the present invention.

[0047] Figure 2 It is a flow chart of the steps of the image processing method in the present invention.

[0048] Figure 3 The present invention is a schematic diagram of the working process of a fruit and vegetable sorting device. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical scheme and advantages of the present invention clearer, the recognition model optimization method, image processing method and device based on fruit and vegetable features proposed by the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any modification of the structure, change in the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0050] Application Overview In the field of automated fruit and vegetable sorting, the industry generally uses technical solutions based on traditional image processing and primary machine learning models to handle fruit and vegetable sorting tasks. These solutions usually rely on simple color, shape and size feature extraction, as well as basic classifiers to identify and classify fruits and vegetables. However, these traditional methods have multiple technical deficiencies and defects.

[0051] Traditional image processing technology often performs poorly in complex backgrounds and changing lighting conditions, making it difficult to accurately extract the features of fruits and vegetables, resulting in low recognition rates. Secondly, primary machine learning models usually lack the ability to comprehensively analyze the multi-dimensional features of fruits and vegetables, such as shape, texture, and depth information, which limits the generalization and accuracy of the model. In addition, the existing sorting system has a relatively simple grasping strategy and is unable to dynamically adjust the grasping force and angle according to the actual situation of fruits and vegetables, which can easily cause damage to fruits and vegetables, affecting sorting efficiency and fruit and vegetable quality.

[0052] In view of the above problems, the present invention proposes a recognition model optimization method based on fruit and vegetable features, an image processing method and corresponding fruit and vegetable sorting equipment. The present invention uses deep learning technology, combined with image data and three-dimensional information of fruits and vegetables, to achieve high-precision recognition and sorting of fruit and vegetable features, and improves the automation and intelligence level of the sorting process. Through the dynamic adjustment of sensitive weights in the loss function, image processing of joint mask technology and the optimal grasping strategy of the robotic arm, the present invention can effectively improve the efficiency and accuracy of fruit and vegetable sorting, reduce fruit and vegetable damage, reduce labor costs, and meet the needs of the modern fruit and vegetable processing industry for high-efficiency and high-quality sorting.

[0053] Example In order to achieve a complete technical effect, the present invention provides three sets of sub-schemes with mutually combined gains, wherein the first set of technical schemes is a recognition model optimization method based on fruit and vegetable features, which optimizes the fruit and vegetable features to improve the accuracy and efficiency of fruit and vegetable sorting. The method receives image data of fruits and vegetables, judges the shape of fruits and vegetables based on the number of longitudinal and lateral pixels in the image data, and outputs shape features. This process involves a preliminary analysis of the image, in which the number of pixels in the image data provides preliminary information about the size and shape of fruits and vegetables. Next, different convolution kernels are constructed according to the shape features of fruits and vegetables, and these convolution kernels are used to extract scale features in the image data. This step is a key link in the deep learning model. By constructing a convolution kernel that matches the shape features of fruits and vegetables, the model can more accurately capture the local features of fruits and vegetables.

[0054] In the connection layer, multiple feature processing units are constructed to assign different weights to scale features, and different feature processing units are used to process features of different sizes, and finally these scale features are fused. This process involves weighting and fusion of features, which enables the model to comprehensively consider features of different scales and improve recognition accuracy. In addition, multiple detection heads are constructed to receive data through different detection heads to enhance the multi-scale detection capability of the model. This design enables the model to process fruits and vegetables of different sizes at the same time, improving the adaptability and flexibility of the model.

[0055] During the training process, a training set and a validation set are constructed based on the image data of fruits and vegetables, and the training set is input into the deep learning model for training. This step is the basis of model training. Through a large amount of image data, the model can learn the characteristics of fruits and vegetables. The validation set is predicted using a deep learning model, and the loss function is dynamically adjusted based on the feedback data of the validation set. Specifically, when the training set is input into the deep learning model for training, the error is calculated using the loss function, and a larger weight is assigned to a larger error. This dynamic weight adjustment strategy helps the model focus more on reducing large errors and avoiding overfitting during the training process. When the validation set is predicted using a deep learning model, the error is calculated using the loss function, and a smaller weight is assigned to a larger error, and as the number of validation adjustments increases, the weight assigned to large errors is gradually reduced. Such dynamic adjustments help the model focus more on reducing large errors and avoiding overfitting during the training process.

[0056] Furthermore, the method introduces sensitive weights into the loss function, including position-sensitive weights and scale-sensitive weights. The position-sensitive weights calculate the distance error between the center of the predicted box and the center of the true box through the loss function, and assign weights to the error term according to the size of the error. The scale-sensitive weights calculate the longitudinal and lateral scale errors between the predicted box and the true box through the loss function, and assign weights to the error term according to the size of the error. The introduction of these sensitive weights enables the model to more accurately adjust the errors in the prediction of the position and scale of fruits and vegetables, thereby improving the accuracy of the prediction. This process involves the refined design of the loss function. By introducing sensitive weights, the model can focus more on key prediction errors, thereby improving the overall prediction performance.

[0057] The second set of technical solutions is an image processing method for processing RGB images and depth images taken by an image sensor. First, image registration processing is performed on the RGB image and the depth image to ensure that the data of the two images are aligned. This step is the basis of image processing. Through image registration, the system can ensure the spatial consistency between the RGB image and the depth image, and provide accurate basic data for subsequent feature extraction. Then, a depth mask is made according to the depth image, and the invalid information in the RGB image is filtered through the depth mask to improve the quality of the image data. In terms of image color processing, the RGB image is converted into an HSV image, and a color histogram analysis is performed. An SV threshold mask is generated according to the threshold of the SV parameter, and a joint mask is generated by combining the depth mask and the SV threshold mask. The feature data of the original image is extracted using the joint mask, and the image data is output. Further, the feature data of the original image is extracted using the joint mask, including filtering pixels that meet the conditions according to the SV threshold mask in the HSV image, and using it as the foreground pixel and the remaining pixels as the background pixel to generate a binary image. Using the joint mask, the connected domains that both the color feature and the depth feature meet the fruit and vegetable features are screened. The edge information of the connected domain is used to generate the contour data of fruits and vegetables, which is then subjected to noise reduction processing and the contour information is output. A contour mask is generated based on the contour information, and the fruit and vegetable area in the original image is extracted through the contour mask. Image data containing only the fruit and vegetable data is generated and output. This process involves deep processing of the image. Through the joint mask technology, the system can accurately extract the features of fruits and vegetables from the complex background, providing accurate data for subsequent identification and sorting.

[0058] As a pre-step in image processing, images are preprocessed, including normalization, removing noise from the image, and adjusting the contrast and brightness of the image to enhance features. These steps help improve the accuracy and efficiency of subsequent image recognition. Preprocessing is an important part of image processing. Through normalization, the system can eliminate the differences between different images, making feature extraction more accurate. Removing noise and adjusting contrast and brightness help improve the quality of the image, making subsequent feature extraction and recognition more reliable.

[0059] The third set of technical solutions is a fruit and vegetable sorting equipment, including a computing unit, an image sensor, an image processing unit, a robotic arm and a storage unit. The computing unit controls the operation of the robotic arm, and dynamically adjusts the gripping force and angle of the robotic arm based on the prediction of the fruits and vegetables by the deep learning model. Specifically, the gripping force of the robotic arm is dynamically adjusted according to the size and predicted weight of the fruits and vegetables, and the gripping angle of the robotic arm is dynamically adjusted according to the shape and degree of surface damage of the fruits and vegetables to actively avoid the damaged position of the fruits and vegetables, and select the sorting target area of ​​the fruits and vegetables. In addition, the sorting target area of ​​the fruits and vegetables is selected according to the type of fruits and vegetables to achieve accurate classification and sorting. This process involves precise control of the robotic arm. Through the prediction results of the deep learning model, the robotic arm can accurately adjust its operation to adapt to the characteristics of different fruits and vegetables and achieve accurate sorting.

[0060] The storage unit stores a computer program, which enables the computing unit to execute the recognition model optimization method based on the fruit and vegetable features when running, and the image processing unit to execute the image processing method when running. Through the execution of these programs, the fruit and vegetable sorting equipment can realize automatic and intelligent fruit and vegetable sorting, improve sorting efficiency and accuracy, and reduce fruit and vegetable damage. This process involves the automatic control of computer programs. Through pre-designed programs, the system can automatically perform complex sorting tasks, greatly improving the efficiency and accuracy of sorting.

[0061] The application of this integrated intelligent camera and deep learning algorithm enables the fruit and vegetable sorting equipment to not only identify the types and defects of fruits and vegetables in real time, but also automatically adjust the gripping force of the mechanical arm according to different item types, thereby achieving precise gripping and avoiding damage to fruits and vegetables. The implementation of this technical solution has significantly improved the automation and intelligence level of fruit and vegetable sorting, reduced labor costs, reduced fruit and vegetable damage, improved operating efficiency and accuracy, and brought technological innovation to the fruit and vegetable processing industry. Through the continuous optimization of the deep learning model and the innovative application of image processing technology, the fruit and vegetable sorting equipment of the present invention can adapt to various complex sorting scenarios, achieve efficient and accurate fruit and vegetable sorting, and meet the needs of the modern fruit and vegetable processing industry.

[0062] Specific working process Start the device.

[0063] The computer program in the storage unit enables the computing unit to execute the deep learning model structure optimization method, and the image processing unit to execute the image processing method, thereby realizing the automatic and intelligent sorting of fruits and vegetables.

[0064] The image sensor collects RGB images and depth images of fruits and vegetables in real time, and performs image registration processing to ensure data alignment. Generate a depth mask based on the depth image to filter invalid information in the RGB image. Convert the RGB image to an HSV image, perform color histogram analysis, generate an SV threshold mask based on the SV parameter threshold, and generate a joint mask in combination with the depth mask. Use the joint mask to extract the original image feature data, generate a binary image, screen the connected domain that meets the characteristics of fruits and vegetables, generate fruit and vegetable contour data, and perform noise reduction processing. Generate a contour mask based on the contour information, extract the fruit and vegetable area, and output the image data.

[0065] The deep learning model receives fruit and vegetable image data, determines the shape based on the number of pixels, and outputs shape features. Construct different convolution kernels to extract scale features, construct feature processing units in the connection layer, assign different weights to scale features, process different scale features, and fuse these features. Construct multiple detection heads to receive data to enhance the multi-scale detection capability of the model. Construct training sets and validation sets based on fruit and vegetable image data, input the model for training, use the model to predict the validation set, and dynamically adjust the loss function based on the feedback data, assign large weights to large errors, and gradually reduce the weights of large errors.

[0066] Verify and adjust the process multiple times.

[0067] Position-sensitive weights and scale-sensitive weights are introduced into the loss function to calculate the error between the predicted box and the true box, and weights are assigned according to the size of the error.

[0068] The output is ultimately used in the final model for identifying fruits and vegetables.

[0069] The robotic arm dynamically adjusts the gripping force according to the size of fruits and vegetables and the predicted weight, dynamically adjusts the gripping angle according to the shape and degree of surface damage, and selects the sorting target area.

[0070] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A recognition model optimization method based on fruit and vegetable features, characterized in that: The following steps are involved: Receive image data of fruits and vegetables, determine their shapes according to the number of vertical and horizontal pixels in the image data, and output shape features; Construct different convolution kernels according to the shape characteristics of fruits and vegetables, and use the convolution kernels to extract scale features in image data; Construct multiple feature processing units in the connection layer, use the connection layer to assign different weights to scale features, use different feature processing units to process different scale features, and fuse these scale features; Build multiple detection heads and receive data through different detection heads; Sensitive weights are introduced into the loss function, the error between the predicted box and the true box is calculated through the loss function, and different weights are assigned to the error.

2. The method for optimizing the recognition model based on fruit and vegetable features according to claim 1, characterized in that: The following steps are also included: Construct training and validation sets based on image data of fruits and vegetables; Input the training set into the deep learning model for training; Use the deep learning model to predict the validation set and dynamically adjust the loss function based on the feedback data of the validation set.

3. The method for optimizing the recognition model based on fruit and vegetable features as claimed in claim 2, characterized in that: Dynamically adjusting the loss function based on the feedback data of the validation set includes: When the training set is input into the deep learning model for training, the error is calculated through the loss function, and a larger weight is given to the larger error; When using a deep learning model to predict the validation set, the error is calculated through the loss function, and the larger the error, the smaller the weight is assigned; and as the number of validation adjustments increases, the weight assigned to large errors is gradually reduced.

4. The method for optimizing the recognition model based on fruit and vegetable features according to claim 1, characterized in that: Assigning different weights to errors includes: Introduce position-sensitive weights into the loss function, calculate the distance error between the center of the predicted box and the center of the real box through the loss function, and assign a weight to the error term according to the size of the error; The scale-sensitive weight is introduced into the loss function. The vertical and horizontal scale errors between the predicted box and the real box are calculated through the loss function, and the error term is weighted according to the error size.

5. An image processing method, characterized in that: The following steps are involved: Receiving an RGB image and a depth image captured by an image sensor, and performing image registration processing on the RGB image and the depth image; Create a depth mask based on the depth image; Filter invalid information in RGB images through depth mask; Convert the RGB image into an HSV image, perform color histogram analysis, and generate an SV threshold mask based on the threshold of the SV parameter; Combine the depth mask and SV threshold mask to generate a joint mask; Extract feature data of the original image using joint mask; Output image data.

6. The image processing method according to claim 5, characterized in that: Extracting feature data of the original image using the joint mask includes the following steps: In the HSV image, pixels that meet the conditions are screened according to the SV threshold mask, and they are used as foreground pixels, and the remaining pixels are used as background pixels to generate a binary image; Use joint mask to select connected domains whose color features and depth features are consistent with the characteristics of fruits and vegetables; Using the edge information of the connected domain, the contour data of fruits and vegetables is generated, and the noise reduction process is performed on it to output the contour information; A contour mask is generated according to the contour information, and the fruit and vegetable area in the original image is extracted through the contour mask to generate image data containing only the fruit and vegetable data, and the image data is output.

7. The image processing method according to claim 5, characterized in that: The following steps are also included: Preprocessing: normalize the image; Remove noise from images; Adjust the contrast and brightness of the image to enhance features.

8. A fruit and vegetable sorting device, characterized by: The invention comprises a computing unit, an image sensor, an image processing unit, a mechanical arm, and a storage unit, wherein the mechanical arm is controlled by the computing unit, and Prediction of fruits and vegetables based on deep learning model, Dynamically adjust the gripping force of the robotic arm according to the size and predicted weight of fruits and vegetables; According to the shape and surface damage of fruits and vegetables, the robot arm's grasping angle is dynamically adjusted to actively avoid the damaged position of fruits and vegetables, and the sorting target area of ​​the fruits and vegetables is selected; Select the sorting target area for fruits and vegetables according to the type of fruits and vegetables.

9. The fruit and vegetable sorting device according to claim 8, characterized in that: The storage unit stores a computer program, and the computer program enables the computing unit to execute the recognition model optimization method based on fruit and vegetable features as described in any one of claims 1 to 4 when running.

10. The fruit and vegetable sorting device according to claim 9, characterized in that: The computer program enables the image processing unit to execute the image processing method according to any one of claims 5 to 7 when running.

Citation Information

Patent Citations

  • Liver tissue pathological image segmentation method based on OTSU threshold value

    CN110276761A

  • Small sample deep learning multi-modal sign language recognition method based on key frame sampling

    CN111666845A

  • SAR (Synthetic Aperture Radar) image target detection method based on full-space coding attention module

    CN115147731A

  • Battery piece spacing detection method and device, computer equipment and storage medium

    CN117094964A

  • Infrared small target detection method and system based on scale and position sensitivity

    CN117726807A

Cited By

  • Trailer service-based accident vehicle intelligent fixing method and device

    CN120635883A