Paddy head rice rate detection method and system based on image recognition and quality fitting

By constructing a quality coefficient mapping model and a deep learning network, combined with image recognition technology, a weightless detection of the head rice rate of rice was achieved, solving the problems of cumbersome procedures and large errors in traditional detection methods, and improving detection accuracy and efficiency.

CN121540706AActive Publication Date: 2026-02-17SINOGRAIN CHENGDU STORAGE RESEARCH INSTITUTE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610066223.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-02-17
Estimated Expiration
2046-01-19

AI Technical Summary

Technical Problem

Existing methods for testing the head rice yield of rice are cumbersome, inefficient, rely on weighing equipment, and are susceptible to human error, making it difficult to achieve accurate and non-destructive testing.

Method used

A method for detecting the head rice rate of paddy rice based on image recognition and quality fitting is constructed. By constructing first and second quality coefficient mapping models, the quality conversion relationship between paddy rice and brown rice and brown rice and milled rice is established respectively. Deep learning network model is used to identify image features and calculate the head rice rate.

Benefits of technology

It achieves weighing-free detection throughout the entire process, simplifies the detection process, improves detection accuracy and efficiency, and reduces reliance on physical weighing equipment and human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121540706A_ABST
    Figure CN121540706A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unhulled rice detection, discloses an unhulled rice head rice rate detection method and system based on image recognition and mass fitting, and aims to solve the problems that an existing method is tedious in process and low in efficiency and depends on weighing equipment, and the scheme mainly comprises the steps that a mass coefficient mapping model is constructed in advance; collecting a first monomer image of a to-be-detected rice sample, a brown rice sample obtained after shelling of the to-be-detected rice sample and a polished rice sample obtained after grinding of the brown rice sample; identifying each first monomer image, and determining the rice variety; identifying head rice and broken rice, calculating the mass percentage of the head rice in the polished rice sample, and calculating the total volume of the rice image, the total volume of the brown rice image and the total volume, the average length-width ratio and the average thickness of the polished rice image; querying a quality coefficient mapping model, and determining a corresponding quality coefficient; and calculating the head rice rate of the to-be-detected rice sample. According to the invention, weighing-free detection is realized, the detection precision and efficiency are improved, and the method is especially suitable for grain purchasing, processing and storage.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of paddy detection, and in particular to a paddy whole milled rice rate detection method and system based on image recognition and quality fitting. BACKGROUND

[0002] The whole milled rice rate of paddy refers to the percentage of the mass of whole milled rice obtained after a certain amount of paddy is all hulled and milled into milled rice to the total mass of the paddy. The whole milled rice rate is a key indicator for evaluating the quality and rice yield of paddy, and accurate and rapid detection of the whole milled rice rate is of great significance for grain purchase, processing and quality breeding.

[0003] At present, the detection of the whole milled rice rate of paddy mainly relies on the traditional method specified in the relevant standards. The typical steps of the method include: first, accurately weighing the net mass of a paddy sample using a balance; then, hulling the sample to obtain brown rice using a huller, and then milling the brown rice into milled rice using a rice mill; then, manually separating the whole milled rice and broken rice and weighing their masses, respectively; finally, calculating the whole milled rice rate by formula. Although this method is accurate, it has the following inherent defects:

[0004] First, the process is more complicated and takes more time: the whole process involves multiple links such as paddy hulling, brown rice milling, whole milled rice and broken rice separation, and the operation steps are complex, requiring high skills of the inspectors, and it takes a long time to detect a sample.

[0005] Second, it relies on precise weighing equipment multiple times: the accuracy of the method depends heavily on the accuracy and stability of the balance, and weighing is required at multiple links such as paddy, brown rice and milled rice, increasing the risk of equipment dependency and error accumulation.

[0006] Third, human error is introduced: in the discrimination and separation of whole milled rice and broken rice, the subjective experience and visual judgment of the inspectors are largely relied on, and there may be differences in judgment among different operators, affecting the objectivity and repeatability of the results.

[0007] Although there have been paddy quality detection methods based on machine vision in recent years, existing technologies mainly focus on single-link detection. For the whole milled rice rate, which involves multiple links of quality conversion, existing visual detection schemes still cannot get rid of the dependence on physical weighing equipment. Most schemes still need to weigh the paddy first, and then calculate the image features as a proportion of the quality, which fails to achieve truly non-weighting detection. In addition, existing technologies lack systematic modeling of the quality conversion relationship in the whole processing chain of paddy-brown rice-milled rice, making it difficult to achieve accurate and reliable non-destructive detection of the whole milled rice rate. SUMMARY

[0008] This invention aims to solve the problems of cumbersome process, low efficiency and reliance on weighing equipment in existing methods for detecting the head rice yield of rice. It proposes a method and system for detecting the head rice yield of rice based on image recognition and quality fitting.

[0009] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0010] In a first aspect, the present invention provides a method for detecting the head rice yield of rice based on image recognition and quality fitting, the method comprising:

[0011] Pre-construct the first mass coefficient mapping model and the second mass coefficient mapping model;

[0012] The first quality coefficient mapping model is used to establish the mapping relationship between rice variety, the total image volume of rice sample and the total image volume, average aspect ratio and average thickness of corresponding brown rice sample and the first quality coefficient; the first quality coefficient is used to represent the ratio between the total mass of rice sample and the total mass of brown rice sample obtained after hulling.

[0013] The second quality coefficient mapping model is used to establish the mapping relationship between the total image volume of rice varieties and brown rice samples and the total image volume, average aspect ratio, and average thickness of their corresponding milled rice samples and the second quality coefficient; the second quality coefficient is used to represent the ratio between the total mass of the brown rice sample and the total mass of the milled rice sample obtained after milling.

[0014] Collect the first monomer images of the rice sample to be tested, the brown rice sample obtained after hulling, and the polished rice sample obtained after milling the brown rice sample, and preprocess each first monomer image.

[0015] The rice variety is determined by identifying each first individual image using a pre-trained deep learning network model; whole rice and broken rice are identified in the polished rice sample, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2 of the polished rice sample are calculated.

[0016] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0017] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0018] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0019] Furthermore, the method for constructing the first quality coefficient mapping model includes:

[0020] Second monomer images of multiple rice samples of known varieties and known quality, as well as their hulled brown rice samples, were collected, and each second monomer image was preprocessed.

[0021] The pre-trained deep learning network model is used to identify each second individual image and calculate the total image volume of the rice sample. Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample Simultaneously measure the total mass M1 of the rice sample and the total mass M2 of the brown rice sample;

[0022] Calculate the actual first mass coefficient between the total mass M1 of the rice sample and the total mass M2 of the brown rice sample obtained after hulling. According to the actual first quality coefficient Calculate the actual first correction factor for each sample. The calculation formula is as follows:

[0023] ;

[0024] ;

[0025] The average length-to-width ratio of rice varieties and brown rice samples and the average thickness of the brown rice sample As characteristic parameters, with the actual first correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the first correction coefficient K1. Based on the prediction model with the first correction coefficient K1, a first quality coefficient mapping model is constructed as follows:

[0026] ;

[0027] in, , represents the prediction model with the first correction coefficient K1, and P represents the rice variety.

[0028] Furthermore, the method for constructing the second quality coefficient mapping model includes:

[0029] Collect images of the third monomers of multiple brown rice samples of known varieties and qualities and their milled rice samples, and preprocess each third monomer image.

[0030] The pre-trained deep learning network model is used to identify each third individual image and calculate the total image volume of the brown rice sample. Total image volume of rice sample The average length-to-width ratio of the polished rice samples Average thickness of rice samples Simultaneously measure the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample;

[0031] Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows:

[0032] ;

[0033] ;

[0034] The average length-to-width ratio of rice varieties and polished rice samples Average thickness of rice samples As characteristic parameters, with the actual second correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the second correction coefficient K2. Based on the prediction model with the second correction coefficient K2, a second quality coefficient mapping model is constructed as follows:

[0035] ;

[0036] in, , represents the prediction model with the second correction coefficient K2, and P represents the rice variety.

[0037] Furthermore, the formula for calculating the head rice yield R is as follows:

[0038] .

[0039] Furthermore, the calculation methods for the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, and the total image volume V3 of the polished rice sample include:

[0040] The first individual image corresponding to the rice sample, brown rice sample, or polished rice sample to be detected is analyzed, and the outline pixel area and thickness of the corresponding rice, brown rice, or polished rice are calculated. Each grain of rice, each grain of brown rice, or each grain of polished rice is regarded as a geometric body. Based on its outline pixel area and thickness, the individual image volume of rice, brown rice, or polished rice is calculated. The sum of the individual image volumes of all rice grains is the total image volume V1 of the rice sample to be detected, the sum of the individual image volumes of all brown rice grains is the total image volume V2 of the brown rice sample, and the sum of the individual image volumes of all polished rice grains is the total image volume V3 of the polished rice sample.

[0041] Furthermore, the method for calculating the outline pixel area of ​​each grain of rice, brown rice, and polished rice includes:

[0042] For each individual image of rice, brown rice, or polished rice, obtain its corresponding frontal projection image, and determine the corresponding contour pixel area based on the number of pixels in the region formed by the contour of rice, brown rice, or polished rice in the frontal projection image.

[0043] Furthermore, the calculation methods for the average aspect ratio A1 of the brown rice sample and the average aspect ratio A2 of the milled rice sample include:

[0044] For the first individual image of each grain of brown rice or each grain of polished rice, obtain its corresponding front projection image and calculate the minimum bounding rectangle of its outline.

[0045] The pixel value of the longer side of the minimum bounding rectangle is taken as the length of the brown rice or polished rice grain, and the pixel value of the shorter side is taken as the width of the brown rice or polished rice grain. The aspect ratio of a single brown rice or polished rice grain, that is, the ratio of length to width, is calculated.

[0046] The average length-to-width ratio A1 of the brown rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested brown rice samples; the average length-to-width ratio A2 of the milled rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested milled rice samples.

[0047] Furthermore, the calculation methods for the average thickness H1 of the brown rice sample and the average thickness H2 of the polished rice sample include:

[0048] For each individual image of brown rice or each individual image of milled rice, obtain its corresponding side projection image, calculate the maximum pixel value of its contour in the thickness direction, and use it as the thickness of that brown rice or milled rice grain.

[0049] The average thickness H1 of the brown rice sample was calculated by arithmetically averaging the thicknesses of all tested brown rice samples; the average thickness H2 of the milled rice sample was calculated by arithmetically averaging the thicknesses of all tested milled rice samples.

[0050] Furthermore, the method for calculating the mass percentage B% includes:

[0051] The first individual image of the polished rice sample is analyzed, and a pre-trained deep learning network model is used to identify and classify whole polished rice and broken rice.

[0052] Calculate the total image volume V4 of all whole milled rice and the total image volume V3 of all milled rice, respectively.

[0053] The mass percentage B% is the percentage of the total image volume V4 of whole rice to the total image volume V3 of the rice sample.

[0054] Secondly, the present invention provides a rice head rice yield detection system based on image recognition and quality fitting, used to implement the rice head rice yield detection method based on image recognition and quality fitting described in the first aspect, the system comprising:

[0055] An image acquisition device is used to acquire first individual images of a rice sample to be tested, a brown rice sample obtained after hulling, and a polished rice sample obtained after milling the brown rice sample.

[0056] A rice hulling device is used to remove the husks from rice samples to obtain brown rice samples.

[0057] A rice milling device is used to mill a brown rice sample to obtain a polished rice sample;

[0058] The processing unit, electrically connected to the image acquisition device, internally stores a pre-built first quality coefficient mapping model and a second quality coefficient mapping model, as well as a pre-trained deep learning network model, and is configured to perform the following operations:

[0059] Preprocess the first single-unit image acquired;

[0060] The deep learning network model is used to identify each preprocessed first individual image to determine the rice variety; the whole rice and broken rice in the polished rice sample are identified, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample, and the average thickness H2 of the polished rice sample are calculated.

[0061] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0062] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0063] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0064] The beneficial effects of this invention are as follows: The method and system for detecting the head rice rate of paddy rice based on image recognition and quality fitting provided by this invention establishes the quality conversion relationship between paddy rice and brown rice and brown rice and milled rice by constructing two quality coefficient mapping models, respectively. Combined with the identification of the proportion of head rice, it realizes the whole-process weigh-free detection from paddy rice to head rice. It not only completely eliminates the dependence on physical weighing equipment and significantly simplifies the detection process, but also ensures the detection accuracy through the dual-coefficient fitting model, providing a brand-new technical path for paddy rice quality detection. Attached Figure Description

[0065] Figure 1 A flowchart illustrating the method for detecting head rice yield based on image recognition and quality fitting provided in this embodiment;

[0066] Figure 2 This is a schematic diagram of the structure of the rice head rice rate detection system based on image recognition and quality fitting provided in the embodiment. Detailed Implementation

[0067] Traditional methods for detecting whole rice yield rely heavily on multiple precise weighings using physical balances and manual judgment, resulting in cumbersome processes, low efficiency, susceptibility to environmental interference, and significant subjective errors. To address these issues, this invention proposes a solution that establishes two quality coefficient mapping models to define the quality conversion relationships between paddy rice and brown rice, and between brown rice and polished rice, thereby achieving weigh-free detection throughout the entire process from paddy rice to whole rice.

[0068] Specifically, this invention proposes a dual-coefficient fitting technique. By constructing a first quality coefficient mapping model and a second quality coefficient mapping model, a quality bridge is established between paddy rice and brown rice using the first quality coefficient (the mass ratio of paddy rice to brown rice), and a quality bridge is established between brown rice and milled rice using the second quality coefficient (the mass ratio of brown rice to milled rice). Finally, by combining the whole rice percentage (B%), the weightless calculation of the whole rice yield is achieved. This invention fully utilizes the inherent quality correlations between various stages in the paddy rice processing process, and through the combination of image features and machine learning algorithms, it completely replaces the traditional weighing process.

[0069] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0070] Figure 1 A flowchart illustrating a method for detecting head rice yield in rice based on image recognition and quality fitting is shown. Please refer to [link / reference]. Figure 1 The method includes the following steps:

[0071] Step 1: Construct the quality coefficient mapping model:

[0072] Pre-construct the first mass coefficient mapping model and the second mass coefficient mapping model;

[0073] The first quality coefficient mapping model is used to establish the mapping relationship between rice variety, the total image volume of rice sample and the total image volume, average aspect ratio and average thickness of corresponding brown rice sample and the first quality coefficient; the first quality coefficient is used to represent the ratio between the total mass of rice sample and the total mass of brown rice sample obtained after hulling.

[0074] The second quality coefficient mapping model is used to establish the mapping relationship between the total image volume of rice varieties, brown rice samples and their corresponding total image volume, average aspect ratio and average thickness of milled rice samples and the second quality coefficient; the second quality coefficient is used to represent the ratio between the total mass of the brown rice sample and the total mass of the milled rice sample.

[0075] The core of this step lies in establishing two independent quality conversion models, corresponding to the quality conversion relationships in the paddy-brown rice and brown rice-milled rice processing stages, respectively. The inventors discovered that the mass ratio of paddy to brown rice and the mass ratio of brown rice to milled rice are not constant, but rather exhibit a definite functional relationship with the paddy variety, morphological characteristics, and volume ratio. This functional relationship can be accurately characterized by the product of the volume ratio and a correction coefficient. The correction coefficient is primarily influenced by variety, length-to-width ratio, and thickness, reflecting the systematic impact of differences in husk density and thickness among different paddy varieties, as well as grain fullness, on the quality conversion relationship. By using machine learning algorithms to perform regression analysis on these multidimensional features, an accurate predictive model for the correction coefficient can be constructed, leading to the construction of a quality coefficient mapping model. Based on this, this step constructs a first quality coefficient mapping model and a second quality coefficient mapping model for the paddy-brown rice and brown rice-milled rice processing stages, respectively, thereby achieving quality conversion.

[0076] In this embodiment, the method for constructing the first quality coefficient mapping model includes steps 101 to 104:

[0077] Step 101: Collect second monomer images of multiple rice samples of known varieties and known quality and their hulled brown rice samples, and preprocess each second monomer image;

[0078] Step 102: Use a pre-trained deep learning network model to identify each second individual image and calculate the total image volume of the rice sample. Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample Simultaneously measure the total mass M1 of the rice sample and the total mass M2 of the brown rice sample;

[0079] Step 103: Calculate the actual first mass coefficient between the total mass M1 of the rice sample and the total mass M2 of the brown rice sample obtained after hulling. According to the actual first quality coefficient Calculate the actual first correction factor for each sample. The calculation formula is as follows:

[0080] ;

[0081] ;

[0082] Step 104: Using the average length-to-width ratio of rice varieties and brown rice samples. and the average thickness of the brown rice sample As characteristic parameters, with the actual first correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the first correction coefficient K1. Based on the prediction model with the first correction coefficient K1, a first quality coefficient mapping model is constructed as follows:

[0083] ;

[0084] in, , represents the prediction model with the first correction coefficient K1, and P represents the rice variety.

[0085] In practical applications, at least 500 samples of paddy rice and brown rice corresponding to the target rice variety are collected. Each sample is accurately weighed to obtain M1 and M2, and the actual first quality coefficient is calculated. And based on the actual first quality coefficient Calculate the actual first correction factor: Simultaneously, a standard image acquisition system was used to acquire second individual images of each sample of rice and its corresponding brown rice. Image processing algorithms were then used to calculate the image quality of each sample. , , , Next, with (P, , ) as input features, with For the target value, a random forest or neural network algorithm is used for training to obtain the prediction model with the first correction coefficient K1. Then, based on this prediction model, a complete first quality coefficient mapping model is constructed: .

[0086] In this embodiment, the method for constructing the second quality coefficient mapping model includes steps 111 to 114:

[0087] Step 111: Collect images of the third monomer of multiple brown rice samples of known varieties and known quality and their milled rice samples, and preprocess each third monomer image.

[0088] Step 112: Use a pre-trained deep learning network model to identify each third individual image and calculate the total image volume of the brown rice sample. Total image volume of rice sample The average length-to-width ratio of the polished rice samples Average thickness of rice samples Simultaneously measure the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample;

[0089] Step 113: Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows:

[0090] ;

[0091] ;

[0092] Step 114: Using the average length-to-width ratio of rice varieties and polished rice samples. Average thickness of rice samples As characteristic parameters, with the actual second correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the second correction coefficient K2. Based on the prediction model with the second correction coefficient K2, a second quality coefficient mapping model is constructed as follows:

[0093] ;

[0094] in, , represents the prediction model with the second correction coefficient K2, and P represents the rice variety.

[0095] In practical applications, at least 500 samples of brown rice and polished rice corresponding to the target rice variety are collected. Each sample is accurately weighed to obtain M2 and M3, and the actual second quality coefficient is calculated. And based on the actual second quality coefficient Calculate the actual second correction factor: Simultaneously, a standard image acquisition system was used to acquire the third individual image of each sample of brown rice and its corresponding milled rice. Image processing algorithms were then used to calculate the image quality of each sample. , , , Next, with (P, , ) as input features, with Using the target value, a random forest or neural network algorithm is used for training to obtain the prediction model with the second correction coefficient K2. Then, based on this prediction model, a complete second quality coefficient mapping model is constructed: .

[0096] In the above steps, the total image volume of the rice sample is... Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample and the total image volume of the rice sample. The average length-to-width ratio of the polished rice samples Average thickness of rice samples The calculation method is the same as that used in step 3 for calculating the total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2. For detailed calculation methods, please refer to the specific implementation method in step 3, which will not be repeated here.

[0097] Step 2, Image Acquisition and Preprocessing:

[0098] First individual images of the rice sample to be tested, the brown rice sample obtained after hulling, and the polished rice sample obtained after milling the brown rice sample are collected, and each first individual image is preprocessed.

[0099] High-quality image data is fundamental to ensuring the accuracy of subsequent recognition and calculation. This step acquires digital images of the sample under test using standardized acquisition equipment, and preprocesses them to eliminate environmental interference and highlight target features.

[0100] In practical applications, specialized tools (such as the grain appearance quality index detector disclosed in application publication number CN116893127A) can be used to acquire images of each grain of rice sample to be tested and the brown rice sample obtained after hulling. Specifically, a vibrating device can be used to separate the sample grain by grain, and the grains can be conveyed to the shooting position by a conveyor belt. Then, a camera can capture images of each grain to obtain the first individual image of the rice sample to be tested. After shooting, the sample is automatically fed into a rice hulling device by a conveyor belt for hulling, and then conveyed to the shooting position by a conveyor belt by grain again. The camera can capture images of each grain to obtain the first individual image of the brown rice sample obtained after hulling. After shooting, the sample is automatically fed into a rice milling device by a conveyor belt for milling, and then conveyed to the shooting position by a conveyor belt by grain again. The camera can capture images of each grain to obtain the first individual image of the polished rice sample obtained after milling. Each first individual image includes a front projection image and a side projection image of each grain of rice, brown rice, or polished rice.

[0101] In practical applications, image preprocessing can specifically include binarization filtering, which involves filtering and image grayscale segmentation. Filtering reduces pixel noise, while image grayscale segmentation distinguishes between graphics and background based on grayscale values ​​and threshold values. Preprocessing each initial unit image can effectively improve the accuracy of subsequent pixel area determination.

[0102] Step 3: Image recognition and parameter calculation:

[0103] The rice variety is determined by identifying each first individual image using a pre-trained deep learning network model; whole rice and broken rice are identified in the polished rice sample, and the mass percentage of whole rice in the polished rice sample is calculated as B%. The total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2 of the polished rice sample are also calculated.

[0104] This step converts images into key parameters. A deep learning model simulates the discriminative ability of human experts to automatically identify variety and quality status; simultaneously, computer vision algorithms precisely quantify morphological and volumetric features.

[0105] The rice varieties mentioned include japonica rice, indica rice, and glutinous rice.

[0106] In practical applications, the first individual image corresponding to the rice sample to be detected can be used to identify rice varieties using a multi-task deep learning model based on the ResNet architecture, while the first individual image corresponding to the polished rice sample can be used to identify whole polished rice and broken rice using a multi-task deep learning model based on the ResNet architecture.

[0107] In this embodiment, the method for calculating the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, and the total image volume V3 of the polished rice sample includes:

[0108] The first individual image corresponding to the rice sample, brown rice sample, or polished rice sample to be detected is analyzed, and the outline pixel area and thickness of the corresponding rice, brown rice, or polished rice are calculated. Each grain of rice, each grain of brown rice, or each grain of polished rice is regarded as a geometric body. Based on its outline pixel area and thickness, the individual image volume of rice, brown rice, or polished rice is calculated. The sum of the individual image volumes of all rice grains is the total image volume V1 of the rice sample to be detected, the sum of the individual image volumes of all brown rice grains is the total image volume V2 of the brown rice sample, and the sum of the individual image volumes of all polished rice grains is the total image volume V3 of the polished rice sample.

[0109] The geometric body can be an ellipsoid or a cylinder. In practical applications, the volume model of the corresponding geometric body can be used to calculate the volume of the corresponding single image. For example, the volume model of a cylinder is: volume = contour area × thickness.

[0110] In this embodiment, the method for calculating the outline pixel area of ​​each grain of rice, brown rice, and milled rice includes:

[0111] For each individual image of rice, brown rice, or polished rice, obtain its corresponding frontal projection image, and determine the corresponding contour pixel area based on the number of pixels in the region formed by the contour of rice, brown rice, or polished rice in the frontal projection image.

[0112] In this embodiment, the method for calculating the length-to-width ratio of each grain of brown rice and milled rice includes:

[0113] For each individual image of brown rice or polished rice in the brown rice sample, obtain its corresponding frontal projection image and calculate the minimum bounding rectangle of its outline; take the pixel value of the long side of the minimum bounding rectangle as the length of the brown rice or polished rice grain, and the pixel value of the short side as the width of the brown rice or polished rice grain, and calculate the aspect ratio of a single brown rice or polished rice grain, that is, the ratio of length to width.

[0114] The average length-to-width ratio A1 of the brown rice sample can be calculated by taking the arithmetic mean of the length-to-width ratios of all the tested brown rice samples, and the average length-to-width ratio A2 of the tested milled rice sample can be calculated by taking the arithmetic mean of the length-to-width ratios of all the tested milled rice samples.

[0115] In this embodiment, the method for calculating the thickness of each grain of brown rice and milled rice includes:

[0116] For each individual image of brown or white rice, obtain its corresponding side projection image, calculate the maximum pixel value of its contour in the thickness direction, and use it as the thickness of that brown or white rice grain.

[0117] The average thickness H1 of the brown rice sample can be calculated by taking the arithmetic mean of the thicknesses of all the tested brown rice samples, and the average thickness H2 of the tested milled rice sample can be calculated by taking the arithmetic mean of the thicknesses of all the tested milled rice samples.

[0118] Through the above process, the automatic identification of rice varieties, whole rice and broken rice is realized, greatly reducing manual intervention; and through precise morphological feature (volume, aspect ratio, thickness) calculation, reliable input parameters are provided for quality estimation.

[0119] Step 4: Determine the quality coefficient:

[0120] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0121] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be tested.

[0122] This step involves substituting the previously acquired feature parameters into the pre-trained model and obtaining the crucial quality coefficients through mathematical calculations. Its core lies in mapping the image feature space to a quality relation space, and determining the final quality coefficients through correction coefficients and volume ratios.

[0123] In practical applications, the rice variety P, average aspect ratio A1, and average thickness H1 obtained in step 3 are used to form a feature vector, which is then input into the prediction model with the first correction coefficient K1 constructed in step 1. In the process, the first correction coefficient K1 is obtained. At the same time, the image volume ratio V1 / V2 of paddy rice and brown rice is calculated. Finally, the value of the first quality coefficient C1 is calculated according to the formula C1=K1×(V1 / V2).

[0124] Similarly, the rice variety P, average aspect ratio A2, and average thickness H2 obtained in step 3 are used to form a feature vector, which is then input into the prediction model with the second correction coefficient K2 constructed in step 1. In this process, the second correction coefficient K2 is obtained. Simultaneously, the image volume ratio V2 / V3 of brown rice and milled rice is calculated. Finally, the value of the second quality coefficient C2 is calculated using the formula C2=K2×(V2 / V3).

[0125] The above steps achieve the key transformation from visual parameters to quality parameters. By correcting the basic volume ratio with varietal characteristics through correction coefficients, accurate coefficients representing the mass ratio of paddy rice to brown rice and the mass ratio of brown rice to milled rice are obtained, providing core parameters for the final head rice rate calculation.

[0126] Step 5: Calculate the head rice yield:

[0127] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0128] This step transforms traditional mass calculation into image volume calculation through innovative mathematical formulas. The principle lies in using a mass coefficient to bridge the gap between image volume and physical mass, enabling whole-rice yield calculation without weighing. The formula for calculating the whole-rice yield R is as follows:

[0129] .

[0130] In the above calculation formula, the numerator B% represents the proportion of whole rice in the polished rice, and the denominator... This represents the total mass conversion factor from paddy rice to polished rice. The calculation result is rounded to two decimal places and directly output to the display interface.

[0131] Through the above process, whole rice yield detection based entirely on image analysis was finally achieved. The entire process requires no weighing operation, which greatly improves detection efficiency while ensuring calculation accuracy consistent with national standard methods.

[0132] In summary, this embodiment transforms the traditional head rice yield detection, which relies on physical weighing, into a purely visual calculation by constructing a quality coefficient mapping model that integrates rice variety, morphological characteristics, and image volume ratio. This achieves full automation and weighing-free detection. This solution not only overcomes the reliance on precision balances and the subjectivity of human judgment inherent in traditional methods, but also significantly improves detection accuracy and efficiency through intelligent algorithms that fuse multiple features. Simultaneously, it drastically reduces equipment costs and operational barriers, providing a reliable technological innovation path for grain quality detection.

[0133] Based on the above technical solutions, this embodiment also proposes a rice head rice rate detection system based on image recognition and quality fitting, used to implement the rice head rice rate detection method based on image recognition and quality fitting described in the embodiment. Please refer to [link to relevant documentation]. Figure 2 The system includes:

[0134] An image acquisition device is used to acquire first individual images of a rice sample to be tested, a brown rice sample obtained after hulling, and a polished rice sample obtained after milling the brown rice sample.

[0135] A rice hulling device is used to remove the husks from rice samples to obtain brown rice samples.

[0136] A rice milling device is used to mill a brown rice sample to obtain a polished rice sample;

[0137] The processing unit, electrically connected to the image acquisition device, internally stores a pre-built first quality coefficient mapping model and a second quality coefficient mapping model, as well as a pre-trained deep learning network model, and is configured to perform the following operations:

[0138] Preprocess the first single-unit image acquired;

[0139] The deep learning network model is used to identify each preprocessed first individual image to determine the rice variety; the whole rice and broken rice in the polished rice sample are identified, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample, and the average thickness H2 of the polished rice sample are calculated.

[0140] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0141] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0142] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0143] It is understood that the rice head rice rate detection system based on image recognition and quality fitting described in this embodiment is a system for implementing the rice head rice rate detection method based on image recognition and quality fitting described in the embodiment. As the system disclosed in the embodiment corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant parts, please refer to the description of the method. It will not be repeated here.

Claims

1. A method for detecting the milled rice rate of paddy based on image recognition and quality fitting, characterized in that, The method comprises: pre-constructing a first quality coefficient mapping model and a second quality coefficient mapping model; the first quality coefficient mapping model is used to establish a mapping relationship between a rice variety, a total volume of an image of a rice sample, a total volume of an image of a corresponding brown rice sample, an average aspect ratio and an average thickness of the brown rice sample, and a first quality coefficient; the first quality coefficient is used to represent a ratio between a total mass of the rice sample and a total mass of the brown rice sample obtained after husking of the rice sample; the second quality coefficient mapping model is used to establish a mapping relationship between a rice variety, a total volume of an image of a brown rice sample, a total volume of an image of a corresponding white rice sample, an average aspect ratio and an average thickness of the white rice sample, and a second quality coefficient; the second quality coefficient is used to represent a ratio between a total mass of the brown rice sample and a total mass of the white rice sample obtained after milling of the brown rice sample; collecting first single images of a to-be-detected rice sample, brown rice obtained after husking of the rice sample, and white rice obtained after milling of the brown rice sample, and pre-processing each first single image; using a pre-trained deep learning network model to identify each first single image, determining a rice variety, identifying whole white rice and broken rice in the white rice sample, calculating a mass percentage B% of the whole white rice in the white rice sample, and calculating a total volume V1 of an image of the to-be-detected rice sample, a total volume V2 of an image of the brown rice sample, an average aspect ratio A1 of the brown rice sample, an average thickness H1 of the brown rice sample, a total volume V3 of an image of the white rice sample, an average aspect ratio A2 of the white rice sample, and an average thickness H2 of the white rice sample; querying the first quality coefficient mapping model according to the identified rice variety, the calculated total volume V1 of the image of the to-be-detected rice sample, the total volume V2 of the image of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, to determine a corresponding first quality coefficient C1 of the to-be-detected rice sample; querying the second quality coefficient mapping model according to the identified rice variety, the calculated total volume V2 of the image of the brown rice sample, the total volume V3 of the image of the white rice sample, the average aspect ratio A2 of the white rice sample, and the average thickness H2 of the white rice sample, to determine a corresponding second quality coefficient C2 of the to-be-detected rice sample; calculating a whole white rice rate R of the to-be-detected rice sample according to the mass percentage B%, the first quality coefficient C1, and the second quality coefficient C2.

2. The method according to claim 1, wherein, The method for constructing the first quality coefficient mapping model comprises: collecting second single images of a plurality of rice samples of known varieties and known masses and brown rice samples obtained after husking of the rice samples, and pre-processing each second single image; The pre-trained deep learning network model is used to recognize each second monomer image, and the total volume of the rice sample image is calculated The total volume of the brown rice sample image The average aspect ratio of the brown rice sample And the average thickness of the brown rice sample The total mass M1 of the rice sample and the total mass M2 of the brown rice sample are measured at the same time calculating the actual first mass coefficient between the total mass M1 of the paddy sample and the total mass M2 of the brown rice sample obtained after dehulling , calculating the actual first mass coefficient between the total mass M1 of the paddy sample and the total mass M2 of the brown rice sample obtained after dehulling , calculating the actual first mass coefficient between the total mass M1 of the paddy sample and the total mass M2 of the brown rice sample obtained after dehulling , calculating the actual first mass coefficient between the total mass M1 of the paddy sample and the total mass M2 of the brown rice sample obtained after dehulling ; ; The average length-width ratio of the rice variety, the brown rice sample and the average thickness of the brown rice sample is taken as a characteristic parameter, an actual first correction coefficient is taken as a target value, a regression algorithm is used for fitting training to obtain a prediction model of the first correction coefficient K1, and a first quality coefficient mapping model is constructed according to the prediction model of the first correction coefficient K1, as follows: ; wherein, P represents a prediction model of the first correction coefficient K1, and P represents a rice variety.

3. The method according to claim 1, wherein, The method for constructing the second quality coefficient mapping model comprises: collecting third single images of a plurality of brown rice samples of known varieties and known masses and white rice samples obtained after milling of the brown rice samples, and pre-processing each third single image; The pre-trained deep learning network model is used to recognize each third monomer image, and the total volume of the brown rice sample image , the total volume of the polished rice sample image , the average aspect ratio of the polished rice sample , and the average thickness of the polished rice sample ; the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample are measured at the same time; Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows: ; ; The average length-width ratio of the rice variety and the polished rice sample and the average thickness of the polished rice sample as a characteristic parameter, and the actual second correction coefficient as a target value, fitting training is performed through a regression algorithm to obtain a prediction model of the second correction coefficient K2, and a second quality coefficient mapping model is constructed according to the prediction model of the second correction coefficient K2, as follows: ; wherein, P represents a prediction model of the second correction coefficient K2, and P represents a rice variety.

4. The method according to claim 1, wherein, The calculation formula of the whole white rice rate R is as follows: 。 5. The method according to claim 1, wherein, The calculation method of the total volumes V1, V2 and V3 of the images of the to-be-detected rice sample, the brown rice sample and the white rice sample comprises: The first monomer image corresponding to the rice sample, brown rice sample or milled rice sample to be detected is analyzed, the contour pixel area and thickness of the corresponding rice, brown rice or milled rice are calculated, each rice, each brown rice or each milled rice is regarded as a geometric body, the monomer image volume of the rice, brown rice or milled rice is calculated based on the contour pixel area and thickness, the sum of the monomer image volumes of all the rice is the total image volume V1 of the rice sample to be detected, the sum of the monomer image volumes of all the brown rice is the total image volume V2 of the brown rice sample, and the sum of the monomer image volumes of all the milled rice is the total image volume V3 of the milled rice sample.

6. The method according to claim 5, wherein, The method for calculating the contour pixel area of each rice, brown rice and milled rice includes: For the first monomer image of each rice, each brown rice or each milled rice, the corresponding front projection image is obtained, and the contour pixel area is determined according to the number of pixel points in the area formed by the contour of the rice, brown rice or milled rice in the front projection image.

7. The method according to claim 1, wherein, The method for calculating the average aspect ratio A1 of the brown rice sample and the average aspect ratio A2 of the milled rice sample includes: For the first monomer image of each brown rice or each milled rice, the corresponding front projection image is obtained, and the minimum circumscribed rectangle of the contour is calculated; The long side pixel value of the minimum circumscribed rectangle is taken as the length of the brown rice or milled rice, the short side pixel value is taken as the width of the brown rice or milled rice, and the aspect ratio of the single brown rice or single milled rice, i.e., the ratio of the length to the width, is calculated; The aspect ratios of all the detected brown rice are arithmetically averaged to obtain the average aspect ratio A1 of the brown rice sample, and the aspect ratios of all the detected milled rice are arithmetically averaged to obtain the average aspect ratio A2 of the milled rice sample.

8. The method according to claim 1, wherein, The method for calculating the average thickness H1 of the brown rice sample and the average thickness H2 of the milled rice sample includes: For the first monomer image of each brown rice or each milled rice, the corresponding side projection image is obtained, and the maximum dimension pixel value of the contour in the thickness direction is taken as the thickness of the brown rice or milled rice; The thicknesses of all the detected brown rice are arithmetically averaged to obtain the average thickness H1 of the brown rice sample, and the thicknesses of all the detected milled rice are arithmetically averaged to obtain the average thickness H2 of the milled rice sample.

9. The method according to claim 1, wherein, The method for calculating the quality percentage B% includes: The first monomer image of the milled rice sample is analyzed, and the whole milled rice and broken rice are identified and classified by using a pre-trained deep learning network model; The total image volume V4 of all the whole milled rice and the total image volume V3 of all the milled rice are calculated, respectively; The quality percentage B% is the percentage of the total image volume V4 of the whole milled rice in the total image volume V3 of the milled rice sample.

10. A system for detecting the head rice yield of paddy based on image recognition and quality fitting, characterized in that, The system for implementing the rice whole milled rice rate detection method based on image recognition and quality fitting according to any one of claims 1 to 9 includes: An image acquisition device is configured to acquire first monomer images of a rice sample to be detected, a brown rice sample obtained after hulling of the rice sample, and a milled rice sample obtained after milling of the brown rice sample; A hulling device is configured to hull the rice sample to be detected to obtain the brown rice sample; A milling device is configured to mill the brown rice sample to obtain the milled rice sample; and A detection device is configured to analyze the first monomer images of the rice sample, the brown rice sample and the milled rice sample, calculate the contour pixel area and thickness of the corresponding rice, brown rice or milled rice, regard each rice, each brown rice or each milled rice as a geometric body, calculate the monomer image volume of the rice, brown rice or milled rice based on the contour pixel area and thickness, and calculate the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, and the total image volume V3 of the milled rice sample. A processing unit is electrically connected with the image acquisition device, and has a first quality coefficient mapping model and a second quality coefficient mapping model and a deep learning network model pre-constructed and pre-trained stored therein, and is configured to perform the following operations: The first monomer images are preprocessed; The deep learning network model is used to identify the preprocessed first monomer images to determine the rice variety, identify the whole milled rice and broken rice in the milled rice sample, calculate the mass percentage B% of the whole milled rice in the milled rice sample, and calculate the total image volume V1 of the to-be-detected rice sample, the total image volume V2 of the brown rice sample, the average length-width ratio A1 of the brown rice sample and the average thickness H1 of the brown rice sample, and the total image volume V3 of the milled rice sample, the average length-width ratio A2 of the milled rice sample and the average thickness H2 of the milled rice sample; According to the identified rice variety, the calculated total image volume V1 of the to-be-detected rice sample, the total image volume V2 of the brown rice sample, the average length-width ratio A1 of the brown rice sample and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the to-be-detected rice sample; According to the identified rice variety, the calculated total image volume V2 of the brown rice sample, the total image volume V3 of the milled rice sample, the average length-width ratio A2 of the milled rice sample and the average thickness H2 of the milled rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the to-be-detected rice sample; The whole milled rice rate R of the to-be-detected rice sample is calculated according to the mass percentage B%, the first quality coefficient C1 and the second quality coefficient C2.

Citation Information

Patent Citations

  • Grain appearance quality index detector

    CN116893127A

  • Method for detecting rice transparency

    CN103411929A

  • Method for predicating head rice rate of medium-length brown rice

    CN107843283A

  • Paddy quality index full-process detection method and device

    CN120510098A

  • Rice variety identification method

    JP3048149B1