A method for identifying the longitudinal and transverse diameters of grape grains based on intelligent image algorithms
By analyzing the spacing and historical accuracy of adjacent grape grains, appropriate intelligent algorithms are selected, and using recognition deviations and reliability coefficients, high accuracy recognition of grape grain vertical and horizontal diameters is achieved, solving the problem of difficulty in identification caused by concentrated grape grain distribution.
Patent Information
- Application Number
- CN202510293270.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-13
AI Technical Summary
In the vertical and horizontal diameter identification process of grape grains, the identification is too difficult because the grape grain distribution is too concentrated, and it is difficult for the prior art to achieve accurate identification.
By analyzing the spacing distribution between adjacent grape grains, the accuracy of the vertical and horizontal diameter recognition of grape grains is determined, and intelligent algorithms with high historical accuracy are selected. The identification deviation data and reliability coefficients are used to match the optimal algorithm to output the identification results to ensure the accuracy of the identification results.
It improves the accuracy of the recognition of vertical and horizontal diameters of grape grains, avoids the problem of inaccurate identification caused by a single algorithm, and ensures the reliability of the identification results.
Smart Images

Figure CN119810479B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and particularly relates to a method for identifying the vertical and horizontal diameters of grape grains based on an intelligent image algorithm. Background Art
[0002] In order to realize the recognition and processing of the vertical and horizontal diameters of grape grains, in the patent application for invention CN202410627615.0 "Method for Efficient Evaluation of Grape Quality Based on Machine Vision", the suspected sub-edges of grapes in the main grape image are used to evaluate the plumpness and bad point degree of grapes, and then the quality coefficient of grapes is obtained to determine the quality evaluation result of grapes. However, through analysis, the following technical problems exist:
[0003] During the process of recognizing and processing the vertical and horizontal diameters of grape grains, since the distribution of grape grains is often too concentrated, it makes the recognition and processing of the vertical and horizontal diameters of grape grains too difficult.
[0004] In view of the above technical problems, specifically, the present application provides a method for identifying the vertical and horizontal diameters of grape grains based on an intelligent image algorithm. Summary of the Invention
[0005] To achieve the object of the present invention, the present invention adopts the following technical solutions:
[0006] A method for identifying the vertical and horizontal diameters of grape grains based on an intelligent image algorithm specifically includes:
[0007] S1 Based on the spacing distribution between adjacent grape grains of the recognition target, when it is determined that the recognition accuracy of the vertical and horizontal diameters of the grape grains meets the requirements, determine the grape variety of the recognition target;
[0008] S2 Based on the grape variety of the recognition target and the spacing distribution between adjacent grape grains, determine the historical accuracy of different intelligent algorithms during the vertical and horizontal diameter recognition process, and use the historical accuracy to determine the screening intelligent algorithm in the intelligent algorithms;
[0009] S3 Determine the recognition processing results of the vertical and horizontal diameters of grape grains of different screening intelligent algorithms. Use the preset interval of the vertical and horizontal diameters of the recognition target and the recognition processing results to determine the distribution data of the recognized deviation grape grains in different screening intelligent algorithms, and combine the deviation data of different recognized deviation grape grains to determine the recognition reliability coefficient and the matching intelligent algorithm of different screening intelligent algorithms;
[0010] S4 Based on the recognition processing results and the recognition reliability coefficient of different matching intelligent algorithms, output the recognition results of the vertical and horizontal diameters of the grape grains of the recognition target.
[0011] The beneficial effects of the present invention are as follows:
[0012] Using the distribution data and deviation data of the identified deviated grape grains in different screening intelligent algorithms to determine the matching intelligent algorithm in the screening intelligent algorithm, thereby realizing the determination of the matching intelligent algorithm with a relatively high reliability of recognition processing from the deviation between the recognition processing result of the screening intelligent algorithm and the preset interval of the vertical and horizontal diameters, avoiding the influence of the screening intelligent algorithm with low recognition reliability on the recognition result of the vertical and horizontal diameters of the final grape grains, and improving the accuracy of the recognition result.
[0013] Based on the recognition processing results and recognition reliability coefficients of different matching intelligent algorithms, output the recognition results of the vertical and horizontal diameters of the grape grains as the recognition target, realizing the output of the recognition results of the vertical and horizontal diameters of the grape grains as the recognition target from the recognition processing results of multiple matching intelligent algorithms, avoiding the technical problem of inaccurate recognition results of the vertical and horizontal diameters caused by solely using a certain matching intelligent algorithm, and ensuring the accuracy of the recognition processing results.
[0014] A further technical solution lies in that the spacing distribution between adjacent grape grains is determined according to the image recognition result of the grape grains, specifically determined according to the analysis result of the image of the recognition target.
[0015] A further technical solution lies in that the method for determining the recognition accuracy rate of the vertical and horizontal diameters of the grape grains is as follows:
[0016] Determine the spacing distribution amount between adjacent grape grains based on the spacing distribution between adjacent grape grains of the recognition target;
[0017] Based on the preset recognition accuracy rates corresponding to different spacing distribution amount intervals, determine the matching accuracy rates of different spacing distribution amount intervals;
[0018] Based on the proportion of the number of grape grains in different spacing distribution amount intervals, determine the weight coefficients of different spacing distribution amount intervals, and combine the matching accuracy rates of different spacing distribution amount intervals to determine the recognition accuracy rate of the vertical and horizontal diameters of the grape grains.
[0019] A further technical solution lies in that the value range of the recognition accuracy rate of the vertical and horizontal diameters of the grape grains is between 0 and 1. When the recognition accuracy rate of the vertical and horizontal diameters of the grape grains is greater than the preset accuracy rate threshold, it is determined that the recognition accuracy rate of the vertical and horizontal diameters of the grape grains meets the requirements.
[0020] A further technical solution lies in that the method for outputting the recognition results of the vertical and horizontal diameters of the grape grains as the recognition target is as follows:
[0021] Determine the recognition results of the vertical and horizontal diameters of different grape grains of the recognition target in the matching intelligent algorithm based on the recognition processing result of the matching intelligent algorithm;
[0022] Based on the deviation amounts of the recognition results of the vertical and horizontal diameters of different grape grains in different matching intelligent algorithms, divide the recognition results into different similarity intervals;
[0023] Determine the sum of the recognition reliability coefficients of the matching intelligent algorithms corresponding to the recognition results in different similarity intervals as the sum of the recognition reliability coefficients in different similarity intervals, and take the similarity interval with the largest sum of recognition reliability coefficients as the matching similarity interval;
[0024] Take the average value of the recognition results of the vertical and horizontal diameters of different matching intelligent algorithms in the matching similarity interval as the output of the recognition result of the vertical and horizontal diameters of the grape grains.
[0025] A further technical solution lies in that dividing the recognition results into different similarity intervals specifically includes:
[0026] Divide the recognition results with the deviation amount of the vertical and horizontal diameters within the preset deviation amount interval into the same similarity interval.
[0027] Other features and advantages will be described in the subsequent specification. The objectives and other advantages of the present invention are achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0028] To make the above objectives, features, and advantages of the present invention more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. Description of the Drawings
[0029] By referring to the accompanying drawings and describing its exemplary embodiments in detail, the above and other features and advantages of the present invention will become more obvious;
[0030] Figure 1 is a flowchart of a method for recognizing the vertical and horizontal diameters of grape grains based on an intelligent image algorithm;
[0031] Figure 2 is a flowchart of a method for determining the recognition accuracy rate of the vertical and horizontal diameters of grape grains;
[0032] Figure 3 is a flowchart of a method for determining a screening intelligent algorithm in an intelligent algorithm;
[0033] Figure 4 is a flowchart of a method for determining the recognition reliability coefficient of a screening intelligent algorithm. Detailed Embodiments
[0034] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this specification.
[0035] In the process of identifying the longitudinal and transverse diameters of grape grains, since the distribution of grape grains is often too concentrated, it makes the difficulty of identifying the longitudinal and transverse diameters of grape grains too great. Therefore, it is necessary to comprehensively combine multiple intelligent image algorithms to identify the aspect ratio of grape grains.
[0036] Based on the proportion of the number of grape grains in different interval distributions of the spacing distribution amount, determine the weight coefficients for different interval distributions of the spacing distribution amount, and use the sum of the products of the weight coefficients and the preset accuracy rates for different interval distributions of the spacing distribution amount to determine the recognition accuracy rate of the longitudinal and transverse diameters of grape grains. When the recognition accuracy rate is greater than 0.6, it is determined that the recognition accuracy rate of the longitudinal and transverse diameters of grape grains meets the requirements.
[0037] Based on the historical accuracy rate of the intelligent algorithm when performing the identification process of the longitudinal and transverse diameters, count the number of times when the recognition accuracy rate is greater than the preset accuracy rate. When the proportion of the number of times when the recognition accuracy rate is greater than the preset accuracy rate is greater than 0.5, it is determined that the intelligent algorithm is a screening intelligent algorithm.
[0038] Based on the distribution data of the recognized deviation grape grains in the screening intelligent algorithm, determine the distribution quantity of the recognized deviation grape grains corresponding to the screening intelligent algorithm. Based on the proportion of the number of recognized deviation grape grains in the number of recognition targets, determine the recognition reliability coefficient of the screening intelligent algorithm, and use the screening intelligent algorithm with a recognition reliability coefficient greater than 0.9 as the matching intelligent algorithm.
[0039] According to the average values of the recognition results of the longitudinal and transverse diameters of grape grains by different matching intelligent algorithms, determine the recognition result of the longitudinal and transverse diameters of the grape grains of the recognition target.
[0040] The intelligent algorithms include Convolutional Neural Networks (CNN), Support Vector Machines (SVM), Decision Trees, Random Forests, and K-Nearest Neighbors (KNN).
[0041] Embodiment 1
[0042] To solve the above problems, according to one aspect of the present invention, as Figure 1 shown, a method for identifying the vertical and horizontal diameters of grape grains based on an intelligent image algorithm is provided, specifically including:
[0043] S1 Identify the spacing distribution between adjacent grape grains of the identification target. When the identification accuracy of the vertical and horizontal diameters of the grape grains meets the requirements, determine the grape variety of the identification target;
[0044] Furthermore, the spacing distribution between adjacent grape grains is determined according to the image recognition result of the grape grains, specifically determined according to the analysis result of the image of the identification target.
[0045] Specifically, as Figure 2 shown, the method for determining the identification accuracy of the vertical and horizontal diameters of the grape grains is:
[0046] Based on the spacing distribution between adjacent grape grains of the identification target, determine the spacing distribution amount between adjacent grape grains;
[0047] Based on the preset identification accuracy corresponding to different spacing distribution amount intervals, determine the matching accuracy of different spacing distribution amount intervals;
[0048] Based on the proportion of the number of grape grains in different spacing distribution amount intervals, determine the weight coefficient of different spacing distribution amount intervals, and combine the matching accuracy of different spacing distribution amount intervals to determine the identification accuracy of the vertical and horizontal diameters of the grape grains.
[0049] Optionally, the value range of the identification accuracy of the vertical and horizontal diameters of the grape grains is between 0 and 1. When the identification accuracy of the vertical and horizontal diameters of the grape grains is greater than the preset accuracy threshold, it is determined that the identification accuracy of the vertical and horizontal diameters of the grape grains meets the requirements.
[0050] In one possible embodiment, the method for determining the identification accuracy of the vertical and horizontal diameters of the grape grains is:
[0051] Based on the spacing distribution between adjacent grape grains of the identification target, determine the spacing distribution amount between adjacent grape grains. When the spacing distribution amounts between different adjacent grape grains are all greater than the preset distance threshold, it is determined that the identification accuracy of the vertical and horizontal diameters of the grape grains meets the requirements;
[0052] When there are grape grains with a spacing distribution amount not greater than the preset distance threshold:
[0053] Take the grape grains with a spacing distribution amount not greater than the preset distance threshold as adjacent grape grains. When the number of the adjacent grape grains is greater than the preset number of grape grains, it is determined that the identification accuracy of the vertical and horizontal diameters of the grape grains does not meet the requirements;
[0054] When the number of adjacent grape grains is not greater than the preset number of grape grains:
[0055] Based on the preset recognition accuracies corresponding to different interval ranges of the spacing distribution amount, determine the matching accuracies of different interval ranges of the spacing distribution amount. When the number of grape grains in the preset interval range of the spacing distribution amount does not meet the requirements, it is determined that the recognition accuracy of the vertical and horizontal diameters of the grape grains does not meet the requirements;
[0056] When the number of grape grains in the preset interval range of the spacing distribution amount does not meet the requirements:
[0057] Based on the proportion of the number of grape grains in different interval ranges of the spacing distribution amount, determine the weight coefficients of different interval ranges of the spacing distribution amount, and use the ratio of the matching accuracy to the weight coefficient to determine the corrected recognition accuracy. When the corrected recognition accuracies of different interval ranges of the spacing distribution amount all meet the requirements, it is determined that the recognition accuracy of the vertical and horizontal diameters of the grape grains meets the requirements;
[0058] When there is an interval range of the spacing distribution amount with a corrected recognition accuracy that does not meet the requirements:
[0059] Take the interval range of the spacing distribution amount with a corrected recognition accuracy that does not meet the requirements as the recognition deviation interval. When the number of the recognition deviation intervals is greater than the preset number of deviation intervals, it is determined that the recognition accuracy of the vertical and horizontal diameters of the grape grains does not meet the requirements;
[0060] When the number of the recognition deviation intervals is not greater than the preset number of deviation intervals:
[0061] Determine the recognition accuracy of the vertical and horizontal diameters of the grape grains through the weight coefficients and the matching accuracies of different interval ranges of the spacing distribution amount, and determine the recognition accuracy of the vertical and horizontal diameters of the grape grains.
[0062] It should be noted that the grape variety of the recognition target is determined according to the image recognition result of the recognition target. Take the image of the recognition target as the input quantity, and use the output quantity of the preset grape variety recognition model as the image recognition result of the recognition target.
[0063] S2. Based on the grape variety of the recognition target and the spacing distribution situation between adjacent grape grains, determine the historical accuracies of different intelligent algorithms in performing vertical and horizontal diameter recognition processing, and use the historical accuracies to determine the screening intelligent algorithm in the intelligent algorithms;
[0064] Furthermore, the historical accuracy of the intelligent algorithm in performing vertical and horizontal diameter recognition processing is determined according to the recognition accuracy of the number of similar recognition times of the intelligent algorithm in the grape variety.
[0065] It should be noted that the number of similar identifications is the number of identifications in which the deviation of the number of grape grains in different interval distributions of the spacing is within the preset deviation number interval.
[0066] Specifically, as Figure 3 shown, the method for determining the screening intelligent algorithm in the intelligent algorithm is as follows:
[0067] Based on the recognition accuracy rate of the number of similar identifications in the grape variety, determine the recognition accuracy rate at different numbers of similar identifications;
[0068] Utilize the recognition accuracy rate at different numbers of similar identifications to perform the number of similar identifications with a recognition accuracy rate greater than the preset accuracy rate;
[0069] According to the proportion of the number of similar identifications with a recognition accuracy rate greater than the preset accuracy rate, determine whether the intelligent algorithm is a screening intelligent algorithm.
[0070] Optionally, the method for determining the screening intelligent algorithm in the intelligent algorithm is as follows:
[0071] Based on the recognition accuracy rate of the number of similar identifications in the grape variety, determine the recognition accuracy rate at different numbers of similar identifications;
[0072] Determine the average accuracy rate of the intelligent algorithm based on the average value of the recognition accuracy rates at different numbers of similar identifications, and use the accuracy rate evaluation value to determine whether the intelligent algorithm is a screening intelligent algorithm.
[0073] In another embodiment, the method for determining the screening intelligent algorithm in the intelligent algorithm is as follows:
[0074] S21 Based on the recognition accuracy rate of the number of similar identifications in the grape variety, determine the recognition accuracy rate at different numbers of similar identifications;
[0075] S22 Based on the average value of the deviation coefficients of the number of grape grains in different interval distributions of the spacing at different numbers of similar identifications, determine the similarity weight coefficients at different numbers of similar identifications;
[0076] S23 Based on the average value of the product of the similarity weight coefficients and the recognition accuracy rate at different numbers of similar identifications, determine the accuracy rate evaluation amount of the intelligent algorithm, and use the accuracy rate evaluation amount to determine whether the intelligent algorithm is a screening intelligent algorithm.
[0077] Furthermore, when the accuracy rate evaluation amount is greater than the preset evaluation amount threshold, it is determined that the intelligent algorithm does not belong to the screening intelligent algorithm.
[0078] Optionally, the above step S21 includes the following content:
[0079] S211 determines the recognition accuracy rates at different numbers of similar recognitions based on the recognition accuracy rate of the number of similar recognitions in the grape variety at the above-mentioned number of similar recognitions. When the recognition accuracy rates at different numbers of similar recognitions are all less than the preset accuracy rate threshold, it is determined that the intelligent algorithm does not belong to the screening intelligent algorithm. When there is a number of similar recognitions with a recognition accuracy rate not less than the preset accuracy rate threshold, it proceeds to step S212;
[0080] S212 takes the number of similar recognitions with a recognition accuracy rate not less than the preset accuracy rate threshold as the number of accurate recognitions. When the number of accurate recognitions is greater than the preset number of accurate recognitions threshold, it proceeds to step S213. When the number of accurate recognitions is not greater than the preset number of accurate recognitions threshold, it proceeds to step S22;
[0081] S213 When the proportion of the number of accurate recognitions in the number of similar recognitions is greater than the preset proportion threshold, it is determined that the intelligent algorithm belongs to the screening intelligent algorithm. When the proportion of the number of accurate recognitions in the number of similar recognitions is not greater than the preset proportion threshold, it proceeds to step S23.
[0082] Optionally, the above step S22 includes the following content:
[0083] S221 determines the basic recognition reliability coefficient based on the number of accurate recognitions and the proportion of the number of accurate recognitions in the number of similar recognitions. When the basic recognition reliability coefficient is greater than the preset reliability coefficient threshold, it is determined that the intelligent algorithm belongs to the screening intelligent algorithm. When the basic recognition reliability coefficient is not greater than the preset reliability coefficient threshold, it proceeds to step S222;
[0084] S222 When the basic recognition reliability coefficient is within the preset reliability coefficient range, it proceeds to step S223. When the basic recognition reliability coefficient is not within the preset reliability coefficient range, it is determined that the intelligent algorithm does not belong to the screening intelligent algorithm;
[0085] S223 determines the similarity weight coefficients for different numbers of similar recognitions based on the average of the deviation coefficients of the number of grape grains in different spacing distribution quantity intervals at different numbers of similar recognitions. Using the product of the similarity weight coefficients and the recognition accuracy rates for different numbers of similar recognitions, it determines the corrected accuracy rates for different numbers of similar recognitions. When there is no number of similar recognitions with a corrected accuracy rate greater than the preset correction threshold, it is determined that the intelligent algorithm does not belong to the screening intelligent algorithm. When there is a number of similar recognitions with a corrected accuracy rate greater than the preset correction threshold, it proceeds to step S224;
[0086] When the number of similarity recognitions with a correction accuracy greater than the preset correction threshold is greater than the preset recognition number threshold, it is determined that the intelligent algorithm does not belong to the screening intelligent algorithm. When the number of similarity recognitions with a correction accuracy greater than the preset correction threshold is not greater than the preset recognition number threshold, it proceeds to step S23.
[0087] S3 Determine the recognition processing results of the longitudinal and transverse diameters of the grape grains of different screening intelligent algorithms. Using the preset interval of the longitudinal and transverse diameters of the recognition target and the recognition processing results, determine the distribution data of the recognized deviation grape grains in different screening intelligent algorithms, and combine the deviation data of different recognized deviation grape grains to determine the recognition reliability coefficient and the matching intelligent algorithm of different screening intelligent algorithms;
[0088] It should be noted that the recognition processing results of the longitudinal and transverse diameters of the grape grains include the recognition results of the longitudinal and transverse diameters of the grape grains.
[0089] Furthermore, the preset interval of the longitudinal and transverse diameters of the recognition target is determined according to the grape variety of the recognition target, specifically according to the longitudinal diameter interval and the transverse diameter interval corresponding to the grape variety.
[0090] It should be noted that the recognized deviation grape grains are grape grains whose recognition results of the longitudinal and transverse diameters are not within the preset interval of the longitudinal and transverse diameters.
[0091] Specifically, as Figure 4 shown, the method for determining the recognition reliability coefficient of the screening intelligent algorithm is:
[0092] Based on the distribution data of the recognized deviation grape grains in the screening intelligent algorithm, determine the distribution quantity of the recognized deviation grape grains corresponding to the screening intelligent algorithm;
[0093] Based on the proportion of the distribution quantity of the recognized deviation grape grains in the quantity of the recognition target, determine the recognition reliability coefficient of the screening intelligent algorithm.
[0094] Furthermore, the recognition reliability coefficient is the difference between the preset value and the proportion of the distribution quantity of the recognized deviation grape grains in the quantity of the recognition target.
[0095] In addition, it should be noted that when the recognition reliability coefficient of the screening intelligent algorithm is greater than the preset reliability coefficient threshold, it is determined that the screening intelligent algorithm is a matching intelligent algorithm.
[0096] Optionally, the method for determining the recognition reliability coefficient of the screening intelligent algorithm is:
[0097] Based on the distribution data of the recognized deviation grape grains in the screening intelligent algorithm, determine the quantity of the recognized deviation grape grains in different images in the recognition target;
[0098] Determine the recognition deviation coefficients of different images based on the proportion of the number of grape grains with recognition deviations in different images;
[0099] Determine the recognition reliability coefficient of the screening intelligent algorithm according to the average value of the recognition deviation coefficients of different images.
[0100] Optionally, the method for determining the recognition reliability coefficient of the screening intelligent algorithm is as follows:
[0101] S31 Use the distribution data of grape grains with recognition deviations in the screening intelligent algorithm to determine the number of grape grains with recognition deviations in different images in the recognition target, and use the deviation data of different grape grains with recognition deviations to determine the deviation coefficients of different grape grains with recognition deviations;
[0102] S32 Determine the recognition deviation coefficients of different images based on the number, proportion of the number, and deviation coefficients of grape grains with recognition deviations in different images;
[0103] S33 Determine the recognition reliability coefficient of the screening intelligent algorithm according to the recognition deviation coefficients of different images.
[0104] Optionally, the above step S31 includes the following content:
[0105] S311 Use the distribution data of grape grains with recognition deviations in the screening intelligent algorithm to determine the number of grape grains with recognition deviations in different images in the recognition target. When the total number of grape grains with recognition deviations in different images does not meet the requirements, it is determined that the screening intelligent algorithm does not belong to the matching intelligent algorithm. When the total number of grape grains with recognition deviations in different images meets the requirements, go to step S312;
[0106] S312 Identify the images with the number of grape grains with recognition deviations not meeting the requirements based on the number of grape grains with recognition deviations in different images. When there are images with the number of grape grains with recognition deviations not meeting the requirements, it is determined that the screening intelligent algorithm does not belong to the matching intelligent algorithm. When there are no images with the number of grape grains with recognition deviations not meeting the requirements, go to step S313;
[0107] S313 Use the deviation data of different grape grains with recognition deviations to determine the deviation coefficients of different grape grains with recognition deviations. When there are grape grains with recognition deviations with deviation coefficients not meeting the requirements, go to step S314. When there are no grape grains with recognition deviations with deviation coefficients not meeting the requirements, go to step S32;
[0108] S314 When the number of recognized deviated grape grains with the deviation coefficient not meeting the requirements is greater than the preset number of deviated grape grains, it is determined that the screening intelligent algorithm does not belong to the matching intelligent algorithm. When the number of recognized deviated grape grains with the deviation coefficient not meeting the requirements is not greater than the preset number of deviated grape grains, proceed to step S32.
[0109] Optionally, the following content is included in the above step S32:
[0110] S321 Determine the recognition deviation coefficients of different images based on the number, proportion, and deviation coefficients of recognized deviated grape grains in different images. When there is an image with a recognition deviation coefficient not meeting the requirements, proceed to step S322. When there is no image with a recognition deviation coefficient not meeting the requirements, proceed to step S33;
[0111] S322 Take the image with a recognition deviation coefficient not meeting the requirements as the recognition deviation image. When the number of the recognition deviation images does not meet the requirements, it is determined that the screening intelligent algorithm does not belong to the matching intelligent algorithm. When the number of the recognition deviation images meets the requirements, proceed to step S323;
[0112] S323 Determine the image weight coefficients of different recognition deviation images based on the number of grape grains in different recognition deviation images. When the sum of the image weight coefficients of different recognition deviation images does not meet the requirements, it is determined that the screening intelligent algorithm does not belong to the matching intelligent algorithm. When the sum of the image weight coefficients of different recognition deviation images meets the requirements, proceed to step S33.
[0113] S4 Output the recognition results of the vertical and horizontal diameters of the grape grains of the recognition target based on the recognition processing results and recognition reliability coefficients of different matching intelligent algorithms.
[0114] Specifically, the method for outputting the recognition results of the vertical and horizontal diameters of the grape grains of the recognition target is as follows:
[0115] Determine the recognition results of the vertical and horizontal diameters of different grape grains of the recognition target in the matching intelligent algorithm based on the recognition processing results of the matching intelligent algorithm;
[0116] Based on the deviation amounts of the recognition results of the vertical and horizontal diameters of different grape grains in different matching intelligent algorithms, divide the recognition results into different similarity intervals;
[0117] Determine the sum of the recognition reliability coefficients in different similarity intervals based on the sum of the recognition reliability coefficients of the matching intelligent algorithms corresponding to the recognition results in different similarity intervals, and take the similarity interval with the largest sum of recognition reliability coefficients as the matching similarity interval;
[0118] The average value of the recognition results of the major and minor diameters of different matching intelligent algorithms in the matching similar intervals is used as the output of the recognition result of the major and minor diameters of the grape grains.
[0119] Further, dividing the recognition results into different similar intervals specifically includes:
[0120] The recognition results with the deviation amount of the major and minor diameters within the preset deviation amount interval are divided into the same similar interval.
[0121] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and non-volatile computer storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0122] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0123] The above is only one or more embodiments of this specification and is not used to limit this specification. For those skilled in the art, one or more embodiments of this specification can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included within the scope of the claims of this specification.
Claims
1. A method for identifying the longitudinal and transverse diameters of grapes based on an intelligent image algorithm, characterized in that: Specifically include: When the recognition accuracy of the longitudinal and transverse diameters of the grape grains meets the requirements based on the distribution of the spacing between adjacent grape grains of the recognition target, the grape variety of the recognition target is determined; Based on the grape variety of the identification target and the distribution of the spacing between adjacent grapes, determine the historical accuracy of different intelligent algorithms when performing longitudinal and transverse diameter identification processing, and use the historical accuracy to determine the screening intelligent algorithm among the intelligent algorithms; Determine the recognition processing results of the longitudinal and transverse diameters of grape grains of different screening intelligent algorithms, determine the distribution data of the recognition deviation grape grains in different screening intelligent algorithms by using the longitudinal and transverse diameter preset intervals of the recognition target and the recognition processing results, and determine the recognition reliability coefficients of different screening intelligent algorithms and matching intelligent algorithms in combination with the deviation data of different recognition deviation grape grains; Based on the recognition processing results and recognition reliability coefficients of different matching intelligent algorithms, outputting the recognition results of the longitudinal and transverse diameters of the grape grains of the recognition target; The historical accuracy of the intelligent algorithm in performing longitudinal and transverse diameter recognition processing is determined according to the recognition accuracy of similar recognition times of the intelligent algorithm in the grape variety; The similar identification times are the identification times in which the deviations of the number of grape grains in different spacing distribution intervals are all within the preset deviation number interval.
2. The method for identifying the longitudinal and transverse diameters of grapes based on an intelligent image algorithm as claimed in claim 1, characterized in that: The distribution of the spacing between adjacent grape grains is determined based on the image recognition results of the grape grains, and specifically based on the analysis results of the image of the recognition target.
3. The method for identifying the longitudinal and transverse diameters of grapes based on an intelligent image algorithm as claimed in claim 1, characterized in that: The method for determining the recognition accuracy of the longitudinal and transverse diameters of the grape grains is: Determine the distribution amount of the spacing between adjacent grape grains based on the spacing distribution between adjacent grape grains of the identified target; Determine the matching accuracy of different spacing distribution intervals based on the preset recognition accuracy corresponding to different spacing distribution intervals; Based on the proportion of the number of grape grains in different spacing distribution intervals, the weight coefficients of different spacing distribution intervals are determined, and combined with the matching accuracy of different spacing distribution intervals, the recognition accuracy of the longitudinal and transverse diameters of the grape grains is determined.
4. The method for identifying the longitudinal and transverse diameters of grapes based on an intelligent image algorithm as claimed in claim 3, characterized in that: The recognition accuracy of the longitudinal and transverse diameters of the grape particles ranges from 0 to 1. When the recognition accuracy of the longitudinal and transverse diameters of the grape particles is greater than a preset accuracy threshold, it is determined that the recognition accuracy of the longitudinal and transverse diameters of the grape particles meets the requirements.
5. The method for identifying the longitudinal and transverse diameters of grapes based on intelligent image algorithm according to claim 1, characterized in that: The grape variety of the recognition target is determined according to the image recognition result of the recognition target, the image of the recognition target is used as input, and the output of a preset grape variety recognition model is used as the image recognition result of the recognition target.
6. The method for identifying the longitudinal and transverse diameters of grapes based on intelligent image algorithm according to claim 5, characterized in that: The method for determining the screening intelligent algorithm in the intelligent algorithm is: Determining recognition accuracy rates at different similar recognition times based on recognition accuracy rates of similar recognition times in the grape variety; Using the recognition accuracy rates at different similar recognition times, a similar recognition time with a recognition accuracy rate greater than a preset accuracy rate is performed; Whether the intelligent algorithm is a screening intelligent algorithm is determined based on the proportion of similar identification times with an identification accuracy greater than a preset accuracy.
7. The method for identifying the longitudinal and transverse diameters of grapes based on intelligent image algorithm according to claim 1, characterized in that: The method for outputting the recognition result of the longitudinal and transverse diameters of the grape grains of the recognition target is: Determine the recognition results of different grape grains of the recognition target in the longitudinal and transverse diameters of the matching intelligent algorithm based on the recognition processing results of the matching intelligent algorithm, and divide the recognition results into different similarity intervals based on the deviations of the recognition results of different grape grains in the longitudinal and transverse diameters of different matching intelligent algorithms; Determine the sum of the recognition reliability coefficients in different similarity intervals by the sum of the recognition reliability coefficients of the matching intelligent algorithm corresponding to the recognition results in different similarity intervals, and take the similarity interval with the largest sum of the recognition reliability coefficient as the matching similarity interval; The average value of the recognition results of the longitudinal and transverse diameters of different matching intelligent algorithms in the matching similar interval is output as the recognition result of the longitudinal and transverse diameters of the grape grains.
8. The method for identifying the longitudinal and transverse diameters of grapes based on intelligent image algorithm according to claim 7, characterized in that: The recognition results are divided into different similarity intervals, specifically including: The recognition results of the deviation of the longitudinal and transverse diameters within the preset deviation range are divided into the same similarity range.
Citation Information
Patent Citations
Grape quality efficient evaluation method based on machine vision
CN118537357A
Method for picking multiple stacked grapes by robot
CN110226413A
Sunshine rose grape fruit big and small grain image identification method
CN114511850A