Rice quality detection method, system and equipment and storage medium
By establishing a rice quality detection network model based on multi-layer feature fusion and using digital image processing and deep learning technology, the subjectivity and inefficiency problems of existing rice detection methods are solved, and high efficiency and accuracy of rice detection are achieved.
Patent Information
- Application Number
- CN202411378994.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
AI Technical Summary
The existing rice detection methods have problems such as strong subjectivity, low efficiency and insufficient detection accuracy, and have not used digital image processing and deep learning technology for rice detection.
Adopt a multi -layer -based rice quality detection network model, characterize the appearance and classification of rice through digital image processing technology, and automatically learn the characteristic representation and classification models of the characteristics of rice through training neural networks to achieve efficient and accurate testing of rice.
It improves the efficiency and accuracy of rice detection tasks, can effectively identify the appearance defects, water content and weight of rice, and is better than several common detection algorithms.
Smart Images

Figure CN119360089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence target detection, and in particular to a rice quality detection method, system, equipment and storage medium. Background Art
[0002] Rice is one of the world's most important food crops and an important part of people's daily diet. However, according to statistics, a large amount of rice is lost or wasted every year due to various reasons, many of which are due to quality problems. Therefore, it is necessary to develop an effective rice detection technology.
[0003] Traditional rice detection methods mainly rely on human vision for judgment, but this method has the problems of strong subjectivity, low efficiency, and insufficient detection accuracy. In recent years, with the rapid development of computer vision and deep learning technology, automated detection technology has gradually become a research hotspot. However, there is currently no report on the detection of rice based on digital image processing and deep learning technology. Therefore, the present invention provides a rice quality detection method, system, equipment and storage medium, which can characterize and classify the appearance of rice by digital image processing technology, and automatically learn the feature representation and classification model of rice by training neural networks, so as to achieve efficient and accurate rice detection. Summary of the invention
[0004] The present invention aims at solving the problems in the prior art and provides a rice quality detection method, system, equipment and storage medium.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] (1) The present invention provides a rice quality detection method, comprising the following steps:
[0007] Step 1: Obtain rice images and preprocess them to obtain a rice image dataset;
[0008] Step 2: Establish a rice quality detection network model based on multi-layer feature fusion. The network model is divided into input layer, feature fusion layer and detection layer;
[0009] Step 3: Send the rice image dataset to the rice quality detection network model for training to obtain a rice defect detection model;
[0010] Step 4: Obtain a rice image to be detected, perform detection using a rice defect detection model, and obtain a rice defect detection result;
[0011] Step 5: Detect the water content and weight of the rice.
[0012] Furthermore, the step 1 includes: step 1.1: selecting rice from different origins as the research object, collecting rice images through an industrial camera, and saving them in JPG format; step 1.2: introducing the Imgaug library, preprocessing and expanding the rice images in JPG format, and changing the appearance and features of the images; step 1.3: annotating the rice images with defects through LabelImg to obtain a rice image data set; the defect features are divided into: whole rice grains, broken rice grains, and yellow rice grains.
[0013] Furthermore, in step 2: 5 GhostConv modules and 4 CR modules are used as the input layer of the network, wherein the GhostConv convolution is used to downsample the input image, a part of the CR module is convolved, and the other part is stacked with the convolution of the previous layer to obtain richer feature information; the feature fusion layer uses multiple GhostConv modules to perform downsampling and upsampling operations respectively, fuses the low-level and high-level features, and adds a CBAM module behind each fused feature map to obtain a network structure that is easy to identify and locate; the detection layer is provided with four detection heads, which have a better detection effect on rice defects.
[0014] Furthermore, step 3 includes: dividing the preprocessed rice image data set into a training set, a validation set and a test set in a ratio of 7:2:1; inputting the training set into the rice quality detection network model for training; inputting the validation set into the trained rice quality detection network model for verification to obtain the optimal model in the training process; inputting the test set into the optimal rice quality detection network model to obtain a performance evaluation result of the optimal rice quality detection network model.
[0015] Furthermore, the performance evaluation parameters of the optimal rice quality detection network model are precision, recall, accuracy and mean average.
[0016] Furthermore, the detection method of the rice moisture content is as follows: an LED light source is irradiated on a rice sample to be detected through a filter, and then the LED light source is reflected to a lens and converged on a near-infrared sensor, and the infrared light signal collected by the near-infrared sensor is converted into an electrical signal to obtain a voltage value; the temperature and humidity of the working environment are detected by a temperature and humidity sensor; the rice moisture content is calculated according to the voltage value and the temperature and humidity of the working environment, and the calculation formula is:
[0017]
[0018] Among them, x1, x2, and x3 represent voltage, temperature, and humidity respectively, and w 12 、w 23 , b2, and b3 represent weights.
[0019] Furthermore, the collected infrared light signal is converted into an electrical signal that can be recognized by the system through I / V conversion, filtering, operational amplification and AD conversion by a near-infrared sensor.
[0020] Furthermore, the rice weight detection method is as follows: 100 grains of rice are taken and weighed to obtain the average mass Mo of each grain of rice, and the rice is evenly spread through a vibrating conveyor belt. When the rice sample is conveyed to the bottom of the industrial camera, the industrial camera inputs the captured picture into the rice quality detection network to calculate the number of rice N, and the mass of all the rice is NMo. The actual mass Ma of the rice is measured by a weight sensor, and the actual mass of the rice is:
[0021] NMo=Ma+x(x <k);
[0022] Among them, x is the error value between the actual weight of rice and the detected weight, k is the error threshold, and when x>k, it is determined that the rice is not evenly scattered and needs to be vibrated and dispersed again.
[0023] (ii) The present invention provides a rice quality detection system, comprising a rice defect detection mechanism, a rice moisture detection mechanism, a rice weight detection mechanism and a conveying device; the rice defect detection mechanism comprises an image acquisition module, an image processing module, a model construction module, a model training module and a defect detection module; the image acquisition module is an industrial camera, used to acquire rice images; the image processing module is used to pre-process the rice images to obtain a rice image data set; the model construction module is used to construct a rice quality detection network model; the model training module is used to train the rice quality detection network model through the rice image data set to obtain a rice defect detection model; the defect detection model The block is used to detect the rice to be detected through the rice defect detection model to obtain the rice defect detection result; the rice moisture detection mechanism includes a light source, a near-infrared sensor and a temperature and humidity sensor; the rice weight detection mechanism is a weight sensor; the conveying device is used to convey the rice sample; the industrial camera is distributed above the conveying device and is used to collect the rice sample image; the light source and the near-infrared sensor are distributed above the conveying device, the light of the light source is irradiated on the rice sample through the filter, and the near-infrared sensor is used to convert the near-infrared light signal reflected by the rice sample into an electrical signal; the temperature and humidity sensor is used to detect the temperature and humidity values of the working environment, and the weight sensor is used to detect the quality of the rice sample.
[0024] (III) The present invention provides a rice quality detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the steps of the rice quality detection method described in the invention content (I) are implemented.
[0025] (IV) The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the steps of the rice quality detection method described in the invention content (I) are implemented.
[0026] The beneficial effects of the present invention are:
[0027] The present invention proposes a rice quality detection system, which is beneficial to improving the efficiency of rice detection tasks. In order to detect the appearance quality problem of rice, the present invention proposes a rice quality detection network based on multi-layer feature fusion. The network is divided into an input layer, a feature fusion layer and a detection layer. Four detection heads are used to improve the detection accuracy of the model for small targets. Experiments show that it is superior to several common algorithms in the problem of rice appearance detection. At the same time, in order to detect the moisture content of rice, it is found through observation that rice with different moisture contents is most sensitive at a wavelength of 1450nm. The feature that infrared light is absorbed by the moisture on the surface of rice is used to design a rice moisture detection model, thereby solving the problem of rice moisture content detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is the structure diagram of rice quality detection system;
[0029] Figure 2 This is a model diagram of rice moisture detection.
[0030] The symbols in the accompanying drawings are:
[0031] 1. Conveying device; 2. Light source; 3. Industrial camera; 4. Near-infrared sensor; 5. Weight sensor; 6. Temperature and humidity sensor; 7. Rice sample; 8. First filter; 9. Second filter; 10. Lens. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention and the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0033] Example 1
[0034] The embodiment of the present invention provides a rice quality detection method, wherein the detection objects are rice surface defects, rice water content and rice weight, and specifically comprises the following steps:
[0035] Step 1: Obtain rice images and preprocess them to obtain a rice image dataset
[0036] (1) Rice from different origins was selected as the research object. The industrial camera model was Hikvision MV-CA060-10GC. A total of 1000 rice images with a resolution of 640*640 were collected and saved in JPG format.
[0037] (2) The Imgaug library is introduced to preprocess and expand rice images in JPG format to change the appearance and characteristics of the images.
[0038] Imgaug is a Python image enhancement library that is used to enhance images when training neural networks. Imgaug provides a variety of image enhancement methods and techniques that can help improve the quality of the dataset and increase the generalization ability of the model. The Imgaug library can be used to perform various transformations and distortions on images, such as adjusting brightness, adding noise, etc. In addition, various filters can be applied, noise can be added, brightness and contrast can be adjusted, etc. to change the appearance and characteristics of the image.
[0039] The preprocessed rice image dataset is divided into training set, validation set and test set in a ratio of 7:2:1. When making target detection datasets, the commonly used format is Pascal VOC. This format includes JPEGImages to store original images, Annotations to store image tags, and ImageSets to store training, validation and test set information.
[0040] (3) The rice images are labeled with defects using the data labeling tool LabelImg, and the labeling information is saved as an XML file to obtain a rice image dataset. The defect features are divided into: whole rice grains, broken rice grains, and yellow rice grains. Finally, a file list is generated to ensure that the dataset is complete and accurate, providing effective support for the training and evaluation of the target detection algorithm.
[0041] Step 2: Establish a rice quality detection network model based on multi-layer feature fusion
[0042] The network model is divided into input layer, feature fusion layer and detection layer;
[0043] Five GhostConv modules and four CR modules are used as the input layer of the network. The GhostConv convolution is used to downsample the input image. One part of the CR module performs a convolution operation, and the other part is stacked with the convolution of the previous layer to obtain richer feature information.
[0044] The GhostConv convolution step is divided into three steps: first, the number of channels is aggregated through 1*1 ordinary convolution to generate a feature map; then a redundant feature map is generated through linear transformation; finally, the two feature maps are stacked to output a feature map with n channels.
[0045] The GhostBottleneck structure is composed of two GhostConv stacks, where the first GhostConv module is used to increase the number of model channels, and the second GhostConv module is used to reduce the number of network channels and match the residual connection. The GhostBottleneck structure uses a depth-separable convolution with a stride of 2, which reduces the amount of computation while maintaining the accuracy of the model. The ReLU activation function is used after the first GhostConv module, and each convolution module uses batch normalization BN, which accelerates the convergence speed and improves the convergence effect.
[0046] The feature fusion layer uses 4 GhostConv modules to perform downsampling and upsampling operations respectively, among which upsampling can fuse the high-resolution but low-semantic feature maps in the deep network with the low-resolution but high-semantic feature maps in the shallow network. Through upsampling, the model can detect targets at multiple scales, especially the detection accuracy of small targets is significantly improved. In order to enhance the model's detection ability for small targets, the present invention integrates the CBAM attention mechanism module into the feature fusion layer. The CBAM attention mechanism is a key module for enhancing the performance of convolutional neural networks. CBAM combines two mechanisms, channel attention and spatial attention, to increase the model's attention to important features. Channel attention is used to adjust the importance between different channels so that the network can better learn feature representation; while spatial attention helps to capture the correlation between different spatial positions, thereby improving the model's representation ability.
[0047] The detection layer is provided with 4 detection heads, which has a better detection effect on rice defects. Rice defects are small targets. The rice data set selected by the present invention has a size of only 640*640 when entering the network, and the size of the rice grains is correspondingly reduced to less than 8*8, resulting in a significant reduction in the detection accuracy of the model. In order to solve this problem, the present invention designs 4 detection heads, and the output layer of the network becomes 160*160, 80*80, 40*40, and 20*20, and the minimum target that can be detected is 4*4, which greatly improves the accuracy of the model for small targets.
[0048] The present invention proposes a loss function Poly loss , which can be adjusted according to the positive sample coefficient and negative sample coefficient of different data sets. First, the two commonly used loss functions (cross entropy loss function and focal loss function) are expanded through Taylor decomposition, as shown in the following formula:
[0049]
[0050] Among them, α j ∈R represents the weight coefficient of the polynomial, P tRepresents the probability of target label prediction. Its engineering applicability is mainly reflected in its applicability to different scenarios and different data sets by adjusting the polynomial coefficient α j Make the loss function more suitable for the object recognition task.
[0051] Through calculation, it can be concluded that the effect of adjusting the first polynomial coefficient Poly_L1 of the Taylor expansion polynomial term is better than that with Focal loss The cross entropy loss function is as follows:
[0052] L Poly_L1 =(1+ε1)(1-P t )+1 / 2(1-P t ) 2 +...=-log(P t )+ε1(1-P t )
[0053] Step 3: Send the rice image dataset to the rice quality detection network model for training to obtain the rice defect detection model
[0054] The preprocessed rice image dataset is divided into training set, validation set and test set in a ratio of 7:2:1;
[0055] The training set is input into the rice quality detection network model for training; the validation set is input into the trained rice quality detection network model for verification to obtain the optimal model in the training process; the test set is input into the optimal rice quality detection network model to obtain the performance evaluation result of the optimal rice quality detection network model.
[0056] The evaluation indicators used to evaluate the performance of the rice quality detection network model are precision, recall, accuracy and mean average precision (mAP).
[0057] The calculation formula for precision is:
[0058]
[0059] The calculation formula for recall is:
[0060]
[0061] The accuracy calculation formula is:
[0062]
[0063] Among them, TP represents the number of correctly predicted positive samples; FP represents the number of samples predicted as positive but actually negative samples; TN represents the number of correctly predicted negative samples; and FN represents the number of samples predicted as negative but actually positive samples.
[0064] The mean average precision mAP calculation formula is:
[0065]
[0066] Among them, N c Represents the number of categories, AP is the average precision of a single category (Average Precision, AP). The higher the AP value, the better the model detects this type of defect. The formula is:
[0067]
[0068] P stands for precision and R stands for recall. In the experiment, the larger the mAP value is, the better the detection effect of the network model is.
[0069] In order to further verify the overall performance of the detection algorithm designed by the present invention in the rice defect detection task, the present invention compares the designed detection algorithm with four mainstream detection algorithms. The compared algorithms are based on single-stage YOLOv5 and YOLOv8, region-based Faster R-CNN, and regression-based SSD.
[0070] The comparison results are shown in Table 1.
[0071] Table 1 Comparison of performance indicators of five algorithms
[0072]
[0073]
[0074] As shown in Table 1, the algorithm designed by the present invention has good performance, which can not only effectively identify various targets, but also has a high detection confidence. From the current results, YOLOv8, as the latest algorithm in the YOLO series, has achieved the mAP closest to the algorithm of the present invention without any specific improvement. The method proposed by the present invention still has advantages, and its detection speed is sufficient to meet the actual needs of rice quality detection tasks.
[0075] Step 4: Obtain the rice image to be tested, perform detection through the rice defect detection model, and obtain the rice defect detection result.
[0076] Step 5: Check the moisture content of rice
[0077] like Figures 1-2As shown, the LED light source 2 is irradiated onto the rice sample 7 to be detected through the first filter 8, and then reflected to the lens 10 and converged on the near-infrared sensor 4. Rice with different water contents is most sensitive at a wavelength of 1450nm, so a diode with a wavelength of 1450nm is selected as the light source.
[0078] The infrared light signal collected by the near-infrared sensor is converted into an electrical signal through the near-infrared sensor, and after I / V conversion, it enters the amplifier circuit and is amplified to the range that can be collected. Finally, the electrical signal is sent to the AD for analog-to-digital conversion, and then converted into an electrical signal that can be recognized by the system to obtain a voltage value.
[0079] At different temperatures, the circuit will produce errors, so the calculation of the moisture content of rice requires the working environment temperature and humidity values collected by the temperature and humidity sensor 6 and the voltage value collected by the near infrared sensor 4. The moisture content of rice is calculated based on the voltage value and the temperature and humidity of the working environment. The calculation formula is:
[0080]
[0081] Among them, x1, x2, and x3 represent voltage, temperature, and humidity respectively, and w 12 、w 23 , b2, and b3 represent weights.
[0082] Step 6: Check the weight of rice
[0083] Take 100 grains of rice and weigh them to get the average mass Mo of each grain of rice. Spread the rice evenly through a vibrating conveyor belt. When the rice sample is conveyed to the bottom of the industrial camera 3, the industrial camera 3 inputs the captured image into the rice quality detection network to calculate the number of rice N. The mass of all rice is NMo. The actual mass Ma of rice is measured by a weight sensor. The detected mass of rice is shown in the following formula:
[0084] NMo=Ma+x(x <k);
[0085] Among them, x is the error value between the actual weight of rice and the detected weight, k is the error threshold, and when x>k, it is determined that the rice is not evenly scattered and needs to be vibrated and dispersed again.
[0086] Example 2
[0087] An embodiment of the present invention provides a rice quality detection system, which includes a rice defect detection mechanism, a rice moisture detection mechanism, a rice weight detection mechanism and a conveying device 1.
[0088] The rice defect detection mechanism comprises an image acquisition module, an image processing module, a model construction module, a model training module and a defect detection module; the image acquisition module is an industrial camera 3, which is used to acquire rice images; the image processing module is used to preprocess the rice images to obtain a rice image data set; the model construction module is used to construct a rice quality detection network model; the model training module is used to train the rice quality detection network model through the rice image data set to obtain a rice defect detection model; the defect detection module is used to detect the rice to be detected through the rice defect detection model to obtain a rice defect detection result.
[0089] The rice moisture detection mechanism includes a light source 2, a near-infrared sensor 4 and a temperature and humidity sensor 6; the rice weight detection mechanism is a weight sensor 5; the conveying device 1 is used to convey rice samples; the industrial camera 3 is distributed above the conveying device 1 and is used to collect rice sample images; the light source 2 and the near-infrared sensor 4 are distributed above the conveying device 1, the light of the light source 2 is irradiated on the rice sample through a filter, and the near-infrared sensor 4 is used to convert the near-infrared light signal reflected by the rice sample into an electrical signal; the temperature and humidity sensor 6 is used to detect the temperature and humidity values of the working environment, and the weight sensor 5 is used to detect the quality of the rice sample.
[0090] Example 3
[0091] An embodiment of the present invention provides a rice quality detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the steps of the rice quality detection method described in Example 1 are implemented.
[0092] In another embodiment, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the steps of the rice quality detection method as described in Example 1 are implemented.
[0093] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A rice quality detection method, characterized in that, The following steps are involved: Step 1: Obtain rice images and preprocess them to obtain a rice image dataset; Step 2: Establish a rice quality detection network model based on multi-layer feature fusion. The network model is divided into input layer, feature fusion layer and detection layer; Step 3: Send the rice image dataset to the rice quality detection network model for training to obtain a rice defect detection model; Step 4: Obtain a rice image to be detected, perform detection using a rice defect detection model, and obtain a rice defect detection result; Step 5: Detect the water content and weight of the rice.
2. The rice quality detection method according to claim 1, characterized in that: The step 1 comprises: Step 1.1: Take rice from different origins as the research object, collect rice images through industrial cameras, and save them in JPG format; Step 1.2: Import the Imgaug library to preprocess and expand the rice image in JPG format to change the appearance and characteristics of the image; Step 1.3: Use LabelImg to annotate rice images with defects and obtain a rice image dataset; defect features include: whole rice grains, broken rice grains, and yellow rice grains.
3. The rice quality detection method according to claim 1, characterized in that: In step 2: The input layer includes 5 GhostConv modules and 4 CR modules, wherein the GhostConv module is used to downsample the input image, and a part of the CR module performs a convolution operation, and the other part performs a stacking operation with the convolution of the previous layer to obtain richer feature information; The feature fusion layer includes multiple GhostConv modules, which perform downsampling and upsampling operations respectively to fuse low-level and high-level features, and add a CBAM module after each fused feature map to obtain a network structure that is easy to identify and locate; The detection layer is provided with four detection heads for detecting rice defects.
4. The rice quality detection method according to claim 1, characterized in that: The step 3 comprises: The preprocessed rice image dataset is divided into training set, validation set and test set in a ratio of 7:2:1; The training set is input into the rice quality detection network model for training; the validation set is input into the trained rice quality detection network model for verification to obtain the optimal model in the training process; the test set is input into the optimal rice quality detection network model to obtain the performance evaluation result of the optimal rice quality detection network model.
5. The rice quality detection method according to claim 4, characterized in that: The performance evaluation parameters of the optimal rice quality detection network model are precision, recall, accuracy and mean average.
6. The rice quality detection method according to claim 1, characterized in that: The detection method of the water content of rice is: The LED light source is irradiated onto the rice sample to be tested through a filter, and then reflected to the lens and converged on the near-infrared sensor, and the infrared light signal collected by the near-infrared sensor is converted into an electrical signal to obtain a voltage value; Detect the temperature and humidity of the working environment through the temperature and humidity sensor; The moisture content of rice is calculated based on the voltage value and the temperature and humidity of the working environment. The calculation formula is: Among them, x1, x2, and x3 represent voltage, temperature, and humidity respectively, and w 12 、w 23 , b2, and b3 represent weights.
7. The rice quality detection method according to claim 1, characterized in that: The detection method of the rice weight is: Take a number of rice grains and weigh them to get the average mass Mo of each grain of rice. Spread the rice evenly through a vibrating conveyor belt. When the rice sample is conveyed to the bottom of the industrial camera, the industrial camera inputs the captured image into the rice quality detection network to calculate the number of rice N. The mass of all rice is NMo. The actual mass Ma of the rice is measured by a weight sensor. The actual mass of the rice is: NMo=Ma+x(x <k); Among them, x is the error value between the actual weight of rice and the detected weight, k is the error threshold, and when x>k If the rice is not evenly dispersed, it is determined that the rice is not evenly dispersed and vibration dispersion is performed again.
8. A rice quality detection system, characterized in that: It includes a rice defect detection mechanism, a rice moisture detection mechanism, a rice weight detection mechanism and a conveying device (1); The rice defect detection mechanism comprises an image acquisition module, an image processing module, a model construction module, a model training module and a defect detection module; the image acquisition module is an industrial camera (3) for acquiring rice images; the image processing module is used for preprocessing rice images to obtain a rice image data set; the model construction module is used for constructing a rice quality detection network model; the model training module is used for training the rice quality detection network model through the rice image data set to obtain a rice defect detection model; the defect detection module is used for detecting rice to be detected through the rice defect detection model to obtain a rice defect detection result; The rice moisture detection mechanism comprises a light source (2), a near infrared sensor (4) and a temperature and humidity sensor (6); the rice weight detection mechanism is a weight sensor (5); the conveying device (1) is used to convey the rice sample; the industrial camera (3) is distributed above the conveying device (1) and is used to collect the image of the rice sample; the light source (2) and the near infrared sensor (4) are distributed above the conveying device (1), the light of the light source (2) is irradiated on the rice sample through a filter, and the near infrared sensor (4) is used to convert the near infrared light signal reflected by the rice sample into an electrical signal; the temperature and humidity sensor (6) is used to detect the temperature and humidity values of the working environment, and the weight sensor (5) is used to detect the quality of the rice sample.
9. A rice quality detection device, characterized in that: comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; When the processor executes the computer program, the steps of the rice quality detection method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium is used to store a computer program, When the computer program is executed by a processor, the steps of the rice quality detection method according to any one of claims 1 to 8 are implemented.