Intelligent measuring method for diameter of rice stalk
By constructing a smart measurement model of rice stem diameter based on YOLOv8s and Faster R-CNN, the problems of unreliability and high image acquisition cost in the prior art are solved, and higher measurement accuracy and operability are achieved.
Patent Information
- Application Number
- CN202411769288.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing automatic measurement method for cross-sectional diameter of rice stems has problems such as unreliability of neural network prediction models and high cost of obtaining images.
The YOLOv8s model and Faster R-CNN model were used to construct an intelligent measurement model for rice stem diameter, and the model was trained and verified by setting reference objects and preprocessing image data sets to improve the accuracy of the measurement results.
It improves the generalization performance and accuracy of the measurement model, reduces the difficulty and cost of obtaining the images to be measured, and improves the accuracy and practical operation of the measurement results.
Smart Images

Figure CN119516281A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of intelligent measurement of rice stalk diameter, and in particular to an intelligent measurement method for rice stalk diameter. Background Art
[0002] Rice stalks serve as channels for supporting rice plants and transmitting nutrients, and their thickness has an important impact on yield. Thick stalks can resist strong winds and diseases and reduce the occurrence of lodging. At the same time, a good stalk structure is also conducive to the rapid transmission and distribution of nutrients, laying the foundation for high yields. The automatic measurement method for the cross-sectional diameter of rice stalks can efficiently obtain a large amount of rice stalk cross-sectional diameter data, helping breeders to quickly screen out rice varieties with moderate diameters that are conducive to lodging resistance and increased yields. Compared with traditional manual measurement methods, the automatic measurement method for rice stalk cross-sectional diameters can reduce human errors, improve data accuracy, and provide more reliable data support for breeding research.
[0003] The existing method introduces neural network research into rice stem recognition, making the automatic measurement of rice stem cross-sectional diameter more convenient. The existing method 1 uses a deep learning model to segment rice cross-sectional CT images and calculate the corresponding microstructure parameters, thereby completing the automatic measurement of rice stem cross-sectional diameter. The existing method 2 constructs a rice stem slice image segmentation model based on an improved Mask R-CNN network to measure and count parameters such as the number and area of vascular bundles in rice stem microscopic slice images.
[0004] In summary, the current rice stem cross-sectional diameter measurement method mainly uses rice stem slices as the object to obtain images, and then uses a neural network model for prediction. The main defects are:
[0005] (1) The neural network prediction model used is unreliable, with limited generalization performance and accuracy, which leads to inaccurate measurement results;
[0006] (2) Rice stems need to be sliced manually and taken back to the room to take cross-sectional images of the stems using CT or a microscope. Therefore, the cost of obtaining CT or microscopic images of the cross-sectional images of the stems is high and inconvenient for users to use. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the present invention provides an intelligent method for measuring the diameter of rice stems.
[0008] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0009] A method for intelligently measuring the diameter of a rice stalk comprises the following steps:
[0010] S1, setting a reference object, using a shooting tool to collect rice stem cross-section image data with the reference object, and preprocessing the rice stem cross-section image data with the reference object to obtain an image data set;
[0011] S2. Build a rice stem diameter intelligent measurement model based on the YOLOv8s model and Faster R-CNN model;
[0012] S3. Use the image data set in step S1 to train, verify and test the intelligent measurement model for rice stalk diameter in step S2, collect the image data set to be measured, and use the tested intelligent measurement model for rice stalk diameter and the image data set to be measured to obtain the measurement result of the rice stalk diameter.
[0013] Furthermore, in step S1, a shooting tool is used to collect rice stalk cross-sectional image data with a reference object. The specific process is: rice ears in the mature stage are cut off, and the cut rice ears are moved away from the rice stubble position, wherein the rice stubble height is retained to be 10 cm, and a reference object is set next to the rice stubble. Then, a shooting tool is used to collect a rice stalk cross-sectional image in the rice field at a position 15-30 cm vertically above the rice stalk cross-sectional area, so as to obtain rice stalk cross-sectional image data with a reference object.
[0014] Further, in step S1, the image data of the cross section of the rice stem with the reference object is preprocessed to obtain an image data set, including the following steps:
[0015] A1. Filtering the rice stalk cross-section image data with the reference object by using a median filter method to obtain the filtered rice stalk cross-section image data with the reference object;
[0016] A2, using a data labeling method to label the reference object and the stem cross section in the rice stem cross section image data with the reference object after filtering in step A1, to obtain the rice stem cross section image data containing the label and the position information;
[0017] A3. Amplify the rice stem cross-section image data containing labels and position information in step A2 using a data amplification method to obtain an image data set.
[0018] Further, step A2 includes the following steps:
[0019] A21, based on the rice stalk cross-section image data with the reference object after filtering in step A1, draw rectangular frames for the rice stalk cross-section and the reference object in the image, respectively, to obtain the rice stalk cross-section image data with the predicted boundary frame;
[0020] A22. Based on the rice stalk cross-sectional image data with the predicted bounding box in step A21, the label and coordinates of the predicted bounding box are stored in a file of a set format to obtain the rice stalk cross-sectional image data containing the label and position information.
[0021] Furthermore, in step S2, the intelligent measurement model for rice stalk diameter includes an input layer, a YOLOv8s model, a first non-maximum suppression layer, a Faster R-CNN model, a second non-maximum suppression layer, a weighted adjustment layer and an output layer; the input layer is connected to the input end of the YOLOv8s model and the input end of the Faster R-CNN model at the same time, the output end of the YOLOv8s model and the output end of the Faster R-CNN model are respectively connected to the input end of the first non-maximum suppression layer and the input end of the second non-maximum suppression layer, the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer are both connected to the input end of the weighted adjustment layer, and the output end of the weighted adjustment layer is connected to the output layer; the output layer is used to obtain the intelligent measurement result of rice stalk diameter.
[0022] Furthermore, the YOLOv8s model is improved by adding a SENet module that introduces an attention mechanism after the last convolutional layer of the YOLOv8s model. The SENet module is used to extract key information of the rice stem cross-section image data.
[0023] Furthermore, the Faster R-CNN model was improved by removing the ordinary stacked convolutional layers in the Faster R-CNN model, setting the ResNet50 model as the basic feature extraction backbone network for rice stalk cross-section images, and setting a feature pyramid structure after the ResNet50 model; the ResNet50 model was used to extract features of the image dataset to generate a feature map of the rice stalk cross-section; the feature pyramid structure was used to fuse low-resolution features with high-resolution through a top-down path and lateral connections based on the feature map of the rice stalk cross-section to generate a multi-scale feature map of the rice stalk cross-section.
[0024] Furthermore, the weighted adjustment layer sets the initial weight ratio of the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer to 1:3, and iterates the initial weight ratio using a grid search.
[0025] Furthermore, the data processing process of the output layer to obtain the intelligent measurement results of rice stem diameter is expressed as:
[0026] ;
[0027] in: is the actual value of the diameter of the rice stem, is the pixel diameter of the reference object, To obtain the maximum value symbol, Predict the long side of the bounding box for the cross section of a rice stalk, Predict the short side of the bounding box for a rice stalk cross section.
[0028] Furthermore, in step S3, the image data set in step S1 is used to train, verify and test the intelligent measurement model of rice stem diameter in step S2. The specific process is: the image data set in step S1 is randomly divided into a training set, a verification set and a test set in a ratio of 0.6:0.2:0.2, and the training set, verification set and test set are used to train, verify and test the intelligent measurement model of rice stem diameter in step S2, respectively.
[0029] The beneficial effects of the present invention are:
[0030] (1) The present invention constructs an intelligent measurement model for rice stalk diameter based on the YOLOv8s model and the Faster R-CNN model, which can improve the unreliability, generalization performance and accuracy of the measurement model, thereby improving the accuracy of the intelligent measurement results of rice stalk diameter;
[0031] (2) The present invention sets a reference object, uses a shooting tool to collect the cross-sectional image data of the rice stalk with the reference object, and pre-processes the cross-sectional image data of the rice stalk with the reference object to obtain an image data set. This can reduce the difficulty and cost of obtaining the cross-sectional image of the rice stalk to be measured, and has stronger practical operability. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a process for intelligently measuring the diameter of rice stems;
[0033] Figure 2 A schematic diagram of the process of collecting a cross-sectional image of a rice stem with a reference object in the present invention;
[0034] Figure 3 It is a structural schematic diagram of the intelligent measurement model of rice stem diameter in the present invention;
[0035] Figure 4 Schematic diagram of the improved YOLOv8s model structure in the present invention;
[0036] Figure 5 It is a structural diagram of the SENet module;
[0037] Figure 6 This is a schematic diagram of the improved Faster R-CNN model structure in the present invention. DETAILED DESCRIPTION
[0038] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0039] like Figure 1 As shown, a method for intelligently measuring the diameter of a rice stalk includes steps S1-S3, which are specifically as follows:
[0040] S1. Setting a reference object, using a shooting tool to collect rice stem cross-section image data with the reference object, and preprocessing the rice stem cross-section image data with the reference object to obtain an image data set.
[0041] In an optional embodiment of the present invention, the present invention selects a round iron block with a diameter of 3 cm as a reference object.
[0042] like Figure 2 As shown, the present invention uses a shooting tool to collect rice stalk cross-section image data with a reference object, and the specific process is: cut off the rice ears in the mature stage, move the cut rice ears away from the rice stubble position, wherein the rice stubble height is left to be 10 cm, and set the reference object next to the rice stubble, and then use the shooting tool to collect the rice stalk cross-section image at a position 15-30 cm above the rice stalk cross-section in the rice field, so as to obtain the rice stalk cross-section image data with the reference object. The shooting tool in the present invention uses a smart phone.
[0043] The present invention preprocesses the image data of the cross section of a rice stalk with a reference object to obtain an image data set, comprising the following steps:
[0044] A1. Filter the rice stem cross-section image data with the reference object by using a median filtering method to obtain the filtered rice stem cross-section image data with the reference object.
[0045] Specifically, the rice stem cross-section image data with a reference object collected in the present invention has a background containing different lighting, different complex backgrounds, and different weather conditions, and the image data is affected by noise to varying degrees. Therefore, the present invention uses a median filtering method to filter the rice stem cross-section image data with a reference object to obtain the filtered rice stem cross-section image data with a reference object.
[0046] A2. Using a data labeling method, label the reference object and the stem cross section in the rice stem cross section image data with the reference object after filtering in step A1, and obtain the rice stem cross section image data containing labels and position information.
[0047] Step A2 includes the following steps:
[0048] A21. Based on the rice stem cross-section image data with the reference object after filtering in step A1, rectangular frames are drawn for the rice stem cross-section and the reference object in the image respectively to obtain the rice stem cross-section image data with a predicted boundary frame.
[0049] A22. Based on the rice stalk cross-sectional image data with the predicted bounding box in step A21, the label and coordinates of the predicted bounding box are stored in a file of a set format to obtain the rice stalk cross-sectional image data containing the label and position information.
[0050] A3. Amplify the rice stem cross-section image data containing labels and position information in step A2 using a data amplification method to obtain an image data set.
[0051] S2. Build a rice stem diameter intelligent measurement model based on the YOLOv8s model and Faster R-CNN model.
[0052] In an optional embodiment of the present invention, the intelligent measurement model for rice stem diameter includes an input layer, a YOLOv8s model, a first non-maximum suppression layer, a Faster R-CNN model, a second non-maximum suppression layer, a weighted adjustment layer and an output layer.
[0053] like Figure 3 As shown, the input layer is connected to the input end of the YOLOv8s model and the input end of the Faster R-CNN model at the same time, the output end of the YOLOv8s model and the output end of the Faster R-CNN model are connected to the input end of the first non-maximum suppression layer and the input end of the second non-maximum suppression layer respectively, the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer are both connected to the input end of the weighted adjustment layer, and the output end of the weighted adjustment layer is connected to the output layer. The output layer is used to obtain the intelligent measurement result of the rice stem diameter.
[0054] Specifically, since the rice stalk cross-section image is taken under complex field conditions, the pixels of the rice stalk cross-section are very similar to certain objects in the image background, which will affect the accuracy of the rice stalk diameter intelligent measurement model. Therefore, the present invention improves the rice stalk diameter intelligent measurement model to enhance the accuracy of the rice stalk diameter intelligent measurement model.
[0055] The present invention improves the YOLOv8s model, specifically by adding a SENet module introducing an attention mechanism after the last convolutional layer of the YOLOv8s model, and the SENet module is used to extract key information of rice stem cross-section image data.
[0056] like Figure 4 As shown, the present invention provides a schematic diagram of the structure of an improved YOLOv8s model, where Conv is a convolution layer, which is a standard convolution operation module, and is used to process the input rice stem cross-section feature map through a convolution operation to extract local features in the rice stem cross-section image; C2f is a CSP Bottleneck, which is an improved bottleneck module, composed of multiple DarkNet Bottlenecks, and is used to extract and fuse the rice stem cross-section features; SPPF is SpatialPyramid Pooling-Fast, which is used for spatial pyramid pooling, and extracts rice stem cross-section features of different scales through multiple maximum pooling operations; Concat is a feature connection module, which is used to connect tensors along a specified dimension; Upsample is an upsampling module, which is used to enlarge the low-resolution rice stem cross-section feature map to the highest resolution; Detect is a detection head, which is used to predict the rice stem cross-section bounding box and category probability; Conv2d is a two-dimensional convolution, which is used to capture the local features of the rice stem cross-section; BN is BatchNorm batch normalization, which is used to accelerate the training process of the rice stem cross-section detection model; SiLU is a Sigmoid The Linear Unit activation function is used to process complex nonlinear relationships and enhance the expressiveness of the model. BottleNeck is the bottleneck layer, which is a residual structure used to enhance the network depth and reduce the number of parameters. Add is tensor addition, which is used to add two tensors. MAXPool is maximum pooling, which is used to reduce the spatial size of the rice stem cross-section feature map. Split is feature stratification, which is used to split the input tensor into multiple tensors along the specified dimension. BboxLoss is the bounding box loss, which is used to calculate the difference between the predicted bounding box and the true bounding box. ClsLoss is the classification loss, which is used to calculate the difference between the predicted category and the true category.
[0057] like Figure 5 As shown, the present invention provides a structural schematic diagram of the SENet module, H is the height of the rice stem cross-section feature map, C is the number of channels of the rice stem cross-section feature map, and W is the width of the rice stem cross-section feature map; F tr The process of performing convolution operation on the input feature map to obtain the intermediate feature map U; F sq is the process of compressing the intermediate feature map U into a 1×1×C vector through global average pooling; 1×1×C is the dimension of the rice stem cross-section feature map, 1×1 is the size of the rice stem cross-section feature map, and C is the number of channels of the rice stem cross-section feature map; F ex To pass two fully connected layers to F sq The process of performing nonlinear transformation on the output of F, learning the dependencies between channels, and outputting the channel weights;scale To F ex The output channel weight is multiplied channel by channel with the intermediate feature map U to adjust the importance of each channel and finally obtain the enhanced rice stem cross-section feature map.
[0058] The present invention improves the Faster R-CNN model, specifically: removing the commonly stacked convolutional layers in the Faster R-CNN model, setting the ResNet50 model as the basic feature extraction backbone network of the rice stalk cross-section image, and setting a feature pyramid structure after the ResNet50 model; the ResNet50 model is used to extract features of an image data set to generate a feature map of the rice stalk cross-section; the feature pyramid structure is used to fuse low-resolution features with high-resolution through a top-down path and lateral connections according to the feature map of the rice stalk cross-section, so as to generate a multi-scale feature map of the rice stalk cross-section.
[0059] like Figure 6As shown in the figure, the present invention provides a schematic diagram of the improved Faster R-CNN model structure, 0.5x is the scaling ratio of the model, which is used to adjust the size of the feature map; C1 is the first layer output of the feature extraction network, C2 is the second layer output of the feature extraction network; C3 is the third layer output of the feature extraction network, C4 is the fourth layer output of the feature extraction network; C5 is the fifth layer output of the feature extraction network; FPN is a feature pyramid network, which is used to process the cross-sectional feature maps of rice stalks of different scales and enhance the detection capability of the model for multi-scale rice stalk cross-sections; 1×1 is a 1×1 convolutional layer, which is used to adjust The number of channels of the feature map; 3×3 is a 3×3 convolution layer, which is used to extract more rice stem cross-sectional feature information; M2 is the second layer output after 1×1 convolution in the feature pyramid network; M3 is the third layer output after 1×1 convolution in the feature pyramid network; M4 is the fourth layer output after 1×1 convolution in the feature pyramid network; M5 is the fifth layer output after 1×1 convolution in the feature pyramid network; P2 is the second layer output after 3×3 convolution in the feature pyramid network, P3 is the third layer output after 3×3 convolution in the feature pyramid network, and P4 is The fourth layer output of the feature pyramid network after 3×3 convolution, P5 is the fifth layer output of the feature pyramid network after 3×3 convolution, and P6 is the sixth layer output of the feature pyramid network after 3×3 convolution; RPN is the region proposal network, which is used to generate candidate regions; reg is regression, which is used to correct the position of the candidate region, cls is classification, which is used to determine the category of the candidate region, 512×512proposals is a candidate region of 512×512 size, and 256×256proposals is a candidate region of 256×256 size The candidate regions are 128×128 proposals, 64×64 proposals, and 32×32 proposals, respectively. 2×up is an upsampling operation used to adjust the size of the rice stalk cross-section feature map. 1×1conv is a 1×1 convolutional layer used to adjust the number of channels of the rice stalk cross-section feature map. ROI is a region of interest extracted from an image. ROI Pooling is a region of interest pooling operation used to convert ROIs of different sizes into a fixed-size rice stalk cross-section feature map. FC is a fully connected layer used to further process the rice stalk cross-section feature map. Softmax Classify is a Softmax classification operation used to determine the category of the candidate region. BBox Regression is a bounding box regression operation used to correct the position of the candidate region.
[0060] Specifically, since there are objects similar to the pixels and image background of the cross section of the rice stalk in the present invention, the YOLOv8s model and the Faster R-CNN model will generate many overlapping prediction bounding boxes with different confidence levels. The present invention suppresses the prediction bounding boxes of non-maximum values in the YOLOv8s model by setting a first non-maximum suppression layer, and suppresses the prediction bounding boxes of non-maximum values in the Faster R-CNN model by setting a second non-maximum suppression layer, so as to reduce the number of prediction bounding boxes and retain the best prediction box.
[0061] The weighted adjustment layer sets the initial weight ratio of the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer to 1:3, and uses grid search to iterate the initial weight ratio.
[0062] The data processing process of obtaining the intelligent measurement results of rice stem diameter in the output layer is expressed as:
[0063] ;
[0064] in: is the actual value of the diameter of the rice stem, is the pixel diameter of the reference object, To obtain the maximum value symbol, Predict the long side of the bounding box for the cross section of a rice stalk, Predict the short side of the bounding box for a rice stalk cross section.
[0065] The present invention calculates the pixel diameter of the reference object, which is expressed as:
[0066] ;
[0067] in: is the pixel diameter of the reference object, Predict the long side of the bounding box for the reference object, Predict the short side of the bounding box for the reference object.
[0068] S3. Use the image data set in step S1 to train, verify and test the intelligent measurement model for rice stalk diameter in step S2, collect the image data set to be measured, and use the tested intelligent measurement model for rice stalk diameter and the image data set to be measured to obtain the measurement result of the rice stalk diameter.
[0069] In an optional embodiment of the present invention, the present invention uses the image data set in step S1 to train, verify and test the intelligent measurement model of rice stem diameter in step S2. The specific process is: the image data set in step S1 is randomly divided into a training set, a verification set and a test set in a ratio of 0.6:0.2:0.2, and the training set, verification set and test set are used to train, verify and test the intelligent measurement model of rice stem diameter in step S2, respectively.
[0070] The present invention conducts a simulation experiment on the rice stalk diameter intelligent measurement model in the method, and the simulation results are shown in Table 1:
[0071]
[0072] It can be seen from Table 1 that the recall rate and F1 value of the rice stalk diameter intelligent measurement model provided by the present invention are higher than those of the YOLOv8s model and the Faster R-CNN model, which indicates that the rice stalk diameter intelligent measurement model provided by the present invention can more accurately detect the cross-section of the rice stalk, thereby providing a solid prerequisite for the intelligent measurement of the rice stalk diameter.
[0073] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for intelligently measuring the diameter of rice stalks, characterized in that: The following steps are involved: S1, setting a reference object, using a shooting tool to collect rice stem cross-section image data with the reference object, and preprocessing the rice stem cross-section image data with the reference object to obtain an image data set; S2. Build a rice stem diameter intelligent measurement model based on the YOLOv8s model and Faster R-CNN model; S3. Use the image data set in step S1 to train, verify and test the intelligent measurement model for rice stalk diameter in step S2, collect the image data set to be measured, and use the tested intelligent measurement model for rice stalk diameter and the image data set to be measured to obtain the measurement result of the rice stalk diameter.
2. The intelligent rice stalk diameter measurement method according to claim 1, characterized in that: In step S1, a shooting tool is used to collect rice stalk cross-sectional image data with a reference object. The specific process is: rice ears in the mature stage are cut off, and the cut rice ears are moved away from the rice stubble position, wherein the rice stubble height is kept at 10 cm, and a reference object is set next to the rice stubble. Then, a shooting tool is used to collect a rice stalk cross-sectional image at a position 15-30 cm above the rice stalk cross-sectional area in the rice field vertically, so as to obtain rice stalk cross-sectional image data with a reference object.
3. The intelligent rice stalk diameter measurement method according to claim 1, characterized in that: In step S1, preprocessing the image data of the cross section of the rice stem with the reference object to obtain an image data set includes the following steps: A1. Filtering the rice stalk cross-section image data with the reference object by using a median filter method to obtain the filtered rice stalk cross-section image data with the reference object; A2, using a data labeling method to label the reference object and the stem cross section in the rice stem cross section image data with the reference object after filtering in step A1, to obtain the rice stem cross section image data containing the label and the position information; A3. Amplify the rice stem cross-section image data containing labels and position information in step A2 using a data amplification method to obtain an image data set.
4. The intelligent rice stalk diameter measurement method according to claim 3, characterized in that: Step A2 includes the following steps: A21, based on the rice stalk cross-section image data with the reference object after filtering in step A1, draw rectangular frames for the rice stalk cross-section and the reference object in the image, respectively, to obtain the rice stalk cross-section image data with the predicted boundary frame; A22. Based on the rice stalk cross-sectional image data with the predicted bounding box in step A21, the label and coordinates of the predicted bounding box are stored in a file of a set format to obtain the rice stalk cross-sectional image data containing the label and position information.
5. The intelligent rice stalk diameter measurement method according to claim 1, characterized in that: In step S2, the intelligent measurement model for rice stalk diameter includes an input layer, a YOLOv8s model, a first non-maximum suppression layer, a Faster R-CNN model, a second non-maximum suppression layer, a weighted adjustment layer and an output layer; the input layer is connected to the input end of the YOLOv8s model and the input end of the Faster R-CNN model at the same time, the output end of the YOLOv8s model and the output end of the Faster R-CNN model are respectively connected to the input end of the first non-maximum suppression layer and the input end of the second non-maximum suppression layer, the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer are both connected to the input end of the weighted adjustment layer, and the output end of the weighted adjustment layer is connected to the output layer; the output layer is used to obtain the intelligent measurement result of rice stalk diameter.
6. The intelligent rice stalk diameter measurement method according to claim 5, characterized in that: The YOLOv8s model is improved by adding a SENet module that introduces an attention mechanism after the last convolutional layer of the YOLOv8s model. The SENet module is used to extract key information of the rice stem cross-section image data.
7. The intelligent rice stalk diameter measurement method according to claim 5, characterized in that: The Faster R-CNN model was improved by removing the ordinary stacked convolutional layers in the Faster R-CNN model, setting the ResNet50 model as the basic feature extraction backbone network for rice stalk cross-section images, and setting a feature pyramid structure after the ResNet50 model; the ResNet50 model was used to extract the features of the image dataset to generate a feature map of the rice stalk cross-section; the feature pyramid structure was used to fuse low-resolution features with high-resolution through a top-down path and lateral connections based on the feature map of the rice stalk cross-section to generate a multi-scale feature map of the rice stalk cross-section.
8. The intelligent rice stalk diameter measurement method according to claim 5, characterized in that: The weighted adjustment layer sets the initial weight ratio of the output end of the first non-maximum suppression layer and the output end of the second non-maximum suppression layer to 1:3, and uses grid search to iterate the initial weight ratio.
9. The intelligent rice stalk diameter measurement method according to claim 5, characterized in that: The data processing process of obtaining the intelligent measurement results of rice stem diameter in the output layer is expressed as: ; in: is the actual value of the diameter of the rice stem, is the pixel diameter of the reference object, To obtain the maximum value symbol, Predict the long side of the bounding box for the cross section of a rice stalk, Predict the short side of the bounding box for a rice stalk cross section.
10. The intelligent rice stalk diameter measurement method according to claim 1, characterized in that: In step S3, the rice stalk diameter intelligent measurement model in step S2 is trained, verified and tested using the image data set in step S1. The specific process is: the image data set in step S1 is randomly divided into a training set, a verification set and a test set in a ratio of 0.6:0.2:0.2, and the rice stalk diameter intelligent measurement model in step S2 is trained, verified and tested using the training set, the verification set and the test set respectively.
Citation Information
Patent Citations
Hypsizygus marmoreus sporocarp growth quality feature extraction and prediction system and method
CN116563654A
Rice plant height measurement method based on yolov5x model
CN116823916A
Plant stem growth geometric parameter measurement method based on machine vision
CN117522950A
Method, device and equipment for identifying placement quality of express item on item supply table and storage medium
CN118887188A
Method for detecting image target in smart home environment
WO2021244079A1