Spherical fruit embedded grading and sorting method and system based on lightweight CNN (Convolutional Neural Network)
Through the embedded grading and sorting method of spherical fruits based on lightweight CNN, the problems of insufficient data set diversity and model real-time optimization in the existing technology are solved, and high-precision and efficient fruit sorting are achieved, which enhances the market competition of products. and consumer satisfaction.
Patent Information
- Application Number
- CN202411421821.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-10
AI Technical Summary
The existing automatic sorting technology has shortcomings in data set diversity, real-time model optimization and embedded system integration, resulting in insufficient classification accuracy and adaptability, affecting the accuracy and efficiency of sorting, and limiting the application scope of agricultural product sorting technology and Consumer acceptance.
Using the embedded spherical fruit sorting method based on lightweight CNN, high-quality data sets are obtained through multi-angle image collection and labeling, CNN model parameters are adjusted in real time, and mechanical structure is optimized in combination with three-dimensional mechanical design, and repeated testing and adjustments are carried out until the industry standard is reached. .
It significantly improves the diversity of the data set and the accuracy and efficiency of the model, ensures the accuracy and efficiency of the sorting process, and improves the market competitiveness and consumer satisfaction of the product.
Smart Images

Figure CN119281680A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automatic sorting, and in particular to an embedded grading and sorting method and system for spherical fruits based on a lightweight CNN. Background Art
[0002] The field of automatic sorting technology mainly involves the use of automated systems to classify and sort agricultural products, relying on visual recognition systems, sensor technology, and machine learning algorithms, especially convolutional neural networks (CNNs), to analyze and identify the size, shape, maturity, and surface defects of agricultural products such as fruits. Automatic sorting systems applied to fruits can improve sorting speed and accuracy, reduce labor costs, and optimize the management and operational efficiency of the entire supply chain. The application of lightweight CNN models makes the system easier to integrate into embedded devices, further improving the portability and practicality of sorting operations.
[0003] Among them, the lightweight CNN embedded grading and sorting method for spherical fruits refers to the use of a specially designed convolutional neural network model, which can achieve efficient and accurate image recognition and classification functions while maintaining low computational complexity. It is particularly suitable for embedded systems, such as portable or field-deployable devices, for real-time analysis and grading of spherical fruits such as apples and oranges. Uses include automatically detecting the quality of fruits, ensuring that the sorted fruits meet the quality standards of the market and consumers, and improving the market competitiveness of agricultural products and consumer satisfaction.
[0004] Existing automatic sorting technology mainly relies on visual recognition systems and sensor technology. Although it has improved in speed and automation, it still has obvious deficiencies in the diversity and quality of data sets, real-time optimization of models, and integration with embedded systems. The models in existing technologies operate under fixed parameters and are difficult to quickly adjust to new variations or abnormal situations encountered in actual applications, resulting in insufficient classification accuracy and adaptability. The mechanical design in existing systems fails to fully consider the specific size and morphological differences of different fruits, affecting the accuracy and efficiency of sorting, resulting in misclassification and waste of resources during the sorting process, limiting the scope of application of agricultural product sorting technology in the market and consumer acceptance, and reducing the overall benefits and competitiveness of agricultural production. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings existing in the prior art and propose an embedded grading and sorting method and system for spherical fruits based on lightweight CNN.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme, which is an embedded grading and sorting method of spherical fruits based on lightweight CNN, comprising the following steps:
[0007] S1: Collect and annotate spherical fruit images from multiple angles, including size, color, and texture, collect visual data of intact and defective fruits, and obtain a fruit image dataset;
[0008] S2: According to the fruit image dataset, a lightweight CNN model is used to adjust parameters and perform performance tests through real-time image data, and the network structure is repeatedly optimized to match the preset fruit classification requirements, thereby generating an optimized lightweight CNN model;
[0009] S3: Initialize the embedded mechanical structure through the optimized lightweight CNN model, design it according to the size and shape of the differentiated spherical fruit, and output a three-dimensional mechanical model design drawing;
[0010] S4: Based on the three-dimensional mechanical model design drawing, verify the mechanical durability and fruit sorting efficiency, modify the problems and deviations in the design, check the practicality and efficiency of the mechanical structure, and generate deviation correction results;
[0011] S5: construct a prototype using the deviation correction result, and use the optimized lightweight CNN model to test under real-time conditions, record the spherical fruit sorting and processing speed, and obtain the prototype performance test results;
[0012] S6: According to the performance test results of the prototype, the prototype is adjusted, and the test is performed again to verify the effect of the improvement, and the optimization is repeated until the industry standard is reached to obtain the fruit sorting log.
[0013] As a further solution of the present invention, the fruit image data set includes visual information of spherical fruits of various sizes, differentiated colors and diverse textures, the optimized lightweight CNN model includes an image feature extraction layer, a lightweight connection layer and a classification output layer, the three-dimensional mechanical model design drawing includes an assembly line design, an automatic adjustment mechanism diagram and a sorting unit design customized for a variety of spherical fruits, the deviation correction results include structural reinforcement design, durability optimization measures and sorting channel optimization solutions for differentiated fruit size adjustment, the prototype performance test results include records of processing time, sorting quantity per hour and recognition probability of differentiated defective types of fruits, and the fruit sorting log includes mechanical failure records during the test phase, optimization and adjustment content and efficiency change results achieved after the test.
[0014] As a further solution of the present invention, multi-angle images of spherical fruits are collected and annotated, including size, color and texture, and visual data of intact and defective fruits are collected. The steps of obtaining a fruit image data set are specifically as follows:
[0015] S101: Select a variety of spherical fruits, including apples, oranges, and peaches, and use a camera to shoot them from multiple angles under different lighting conditions. Take multiple high-definition pictures of each fruit at different angles, including complete and defective samples, to generate an original image set;
[0016] S102: using the original image set, measuring the size of the fruit in each image, recording the diameter and volume of each fruit, and evaluating the color depth and consistency, associating the data with the corresponding image, and generating a fruit size measurement result;
[0017] S103: Based on the fruit size measurement results, a deep learning algorithm is used to analyze the texture of the spherical fruit surface, annotate the smoothness, hardness and surface defects of the fruit surface, including spots and scratches, annotate the features, and generate a fruit image dataset.
[0018] As a further solution of the present invention, the formula of the deep learning algorithm is as follows:
[0019]
[0020] Among them, S z is the score of fruit surface quality, α 1z Represents the weight coefficient of smoothness, α 2z Represents the weight coefficient of hardness, α 3z Represents the negative impact coefficient of surface defects, P z represents the smoothness score, H z Represents the hardness rating, D z Represents the number of defects detected, T z Represents the total number of tests.
[0021] As a further solution of the present invention, according to the fruit image data set, a lightweight CNN model is used to adjust parameters and perform performance tests through real-time image data, and the network structure is repeatedly optimized to match the preset fruit classification requirements. The steps of generating an optimized lightweight CNN model are specifically as follows:
[0022] S201: randomly selecting data from the fruit image dataset as a training set, a validation set, and a test set, respectively, matching the input format of a lightweight CNN, converting the images into a uniform size and color, and generating a standardized image set;
[0023] S202: using the standardized image set, designing an initialized lightweight CNN model architecture, including a convolutional layer, a pooling layer, and a fully connected layer, adjusting the number of filters according to the characteristics of the fruit image, and generating an initialized and adjusted CNN model;
[0024] S203: Based on the CNN model that has been initialized and adjusted, iterative parameter adjustments are performed by real-time monitoring of the loss value during training. Performance tests on the validation set are repeatedly performed by adjusting the number of convolutional layers and the type of activation functions to match the preset fruit classification requirements and generate an optimized lightweight CNN model.
[0025] As a further solution of the present invention, the optimized lightweight CNN model is used to initialize the embedded mechanical structure, and the design is performed according to the size and shape of the differentiated spherical fruit. The steps of outputting the three-dimensional mechanical model design drawing are specifically as follows:
[0026] S301: using the optimized lightweight CNN model to identify the size and shape of differentiated spherical fruits, analyzing the target size range and shape characteristics of each fruit, providing data for mechanical structure design, verifying the adaptability and functionality of the design, and generating fruit feature analysis results;
[0027] S302: creating an initialized three-dimensional mechanical structure model according to the fruit feature analysis result, designing adjustable holding and sorting components with reference to the processing requirements of differentiated spherical fruits, checking the adaptability of the model to various spherical fruits, and generating an initialized design sketch;
[0028] S303: Optimize the initialization design sketch, adjust the joints and gripping strength of the robotic arm, verify the speed and efficiency of the design in processing fruits of different sizes and textures, verify the effectiveness through simulation tests, check the safety of the design, and generate a three-dimensional mechanical model design drawing.
[0029] As a further solution of the present invention, based on the three-dimensional mechanical model design drawing, verifying the mechanical durability and fruit sorting efficiency, modifying the problems and deviations in the design, checking the practicality and efficiency of the mechanical structure, and generating the deviation correction results are specifically as follows:
[0030] S401: Based on the three-dimensional mechanical model design drawing, a mechanical prototype is constructed, and a physical test is performed to test the durability of the mechanical structure and the fruit sorting efficiency, the performance stability of the structure in continuous use is recorded, and a mechanical durability test result is generated;
[0031] S402: analyzing the mechanical durability test results, identifying problems and deviations in spherical fruit sorting, including structural wear, unstable operation and sorting errors, making design modifications based on the problems, optimizing the material selection and structural configuration of mechanical parts, and generating a design modification draft;
[0032] S403: Implement the design modification draft, update the components and structure of the mechanical prototype, conduct verification tests on durability and sorting efficiency again, check the practicality and sorting efficiency of the modified and optimized mechanical structure, and generate deviation correction results.
[0033] As a further solution of the present invention, a prototype is constructed using the deviation correction result, and the optimized lightweight CNN model is used for testing under real-time conditions, and the spherical fruit sorting and processing speed is recorded. The steps for obtaining the prototype performance test results are specifically as follows:
[0034] S501: Based on the deviation correction result, construct a prototype, including integrating the modified mechanical structure and automatic control, checking that the prototype simulates a complete operation process in a real-time working environment, and performing performance evaluation to generate a prototype performance evaluation result;
[0035] S502: Using the performance evaluation results of the prototype, the prototype is tested using the optimized lightweight CNN model under real-time conditions, the sorting and processing speed of the prototype for processing differentiated spherical fruits is monitored in real time, the processing efficiency of differentiated fruit types is recorded, and a real-time test configuration is generated;
[0036] S503: Analyze the real-time test configuration, evaluate the performance of the prototype under differentiated operating conditions, including fruit sorting and processing speed and mechanical durability, evaluate the overall performance and practicality of the prototype, meet industrial application standards, and obtain the prototype performance test results.
[0037] As a further solution of the present invention, according to the performance test results of the prototype, the prototype is adjusted, and the test is performed again to verify the effect of the improvement, and the optimization is repeated until the industry standard is reached. The steps of obtaining the fruit sorting log are specifically as follows:
[0038] S601: According to the performance test results of the prototype, identify and analyze the problems of the prototype in fruit sorting and processing, adjust the mechanical structure and software settings of the prototype, and generate a prototype adjustment plan;
[0039] S602: Implement the prototype adjustment plan, upgrade the hardware and optimize the software of the prototype, reconfigure the parameters of the lightweight CNN model to identify and process different types of spherical fruits, and generate an adjusted prototype configuration;
[0040] S603: Use the adjusted prototype to test in a real-time operating environment, record the sorting speed of the prototype in processing spherical fruits, repeatedly optimize and test until the performance of the prototype reaches the industry standard, check whether the stability and efficiency of the prototype meet the production requirements, and obtain a fruit sorting log.
[0041] The embedded grading and sorting system for spherical fruits based on lightweight CNN is used to execute the embedded grading and sorting method for spherical fruits based on lightweight CNN. The system comprises:
[0042] The image collection module collects multi-angle images of spherical fruits, including size, color and texture parameters, classifies images of intact and defective fruits, and generates a visual dataset;
[0043] The parameter optimization module uses the visual data set to adjust the parameters of the lightweight CNN model, test the network performance, make structural adjustments to meet the requirements of spherical fruit classification, and generate an optimized CNN model;
[0044] The mechanical design module uses the optimized CNN model to draw the embedded mechanical structure, adjust the design according to the size and shape of the spherical fruit, and generate a three-dimensional mechanical model diagram;
[0045] The durability test module performs durability and efficiency tests on the mechanical structure based on the three-dimensional mechanical model diagram, corrects problems and deviations in the design, and generates deviation correction results;
[0046] The performance verification module builds a prototype through the deviation correction results, uses the optimized CNN model for real-time testing, records the spherical fruit sorting and processing speed, adjusts the prototype multiple times, and repeatedly tests until it meets industry standards, generating a fruit sorting log.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are:
[0048] In the present invention, by collecting and marking the image data of spherical fruits from multiple angles, detailed identification of complete and defective fruits can be achieved, the diversity and quality of the data set are greatly improved, and a solid foundation is laid for the subsequent training of the CNN model. Real-time parameter adjustment and performance testing of the CNN model can ensure that the model achieves higher accuracy and efficiency in actual operation, and optimize the classification requirements of specific fruits to make the CNN model more in line with the needs of actual application scenarios. The optimized CNN model is applied to embedded systems, and the applicability and durability of the mechanical structure are improved through three-dimensional design drawings, ensuring the accuracy and efficiency of the sorting mechanism when processing fruits of different sizes and shapes. Through field testing of the prototype, the effectiveness of the model and mechanical structure is further verified, ensuring the high speed and high accuracy of the sorting process, and effectively improving the market competitiveness and consumer satisfaction of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0050] Figure 2 This is a detailed flow chart of S1 of the present invention;
[0051] Figure 3 This is a detailed flow chart of S2 of the present invention;
[0052] Figure 4This is a detailed flow chart of S3 of the present invention;
[0053] Figure 5 This is a detailed flow chart of S4 of the present invention;
[0054] Figure 6 This is a detailed flow chart of S5 of the present invention;
[0055] Figure 7 This is a detailed flow chart of S6 of the present invention;
[0056] Figure 8 It is a system flow chart of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0058] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0059] See also Figure 1 The present invention provides a technical solution, a spherical fruit embedded grading and sorting method based on lightweight CNN, comprising the following steps:
[0060] S1: Collect and annotate spherical fruit images from multiple angles, including size, color, and texture, collect visual data of intact and defective fruits, and obtain a fruit image dataset;
[0061] S2: Based on the fruit image dataset, the lightweight CNN model is used to adjust parameters and perform performance tests through real-time image data, repeatedly optimize the network structure, match the preset fruit classification requirements, and generate an optimized lightweight CNN model;
[0062] S3: The optimized lightweight CNN model is used to initialize the drawing of the embedded mechanical structure of the spherical fruit, and the design is performed according to the size and shape of the spherical fruit. The design is verified to match the differentiated types of fruits, and the three-dimensional mechanical model design drawing is output;
[0063] S4: Based on the 3D mechanical model design drawing, verify the mechanical durability and fruit sorting efficiency, modify the problems and deviations in the design, check the practicality and efficiency of the mechanical structure, and generate deviation correction results;
[0064] S5: Use the deviation correction results to build a prototype and test it using the optimized lightweight CNN model under real-time conditions, record the spherical fruit sorting and processing speed, analyze the data, propose optimization measures, and obtain the prototype performance test results;
[0065] S6: Adjust the prototype according to the performance test results of the prototype, test it again to verify the effect of the improvement, and optimize it repeatedly until it reaches the industry standard to obtain the fruit sorting log.
[0066] The fruit image dataset includes visual information of spherical fruits of various sizes, differentiated colors and diverse textures. The optimized lightweight CNN model includes an image feature extraction layer, a lightweight connection layer and a classification output layer. The three-dimensional mechanical model design drawings include assembly line design, automatic adjustment mechanism diagrams and sorting unit designs customized for a variety of spherical fruits. The deviation correction results include structural reinforcement design, durability optimization measures and sorting channel optimization solutions for differentiated fruit size adjustments. The prototype performance test results include records of processing time, sorting quantity per hour and recognition probability of differentiated defective types of fruits. The fruit sorting log includes records of mechanical failures during the test phase, optimization and adjustment content and efficiency change results achieved after the test.
[0067] See also Figure 2 , collect and annotate multi-angle images of spherical fruits, including size, color and texture, and collect visual data of intact and defective fruits. The specific steps for obtaining the fruit image dataset are as follows:
[0068] S101: Select a variety of spherical fruits, including apples, oranges, and peaches, and use a camera to shoot them from multiple angles under differentiated lighting conditions. Take multiple high-definition pictures of each fruit at different angles, including complete and defective samples. The execution process of generating the original image set is as follows;
[0069] Select a variety of spherical fruits and take high-definition pictures, including photographing apples, oranges and peaches under different lighting conditions and angles to ensure that each sample has a complete and defective version. Take at least five pictures of each fruit to obtain sufficient visual data. Set camera parameters such as ISO sensitivity, exposure time and aperture size to adapt to different lighting conditions. Use a tripod to ensure shooting stability and ensure that the quality of the pictures obtained meets the requirements of subsequent processing. The data of each picture includes shooting angle, lighting conditions and timestamp. The data will be used for subsequent image processing and analysis to generate the original image set.
[0070] S102: Using the original image set, measuring the size of the fruit in each image, recording the diameter and volume of each fruit, and evaluating the color depth and consistency, associating the data with the corresponding image, and generating the fruit size measurement result. The execution process is as follows;
[0071] Measure the size of the fruit in each picture and use the formula and A=πr 2 , calculate the volume V and surface area A of the fruit. Where r represents the radius of the fruit and π is the ratio of the circumference of a circle to its circumference.
[0072] Detailed explanation of the formula and the process of formula calculation: Assume that the diameter of an apple is measured to be 8 cm, that is, the radius r = 4 cm, and substitute it into the volume formula to get Cubic centimeters, and the surface area is calculated as A = π (4 2 )=16π≈50.24 square centimeters. The size data record of each fruit will be associated with a specific picture, providing a basis for subsequent data analysis.
[0073] S103: Based on the fruit size measurement results, a deep learning algorithm is used to analyze the texture of the spherical fruit surface, annotate the smoothness, hardness and surface defects of the fruit surface, including spots and scratches, annotate the features, and generate a fruit image data set. The execution process is as follows;
[0074] The formula for the deep learning algorithm is as follows:
[0075]
[0076] Among them, S z is the score of fruit surface quality, α 1z Represents the weight coefficient of smoothness, α 2z Represents the weight coefficient of hardness, α 3z Represents the negative impact coefficient of surface defects, P z represents the smoothness score, H z Represents the hardness rating, D z Represents the number of defects detected, T z Represents the total number of tests.
[0077] formula:
[0078]
[0079] Detailed explanation of the formula and the process of formula calculation and derivation:
[0080] The formula is used to calculate the fruit surface quality index, combining the image recognition technology analysis results with the actual test data.
[0081] 1. Smoothness P zThe image recognition software analyzes the surface images of the fruit and obtains a smoothness score. For example, by comparing the color uniformity and edge smoothness in the image, the score range is set from 0 to 100, and the actual smoothness obtained by monitoring is 85.
[0082] 2. Hardness H z The hardness was measured by a firmness tester, which assesses firmness by compressing the fruit and measuring the force required, also on a scale of 0 to 100, with the firmness measured at 75.
[0083] 3. Appearance defects D z The number of spots and scratches was automatically counted by image processing software. 20 spots and 5 scratches were collected for calculation, with a total of D z =25.
[0084] 4. Test times T z Indicates the total number of tests performed during the entire evaluation period. To ensure the statistical significance of the evaluation, the total number is set to 50.
[0085] 5. Weight coefficient α 1z , α 2z and α 3z They are 0.5, 0.3, and 0.2 respectively. The weights are set based on experimental data and statistical analysis to reflect the importance of different features in the overall quality assessment. The weights are set taking into account industry standards and market feedback, as well as expert advice.
[0086] Calculation derivation example:
[0087]
[0088] Calculation result S z =1.34472 represents the comprehensive score of fruit surface quality, which is used for classification and quality control. z Values indicate that the fruit surface quality is good and meets high quality standards. Numerical values can be used for further decision making, such as grading, pricing or recommendation to consumers.
[0089] See also Figure 3 ,According to the fruit image dataset, the lightweight CNN model is used to adjust parameters and test performance through real-time image data, and the network structure is repeatedly optimized to match the preset fruit classification requirements. The specific steps for generating the optimized lightweight CNN model are as follows:
[0090] S201: Randomly select data from the fruit image dataset as training set, validation set and test set, match the input format of lightweight CNN, convert the images into uniform size and color, and generate the standardized image set. The execution process is as follows;
[0091] Data is randomly selected from the fruit image dataset to prepare training sets, validation sets, and test sets. The selected images are uniformly resized and colored by applying image processing software to ensure that each image meets the input requirements of the lightweight CNN. For example, each image is adjusted to a fixed 256x256 pixel size using the OpenCV or PIL library, and color uniformity is ensured by grayscale processing or color balancing. The process also includes standardizing the contrast and brightness of the image to eliminate the impact of changes in lighting conditions. The processed images are stored as a standardized image set to prepare for subsequent deep learning model training and generate a standardized image set.
[0092] S202: Using the standardized image set, design an initialized lightweight CNN model architecture, including a convolutional layer, a pooling layer, and a fully connected layer, adjust the number of filters according to the characteristics of the fruit image, and generate the execution process of the initialized adjusted CNN model as follows;
[0093] Design the initialization of the lightweight CNN model architecture according to formula C out =C in ×K 2 ×D, calculate the number of output feature maps C of each convolutional layer out In the formula, C in represents the number of input feature maps, K represents the size of the convolution kernel, and D represents the depth or number of channels.
[0094] Detailed explanation of the formula and the process of formula calculation: Set the input layer of the initialization model to receive a feature map with 3 channels (RGB color), the convolution kernel size is set to 3x3, and 32 filters are used, then C in =3, K = 3, D = 32. Substituting into the formula, we get C out =3×3 2 ×32=864, which means that the first convolutional layer will generate 864 output feature maps. This ensures that various features in the image are fully extracted, and at the same time, considering the requirements of lightweight, the number of filters is appropriately adjusted to balance the complexity and computational efficiency of the model.
[0095] S203: Based on the CNN model adjusted by initialization, the loss value in training is monitored in real time, and the parameters are adjusted iteratively. The performance test on the validation set is repeatedly performed by adjusting the number of convolutional layers and the type of activation function to match the preset fruit classification requirements. The execution process of generating the optimized lightweight CNN model is as follows;
[0096] Based on the CNN model adjusted by initialization, the loss value during training is continuously monitored, and parameters are adjusted according to changes in the loss value, including adjusting the number of convolutional layers and the type of activation function to achieve the best fruit classification effect. By experimenting with different activation functions, such as ReLU, Sigmoid or Tanh, a function suitable for extracting specific fruit features is found. The number of convolutional layers is adjusted to optimize the network depth to ensure that the model is not overfitting while being able to effectively learn the subtle features of the fruit. After each iteration, performance tests are performed on the validation set, and parameters are adjusted until the preset classification accuracy is achieved. Changes are verified through regular validation set performance tests to generate an optimized lightweight CNN model.
[0097] See also Figure 4 ,The optimized lightweight CNN model is used to initialize the drawing of the embedded mechanical structure, and the design is performed according to the size and shape of the differentiated spherical fruits. The steps of outputting the 3D mechanical model design drawing are as follows:
[0098] S301: Use the optimized lightweight CNN model to identify the size and shape of differentiated spherical fruits, analyze the target size range and shape characteristics of each fruit, provide data for mechanical structure design, verify the adaptability and functionality of the design, and generate the execution process of fruit feature analysis results as follows;
[0099] Use the optimized lightweight CNN model to identify the size and shape of the fruit according to the formula A = π × r 2 and Calculate the surface area A and volume V of each fruit. In the formula, r represents the radius of the fruit and π is the ratio of the circumference of the circle. Formula explanation and formula calculation process: Assume that the diameter of an orange is 6 cm, that is, the radius r = 3 cm. Substitute it into the formula and calculate A = π × (3 2 )=9π≈28.27 square centimeters, volume The calculation process not only provides specific target dimensions for mechanical structure design, but also ensures that the design's adaptability and functionality meet actual operational requirements.
[0100] S302: Based on the results of the fruit feature analysis, an initialized three-dimensional mechanical structure model is created, and referring to the processing requirements of differentiated spherical fruits, adjustable gripping and sorting components are designed, and the adaptability of the model to various spherical fruits is checked. The execution process of generating an initialized design sketch is as follows;
[0101] Based on the results of the fruit feature analysis, an initialized three-dimensional mechanical structure model is created. The model is designed with adjustable holding and sorting components for various spherical fruits. The design is performed using CAD software to ensure that the size of each component can adapt to fruits of different sizes. Dynamic analysis is performed using simulation software such as SolidWorks to check whether the movements of each component are smooth and without interference. The part gaps and connection methods are adjusted to accommodate different operational requirements. At the same time, the model material is selected and verified to ensure that the durability and mechanical strength of the design meet actual application standards, and an initialized design sketch is generated.
[0102] S303: Optimize the initial design sketch, adjust the joints and gripping strength of the robot arm, verify the speed and efficiency of the design in processing fruits of different sizes and textures, verify the effectiveness through simulation tests, check the safety of the design, and generate the execution process of the three-dimensional mechanical model design drawing as follows;
[0103] Optimize the initial design sketch, adjust the joints and gripping force of the robotic arm, use computer-aided engineering (CAE) software for mechanical analysis, ensure that the robotic arm can withstand the load during operation, optimize the stress distribution and fatigue life in the design, adjust the gripping force to match fruits of different textures to prevent damage, evaluate the response speed and accuracy of the robotic arm in actual operation through simulation tests, ensure that the design can efficiently handle fruits of various sizes and textures, conduct safety assessments, verify the effectiveness of emergency stop and fault recovery strategies by simulating unexpected situations, ensure the safety of operation, and generate a three-dimensional mechanical model design drawing.
[0104] See also Figure 5 , based on the 3D mechanical model design drawing, verify the mechanical durability and fruit sorting efficiency, modify the problems and deviations in the design, check the practicality and efficiency of the mechanical structure, and generate the deviation correction results in the following steps:
[0105] S401: Based on the three-dimensional mechanical model design drawing, a mechanical prototype is constructed and a physical test is performed to test the durability of the mechanical structure and the fruit sorting efficiency, and the performance stability of the structure in continuous use is recorded. The execution process of generating the mechanical durability test results is as follows;
[0106] Based on the 3D mechanical model design drawing, a mechanical prototype was constructed and physical tests were carried out, focusing on evaluating the durability of the mechanical structure and the fruit sorting efficiency. By simulating continuous operation in a laboratory environment, the processing speed and accuracy of different fruits were recorded, the wear and motion accuracy of each key component were regularly checked, and the dynamics of the sorting process were recorded with a high-speed camera. The movement smoothness of the robot arm and the adaptability of the sorting head were analyzed. The collected data included the sorting success rate, operation time and mechanical failure rate, and the performance stability of the structure in continuous use was comprehensively evaluated to generate mechanical durability test results.
[0107] S402: Analyze the mechanical durability test results, identify the problems and deviations in the spherical fruit sorting, including structural wear, unstable operation and sorting errors, make design modifications based on the problems, optimize the material selection and structural configuration of mechanical parts, and generate the design modification draft. The execution process is as follows;
[0108] Identify problems and deviations in ball fruit sorting, according to the formula Calculate the sorting error rate E s Where N errors Represents the number of sorting errors, N total Represents the total number of sorts in the test.
[0109] Detailed explanation of the formula and the process of formula calculation: In a test, a total of 10,000 sortings were performed, of which 15 sorting errors were found. Substituting into the formula, we get The calculation of the error rate not only helps to identify the main problems in sorting, but also provides a quantitative indicator to evaluate the sorting accuracy of the mechanical structure. Further design modifications and material optimization will be carried out based on the data.
[0110] S403: Implement the design modification draft, update the components and structure of the mechanical prototype, conduct the durability and sorting efficiency verification test again, check the practicality and sorting efficiency of the modified and optimized mechanical structure, and generate the deviation correction results. The execution process is as follows;
[0111] Implement the draft design modification, update the components and structure of the mechanical prototype, and conduct verification tests on durability and sorting efficiency again. The process includes replacing easily worn parts, adjusting the strength and accuracy of the gripping parts, and evaluating the specific impact of the modifications on the mechanical performance through retesting. Use sensors and real-time monitoring systems to track all stages of mechanical operation, paying special attention to the performance of the modified parts under high-load conditions. Compare the data differences between the two tests through statistical analysis to ensure that the modifications improve the sorting efficiency and reduce the error rate, guide future design directions, ensure that the mechanical structure reaches higher performance and safety standards in actual applications, and generate deviation correction results.
[0112] See also Figure 6 , the prototype was built using the deviation correction results, and the optimized lightweight CNN model was used for testing under real-time conditions, and the ball fruit sorting and processing speed were recorded. The specific steps for obtaining the prototype performance test results are as follows:
[0113] S501: Based on the deviation correction results, a prototype is constructed, including integrating the modified mechanical structure and automatic control, checking that the prototype simulates a complete operation process in a real-time working environment, and performing performance evaluation. The execution process for generating the prototype performance evaluation results is as follows;
[0114] Based on the deviation correction results, a prototype is built, and the modified mechanical structure is integrated with the automatic control system. The prototype simulates the complete operating process in a real-time working environment, and uses sensors and monitoring technology to collect data in real time to ensure that each action of the prototype meets the predetermined operating parameters. The response time and processing capability of the prototype are checked, and the adaptability and reliability of the prototype are tested by simulating various working conditions. The performance stability and operating efficiency of the prototype in continuous operation are evaluated, and the energy consumption and failure rate data during operation are collected and analyzed to generate prototype performance evaluation results. The results will be used to further optimize the prototype design and generate prototype performance evaluation results.
[0115] S502: Using the performance evaluation results of the prototype, the prototype is tested using the optimized lightweight CNN model under real-time conditions, the sorting and processing speed of the prototype for differentiated spherical fruits is monitored in real time, the processing efficiency of differentiated fruit types is recorded, and the execution process of generating a real-time test configuration is as follows;
[0116] Using the performance evaluation results of the prototype, the prototype was tested using the optimized lightweight CNN model under real-time conditions. The sorting and processing speed of the prototype for differentiated spherical fruits was monitored in real time. A monitoring system was set up to record the time and accuracy of processing various fruits. The processing efficiency of different fruit types was evaluated through data analysis software. Statistical analysis was performed on the collected data to compare the expected and actual performance data and identify performance bottlenecks. The information will be used to adjust and optimize the configuration of the prototype and generate a real-time test configuration.
[0117] S503: Analyze the real-time test configuration, evaluate the performance of the prototype under differentiated operating conditions, including fruit sorting and processing speed and mechanical durability, evaluate the overall performance and practicality of the prototype, and meet industrial application standards. The execution process of obtaining the prototype performance test results is as follows;
[0118] Evaluate the performance of the prototype under different operating conditions, according to the formula Calculate the efficiency E of the prototype g Where, T actual Represents the actual operation time, T expected Represents the expected operation time.
[0119] Detailed explanation of the formula and the process of formula calculation: The expected time for the prototype to process a batch of fruits is set to 120 seconds, and the actual operation time is recorded as 150 seconds. Substituting it into the formula, we get The ratio indicates that the operating efficiency of the prototype exceeds expectations, either because the performance is improved by optimizing the mechanical structure and control system, or because the test conditions are different from the actual operating environment, guiding subsequent adjustments to ensure that the prototype meets higher industrial standards and performance requirements in actual applications.
[0120] See also Figure 7 According to the performance test results of the prototype, the prototype is adjusted, and the test is conducted again to verify the effect of the improvement. The optimization is repeated until it reaches the industry standard. The specific steps of the fruit sorting log are as follows:
[0121] S601: According to the performance test results of the prototype, identify and analyze the problems of the prototype in fruit sorting and processing, adjust the mechanical structure and software settings of the prototype, and generate the execution process of the prototype adjustment plan as follows;
[0122] Identify and analyze the problems of the prototype in fruit sorting and processing, according to the formula Calculate the failure rate E of the prototype a Where N fail Represents the number of failed sortings, N total Represents the total number of sortings.
[0123] Detailed explanation of the formula and the process of formula calculation and derivation: In a complete test cycle, the prototype is sorted 500 times, of which 10 failures are recorded. Substituting into the formula, we get The failure rate provides a clear indicator to evaluate the reliability of the prototype in actual operation and guides the necessary mechanical structure and software setting adjustments to reduce the failure rate, thereby improving the overall sorting efficiency.
[0124] S602: Implement the prototype adjustment plan, upgrade the hardware and optimize the software of the prototype, reconfigure the parameters of the lightweight CNN model to identify and process the spherical fruits of different types, and generate the execution process of the adjusted prototype configuration as follows;
[0125] Implement the prototype adjustment plan, upgrade the hardware and optimize the software of the prototype, reconfigure the parameters of the lightweight CNN model to better identify and process differentiated types of spherical fruits, including adjusting the camera position to improve the clarity of image capture, updating the sensor to improve the accuracy of data collection, optimizing the layer structure and activation function in the CNN model, adjusting the learning rate and weight decay strategy, and testing by simulating the actual operating environment to verify whether the adjusted hardware and software can process different types of fruits more efficiently. The adjustment ensures that the performance optimization of the prototype can meet a wider range of application needs and generates the adjusted prototype configuration.
[0126] S603: Use the adjusted prototype to test in a real-time operating environment, record the sorting speed of the prototype in processing spherical fruits, repeatedly optimize and test until the performance of the prototype reaches the industry standard, check whether the stability and efficiency of the prototype meet the production requirements, and obtain the execution process of the fruit sorting log as follows;
[0127] Use the adjusted prototype to test in a real-time operating environment, record the prototype's sorting speed for spherical fruits, and through repeated optimization and testing, ensure that each iterative performance improvement is accurately recorded and analyzed. Collect key operating data such as sorting speed and error rate, conduct in-depth analysis of the test results through data analysis software, adjust operating parameters and mechanical settings to continue to improve performance until the performance of the prototype reaches industry standards. The records help the engineering team monitor the stability and efficiency of the prototype in continuous operation, ensure that the prototype meets the high standards of production needs, and obtain a fruit sorting log.
[0128] See also Figure 8 , a spherical fruit embedded grading and sorting system based on lightweight CNN, a spherical fruit embedded grading and sorting system based on lightweight CNN is used to execute the above-mentioned spherical fruit embedded grading and sorting method based on lightweight CNN, and the system includes:
[0129] The image collection module collects multi-angle images of spherical fruits, including size, color and texture parameters, classifies images of intact and defective fruits, and generates a visual dataset;
[0130] The parameter optimization module uses the visual data set to adjust the parameters of the lightweight CNN model, test the network performance, make structural adjustments to meet the requirements of spherical fruit classification, and generate an optimized CNN model;
[0131] The mechanical design module uses the optimized CNN model to draw the embedded mechanical structure, adjust the design according to the size and shape of the spherical fruit, and generate a three-dimensional mechanical model diagram;
[0132] The durability test module conducts durability and efficiency tests on mechanical structures based on the three-dimensional mechanical model diagram, corrects problems and deviations in the design, and generates deviation correction results;
[0133] The performance verification module builds a prototype through deviation correction results, uses the optimized CNN model for real-time testing, records the spherical fruit sorting and processing speed, adjusts the prototype multiple times, and repeatedly tests until it meets industry standards, generating a fruit sorting log.
[0134] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. An embedded grading and sorting method for spherical fruits based on lightweight CNN is characterized by: The following steps are involved: Collect and annotate spherical fruit images from multiple angles, including size, color, and texture, collect visual data of intact and defective fruits, and obtain a fruit image dataset; According to the fruit image dataset, a lightweight CNN model is used to adjust parameters and perform performance tests through real-time image data, and the network structure is repeatedly optimized to match the preset fruit classification requirements, thereby generating an optimized lightweight CNN model; Using the optimized lightweight CNN model, the embedded mechanical structure is initially drawn, and the design is performed according to the size and shape of the differentiated spherical fruit, and a three-dimensional mechanical model design drawing is output; Based on the three-dimensional mechanical model design drawing, verify the mechanical durability and fruit sorting efficiency, modify the problems and deviations in the design, check the practicality and efficiency of the mechanical structure, and generate deviation correction results; Using the deviation correction results, a prototype was constructed, and the optimized lightweight CNN model was used for testing under real-time conditions, the spherical fruit sorting and processing speed was recorded, and the prototype performance test results were obtained; According to the performance test results of the prototype, the prototype is adjusted, tested again to verify the effect of the improvement, and optimized repeatedly until it reaches the industry standard to obtain the fruit sorting log.
2. The spherical fruit embedded grading and sorting method based on lightweight CNN according to claim 1, characterized in that, The fruit image dataset includes visual information of spherical fruits of various sizes, differentiated colors and diverse textures; the optimized lightweight CNN model includes an image feature extraction layer, a lightweight connection layer and a classification output layer; the three-dimensional mechanical model design drawing includes an assembly line design, an automatic adjustment mechanism diagram and a sorting unit design customized for various spherical fruits; the deviation correction results include structural reinforcement design, durability optimization measures and a sorting channel optimization solution for differentiated fruit size adjustment; the prototype performance test results include a record of processing time, the number of sortings per hour and the recognition probability of differentiated defective types of fruits; the fruit sorting log includes a record of mechanical failures during the test phase, the content of optimization and adjustment and the efficiency change results achieved after the test.
3. The spherical fruit embedded grading and sorting method based on lightweight CNN according to claim 1, characterized in that, Collect and annotate spherical fruit images from multiple angles, including size, color, and texture, and collect visual data of intact and defective fruits. The steps to obtain the fruit image dataset are as follows: Select a variety of spherical fruits, including apples, oranges and peaches, and use a camera to shoot them from multiple angles under different lighting conditions. Take multiple high-definition pictures of each fruit at different angles, including complete and defective samples, to generate an original image set. Using the original image set, measuring the size of the fruit in each image, recording the diameter and volume of each fruit, and evaluating the color depth and consistency, associating the data with the corresponding image, and generating a fruit size measurement result; Based on the fruit size measurement results, a deep learning algorithm is used to analyze the texture of the spherical fruit surface, annotate the smoothness, hardness and surface defects of the fruit surface, including spots and scratches, annotate the features, and generate a fruit image dataset.
4. The spherical fruit embedded grading and sorting method based on lightweight CNN according to claim 3 is characterized in that, The formula of the deep learning algorithm is as follows: Among them, S z is the score of fruit surface quality, α 1z Represents the weight coefficient of smoothness, α 2z Represents the weight coefficient of hardness, α 3z Represents the negative impact coefficient of appearance defects, P z represents the smoothness score, H z Represents the hardness rating, D z Represents the number of defects detected, T z Represents the total number of tests.
5. The spherical fruit embedded grading and sorting method based on lightweight CNN according to claim 1 is characterized in that, According to the fruit image dataset, the lightweight CNN model is used to adjust parameters and perform performance tests through real-time image data, and the network structure is repeatedly optimized to match the preset fruit classification requirements. The steps of generating the optimized lightweight CNN model are as follows: Randomly select data from the fruit image dataset as training set, validation set and test set, respectively, match the input format of lightweight CNN, convert the images into uniform size and color, and generate a standardized image set; Using the standardized image set, designing an initialized lightweight CNN model architecture, including a convolutional layer, a pooling layer, and a fully connected layer, adjusting the number of filters according to the characteristics of the fruit image, and generating an initialized and adjusted CNN model; Based on the CNN model adjusted by initialization, the loss value in training is monitored in real time to perform iterative parameter adjustment. By adjusting the number of convolutional layers and the type of activation function, performance tests on the validation set are repeatedly performed to match the preset fruit classification requirements and generate an optimized lightweight CNN model.
6. The spherical fruit embedded grading and sorting method based on lightweight CNN according to claim 1 is characterized in that, The optimized lightweight CNN model is used to initialize the embedded mechanical structure, and the design is performed according to the size and shape of the differentiated spherical fruit. The steps of outputting the three-dimensional mechanical model design drawing are as follows: Using the optimized lightweight CNN model to identify the size and shape of differentiated spherical fruits, analyzing the target size range and shape characteristics of each fruit, providing data for mechanical structure design, verifying the adaptability and functionality of the design, and generating fruit feature analysis results; According to the analysis results of the fruit characteristics, an initialized three-dimensional mechanical structure model is created, and referring to the processing requirements of differentiated spherical fruits, adjustable holding and sorting components are designed, the adaptability of the model to various spherical fruits is checked, and an initialized design sketch is generated; The initial design sketch is optimized, the joints and gripping strength of the robotic arm are adjusted, the speed and efficiency of the design in processing fruits of different sizes and textures are verified, the performance is verified through simulation tests, the safety of the design is checked, and a three-dimensional mechanical model design drawing is generated.
7. The method for spherical fruit embedded classification and sorting based on lightweight CNN according to claim 1, characterized in that: Based on the three-dimensional mechanical model design drawing, verify the mechanical durability and fruit sorting efficiency, modify the problems and deviations in the design, check the practicality and efficiency of the mechanical structure, and generate the deviation correction results in the following steps: Based on the three-dimensional mechanical model design drawing, a mechanical prototype is constructed and a physical test is performed to test the durability of the mechanical structure and the fruit sorting efficiency, the performance stability of the structure in continuous use is recorded, and a mechanical durability test result is generated; Analyze the mechanical durability test results, identify problems and deviations in spherical fruit sorting, including structural wear, unstable operation and sorting errors, make design modifications to address the problems, optimize the material selection and structural configuration of mechanical components, and generate a design modification draft; Implement the draft design modification, update the components and structure of the mechanical prototype, conduct verification tests on durability and sorting efficiency again, check the practicality and sorting efficiency of the modified and optimized mechanical structure, and generate deviation correction results.
8. The method for spherical fruit embedded grading and sorting based on lightweight CNN according to claim 1, characterized in that: The prototype was constructed using the deviation correction results, and the optimized lightweight CNN model was used for testing under real-time conditions. The spherical fruit sorting and processing speeds were recorded. The specific steps for obtaining the prototype performance test results were as follows: Based on the deviation correction results, construct a prototype, including integrating the modified mechanical structure and automatic control, checking that the prototype simulates a complete operation process in a real-time working environment, and performing performance evaluation to generate a prototype performance evaluation result; Using the performance evaluation results of the prototype, the prototype is tested using the optimized lightweight CNN model under real-time conditions, the sorting and processing speed of the prototype for differentiated spherical fruits is monitored in real time, the processing efficiency of differentiated fruit types is recorded, and a real-time test configuration is generated; The real-time test configuration is analyzed to evaluate the performance of the prototype under differentiated operating conditions, including fruit sorting and processing speed and mechanical durability, to evaluate the overall performance and practicality of the prototype to meet industrial application standards, and to obtain the prototype performance test results.
9. The method for spherical fruit embedded classification and sorting based on lightweight CNN according to claim 1, characterized in that: According to the performance test results of the prototype, the prototype is adjusted, tested again to verify the effect of the improvement, and optimized repeatedly until it reaches the industry standard. The steps to obtain the fruit sorting log are as follows: According to the performance test results of the prototype, identify and analyze the problems of the prototype in fruit sorting and processing, adjust the mechanical structure and software settings of the prototype, and generate a prototype adjustment plan; Implement the prototype adjustment plan, upgrade the hardware and optimize the software of the prototype, reconfigure the parameters of the lightweight CNN model to identify and process the differentiated types of spherical fruits, and generate an adjusted prototype configuration; The adjusted prototype is used to perform tests in a real-time operating environment, and the sorting speed of the prototype in processing spherical fruits is recorded. Optimization and testing are repeated until the performance of the prototype reaches the industry standard, and the stability and efficiency of the prototype are checked to meet production requirements, and a fruit sorting log is obtained.
10. The embedded grading and sorting system of spherical fruits based on lightweight CNN is characterized by: According to any one of claims 1 to 9, the method for embedded grading and sorting of spherical fruits based on lightweight CNN comprises: The image collection module collects multi-angle images of spherical fruits, including size, color and texture parameters, and classifies images of intact and defective fruits to generate a visual dataset; The parameter optimization module uses the visual data set to adjust the parameters of the lightweight CNN model, test the network performance, make structural adjustments to meet the requirements of spherical fruit classification, and generate an optimized CNN model; The mechanical design module uses the optimized CNN model to draw the embedded mechanical structure, adjust the design according to the size and shape of the spherical fruit, and generate a three-dimensional mechanical model diagram; The durability test module performs durability and efficiency tests on the mechanical structure based on the three-dimensional mechanical model diagram, corrects problems and deviations in the design, and generates deviation correction results; The performance verification module builds a prototype through the deviation correction results, uses the optimized CNN model for real-time testing, records the spherical fruit sorting and processing speed, adjusts the prototype multiple times, and repeatedly tests until it meets industry standards, generating a fruit sorting log.
Citation Information
Cited By
Monocular omnidirectional vision spherical fruit and vegetable sorting method and system
CN122702699A