Non-destructive measurement of rice grain size based on panicle structure using deep learning method | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Article Non-destructive measurement of rice grain size based on panicle structure using deep learning method Ruoling Deng, Long Qi, Jing Zhang, Ningxia Yin, Mingxin Hou, Xiaoming Xu This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-3972552/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Rice grain size, grain length and grain width, are very important traits directly related to rice yield. The accurate measurement of these parameters is quite significant in research such as breeding, yield evaluation and variety improvement for rice. Traditional measurement methods still mainly rely on manual labor, which is time-consuming, labor-intensive, and error-prone. In this study, a novel method, dubbed “GSM-Method”, based on convolutional neural network and traditional image processing technology was developed for efficient and precise measurement of rice grain size parameters on rice panicle structure. Firstly, primary branch images of rice panicles were collected at the same height to build image database. Then, the grain detection model using convolutional neural network was established for grain recognition and localization. Subsequently, the calibration value was obtained through traditional image processing technology. Finally, the “GSM-Method” integrated with grain detection model and calibration value was developed for automatic measurement of grain size. The performance of the developed GS-Method was evaluated through testing 60 primary branch images. The test results showed that the root mean square error (RMSE) of grain length for two rice varieties (Huahang15 and Qingyang) were respectively 0.26 mm and 0.30 mm, while the corresponding RMSE of grain width was 0.27mm and 0.31mm, respectively. The proposed algorithm can provide an effective, convenient and low-cost tool for yield evaluation and breeding research. Biological sciences/Computational biology and bioinformatics/Computational platforms and environments Biological sciences/Computational biology and bioinformatics/Image processing Biological sciences/Computational biology and bioinformatics/Machine learning Biological sciences/Computational biology and bioinformatics/Software Physical sciences/Engineering/Mechanical engineering Rice grain size Deep learning Convolutional neural network Automatic measurement Image Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 1. Introduction Grain size is one of the main components for rice yield, as well as being a key agronomic trait for rice breeding (Singh, 2000 ; Li et al., 2018 ). Grain size is also a very important trait in determining rice quality (Armstrong et al., 2005 ; Fan et al., 2006 ). Also, grain size is mainly under the polygenic control of grain length and grain width (Murthy and Govindaswamy, 1967 ). Therefore, the information on grain length and grain width is of great significance (Mahale and Korde, 2014 ). The traditional method of measuring grain size mainly relies on manual labor, such as using calipers or micrometers (Santos et al., 2019 ), but this method is time-consuming, labor-intensive, error-prone, and low in accuracy (Yin et al., 2015 ; Li et al., 2019 ; Hu and Zhang, 2021 ). Therefore, it is imperative to develop a novel method for efficient and precise measurement of grain length and grain width. Existing researches on seed size measurement based on traditional image processing methods have made great progress, for example, the ImageJ (Rasband, 2011 ), SmartGrain (Tanabata et al., 2012 ), GrainScan (Whan et al., 2014 ), Museed (Gao et al., 2017 ), and GridFree (Hu and Zhang, 2021 ). Moreover, researchers (Feng et al., 2023 ) used blacklight image processing technology for rice grain size measurement and filled/unfilled grain detection. Although these methods have been developed for seed/grain size measurement with reasonable accuracies, they need to be threshed before measurement. Also, seeds will be damaged during threshing process, thereby reducing the measurement accuracy. Direct measuring grain size on the panicle branch before threshing can avoid those deficiencies. However, little research has been done in this regard. Advances in computing power and the availability of large amounts of labeled images have promoted convolutional neural network (CNN)-based machine learning methods in the field of computer vision (Hinton and Salakhutdinov, 2006 ; LeCun et al., 2015 ). CNNs currently achieve impressive performance in image detection task (Krizhevsky et al., 2012 ; Singh et al., 2016 ). Therefore, some methods using CNNs have been explored to measure object size. Wang et al. utilized stereo camera system and deep learning (VGG) method to detect fire region and accurately measure flame height (Wang et al., 2023 ). Zhang et al. proposed a particle detection and size measurement algorithm using deep learning with a CNN (Zhang et al., 2021 ). Park et al. proposed a structural crack detection and quantification method using a deep learning and structured light (Park et al., 2020 ). Zhang et al. proposed a CNN-based algorithm for measuring the size distribution of microfluid droplets (Zhang et al., 2022 ). The aforementioned studies demonstrate that CNN-based image analysis holds great promises for accurately and efficiently detecting and measuring rice grain size. However, none of the above studies are aimed at measuring grain size of rice panicle. There is an urgent need in developing an intelligent system for automatic measurement of rice grain size based on panicle structure. The main objectives of this research were to (a) establish the grain detection model using convolutional neural network, (b) measure pixel sizes per mm under the fixed shooting height using traditional image process technology, (c) develop the grain size measurement method through integrating the grain detection model and pixel value per mm, and (d) evaluate the measurement stability and accuracy of the proposed method. 2. Material and methods The grain detection and size measurement method, dubbed Grain Size Measurement Method (GSM-Method), proposed in this study is shown in Fig. 1 . The improved Faster R-CNN (Ren et al., 2017 ) object detection network and traditional image processing algorithm were used as the main framework to achieve accurate measurement of grain size under the lighting box environment. The main process is as follows. Firstly, the improved Faster R-CNN network was used to recognize and locate the grains on the panicle branch structure. Subsequently, the traditional image processing method was taken to calculate the pixel size per millimeter of the image at the same height. Finally, based on the obtained grain position information, the actual size of grain was calculated using the pixel size per millimeter. 2.1 Materials and dataset 2.1.1 Description of image collecting equipment To automatically measure rice grain size on the panicle branches using deep learning method, a lighting box embedded with an industrial camera and LED lens was used to collect the images of rice panicle branches under a fixed height. The image collecting equipment used in this study is shown in Fig. 2 . Since the details of image collection equipment can be seen in our previously published article (Deng et al., 2022 ), only the image collection steps and the parameter settings during image collection process were described here. The image collection process can be divided into 5 steps. Firstly, the assembly line workbench and lighting box controller were started. Subsequently, the panicle branches were removed from rice panicle and placed on the sample presentation board, which will be placed at the entrance of conveyor belt. When the sample presentation board was transferred to below of industrial camera, it would be lifted to a pre-set height by the linear slider and stopped. Next, the startup software of industrial camera in the computer workstation was enabled to collect the image of rice panicle branch. Finally, the sample presentation board was lowered by the linear slider and then transferred to the outlet by conveyor belt. Among them, the lifting height of lifting mechanism is 330 mm, the residence time of lifting plate is 6 second, the conveying speed of conveyor belt is first gear, and the brightness of digital controller is 186. The finally collected images of rice panicle branches in the lighting box is shown in Fig. 3 . 2.1.2 Image set Rice panicle branch samples were harvested in a paddy field, located at the Institute of Agricultural Sciences in Jiangmen, Guangdong province, China (22° 34' 49.404'' N, 113° 4' 48.036'' E). A total of 478 panicle branch images were collected, including two rice varieties, Qingyang and Huahang 15. These two rice varieties were chosen because of the obvious differences in morphological characteristics of their grains. The grain shape of Huahang 15 is slender (Fig. 3 a), while that of Qingyang is relatively shorter and oval (Fig. 3 b). Among them, the image numbers of Qingyang and Huahang panicle branches were 252 and 226, respectively. Moreover, to test the accuracy of GS-Method, another 30 images of rice panicle branches for Huahang 15 and Qingyang rice varieties were collected for experiment. The resolution of panicle branch images was 2688 pixels × 2000 pixels. 2.2 Grain size measurement method 2.2.1 Image preprocessing The grain detection task based on deep learning relies on labeled data, so it is necessary to label the precise area containing grains in the collected panicle branch images. As shown in Fig. 4 , the LabelImg Open-Source software (Darrenl, 2017 ) was used to label the bounding box around grain, and the labeling format is PASCAL VOC. The PASCAL VOC annotation format consists of four values: the abscissa and ordinate of the upper-left and lower-right corners of bounding box. After the annotation was completed, the coordinates of the upper-left and lower-right corners of bounding box and grain label would be stored in the XML format document. To improve the accuracy of GS-Method for automatically measuring rice grain size, the grains in special cases were not annotated in this study. Special cases include grain in slanted position (Fig. 5 a), grain with narrow side up (Fig. 5 b), and grain that is mostly shaded at one end (Fig. 5 c). When the grain length direction deviates too much from the abscissa direction of the image, the measured grain length will be smaller than the actual value. The grain width with wide side up is the true grain width. So, when the narrow side of grain faces up, the measured grain width will be less than the true value. Also, when most of the area at one end of the grain is shaded too much, the grain length will be smaller than the actual grain length. Finally, the collected 478 images were randomly separated into the training, validation and testing sub-sets with the ratio to the total images of 0.56, 0.24, and 0.2, respectively. 2.2.2 Grain detection with Faster R-CNN The object detection algorithm based on deep learning can be divided into two types: single-stage and multi-stage object detection algorithm according to the generation of candidate frames. The single-stage object detection network represented by YOLO (Joseph Redmon, 2018 ), and SSD (Liu et al., 2016 ), etc. is characterized by fast detection speed, but slightly lower detection accuracy. Faster R-CNN belongs to the representative of multi-stage object detection network, which is characterized by low recognition error rate and low miss recognition rate. In this study, the detection accuracy of grains is required to be high, so it is reasonable to choose Faster R-CNN network model to realize the recognition and location of grains. Since a single grain occupies a small size of the entire image, the grain recognition by Faster R-CNN belongs to small object detection. After multiple pooling of feature extraction, the feature information of grains will be significantly weakened. Therefore, the Feature Pyramid Network (FPN) (Lin et al., 2017 ) was introduced, as shown in Fig. 6 . Through the fusion of multi-layer feature information of feature layers of different scales, FPN provides the possibility for the generation of candidate frames, the classification and regression of detection frames, and thus effectively improves the detection accuracy of the Faster R-CNN model. When there is no overlap between the predicted box and the real box, the value of IoU is 0, resulting in the gradient of optimization loss function being 0, which means that it cannot be optimized. Also, even if the IoU is the same, the predicted bounding box and ground truth bounding box will coincide in different ways, resulting in different detection results. Generalized Intersection over Union (GIoU) (Rezatofighi et al., 2019 ) is optimized for the problem that IoU cannot reflect the distance between two non-overlapping frames and the alignment of overlapping frames, thereby improving the detection accuracy. The grains on the rice panicle branch may overlap, so the GIoU algorithm was introduced to improve the detection accuracy of the grain model. The above two methods were used to optimize the Faster R-CNN network structure and reasoning process. The ResNet 50 was used as the feature extraction network, and the structure of grain detection model was shown in Fig. 7 . 2.3 Calculation of unit pixel size based on traditional image processing 2.3.1 Image acquisition of grain reference object Since the grain actual size was measured based on panicle-branch structure using deep learning, the pixel value of the unit size of grain image at the same height needed to be calculated first. In doing so, a single grain was selected as a reference object, where the actual length and width were manually measured by electronic vernier calipers in advance. The image of the single grain (Fig. 8 a) was captured using the equipment described in Section 2.1.1 . 2.3.2 Measurement of pixel size for grain reference object The process of measuring pixel size of grain reference object using traditional image processing methods was shown in Fig. 9 . The programming language used was Python, and the main algorithms used were Opencv, Numpy, Scipy, and Imutils. The specific measurement process (Fig. 9 ) was as follows. Firstly, the RGB image of grain reference object was read by the program and converted into a grayscale image. The Canny operator was used to perform edge detection on the grayscale image. Then, dilation and erosion were performed to close and refine the contours in the edge map. Subsequently, the coordinate points of the contour were sorted from left to right. The contours were looped individually. If the contour area was large enough, the minimum bounding rectangle of contour was computed, otherwise, the previous step was returned to continue. The coordinate points of the minimum bounding rectangle were computed and sorted in the order of upper left, upper right, lower right and lower left. The minimum bounding rectangle of the contour was draw in the image. The midpoint between the upper-left and upper-right coordinates of the minimum bounding rectangle and the midpoint between the lower-left and lower-right coordinates of the minimum bounding rectangle were calculated. The midpoint between the upper-left and lower-left coordinates of the minimum bounding rectangle and the midpoint between the upper-right and lower-right coordinates of the minimum bounding rectangle were calculated. The midpoints and the lines between midpoints were respectively plotted on the image (Fig. 8 b). Finally, the Euclidean distances between the midpoints were calculated. The calculated pixel size of grain reference object was shown in Fig. 8 b. Figure 8 b showed that the yellow grain was surrounded by a green rectangular frame, which was essentially the minimum bounding rectangle of the grain. Also, the four red points in the figure were the coordinate points of minimum bounding rectangle. The four blue points were the midpoints of the four sides of the minimum bounding rectangle. The Euclidean distance between the purple lines connecting the upper and lower midpoints in Fig. 8 b was the grain width. Similarly, the Euclidean distance between the purple lines connecting the left and right midpoints was the grain length. Therefore, the finally obtained grain length and grain width were 422.6 pixels and 107.0 pixels, respectively. 2.3.3 Measurement of actual size for grain reference object In this study, the digital caliper was used to measure the actual size of grain reference object. The measurement procedure was as follows. The grain length was obtained by clamping the left and right endpoints of grain with digital caliper. Similarly, the grain width was obtained by clamping the middle part of the widest surface of grain with digital caliper. Finally, the actual grain length and grain width were 9.60 mm and 2.43 mm, respectively. Therefore, by combining the grain pixel size measured through traditional image processing method in Section 2.3 , the image unit size under the fixed shooting height of the lighting box can be calculated to be 44.03 pixels/mm. 2.4 Evaluation metrics To verify the performance of GS-Method, the coefficient of determination (R 2 ), the root mean square error (RMSE), the relative RMSE (rRMSE), the Bias (BIAS), and the mean absolute error (MAE) were used to evaluate the consistency between the GS-Method measurement result and the manual measurement standard value. Also, the absolute error and the relative error were used to evaluate the accuracy of GS-Method. The above indicators were calculated using the equations ( 1 )-( 7 ), respectively. $${R^2}=1 - \frac{{\sum\nolimits_{{i=1}}^{n} {{{\left( {{m_i} - {a_i}} \right)}^2}} }}{{\sum\nolimits_{{i=1}}^{n} {{{\left( {{m_i} - \bar {m}} \right)}^2}} }}$$ 1 $$RMSE=\sqrt {\frac{{\sum\nolimits_{{i=1}}^{n} {{{\left( {{a_i} - {m_i}} \right)}^2}} }}{n}}$$ 2 $$rRMSE=\sqrt {\frac{1}{n}\sum\nolimits_{{i=1}}^{n} {{{\left( {\frac{{{m_i} - {a_i}}}{{{m_i}}}} \right)}^2}} }$$ 3 $$BIAS=\frac{1}{n}\sum\nolimits_{{i=1}}^{n} {\left( {{m_i} - {a_i}} \right)}$$ 4 $$MAE=\frac{{\sum\nolimits_{{i=1}}^{n} {\left| {{a_i} - {m_i}} \right|} }}{n}$$ 5 $$V=a - m$$ 6 $$\delta =\frac{V}{m} \times 100\%$$ 7 Where n is the number of the tested sample images, \({a_i}\) and \({m_i}\) are respectively the automatically measurement result and manually measurement result of image i , \(\bar {m}\) is the average value of all manually measurement results for tested sample images, V is absolute error, and \(\delta\) is relative error. 3. Results and discussion 3.1 Training results of GSM-Method The loss function and accuracy curves obtained through GSM-Method were plotted and compared with another existing method: Deng et al.(Deng et al., 2021 ). As the number of epochs increased, the loss function values decreased (Fig. 10 a). The loss function values of GSM-Method were generally lower than that of another method. After approximately 8 epochs in training, the loss function of GSM-Method fluctuated less and less. After 33 epochs, the loss function converged. The accuracy curves showed that GSM-Method had better accuracy consistently over the epoch range of 0 to 225 (Fig. 10 b). Considering all these performance indicators, the GSM-Method was used for grain size measurement in this study. 3.2 Measurement results of GSM-Method The GSM-Method was tested on the RGB images of the testing set. Figure 11 showed some examples of the measured grain size with green detection frame and red number. The green rectangular frame tightly wrapped each grain on the panicle branch image, and the position of the rectangular frame was almost the same as the position of the smallest circumscribed rectangle of the grain. These results demonstrated that the proposed method could almost accurately detect and measure all grains at relative levels on the panicle branch image. Among them, the red number on the long side and short side represented the grain length and grain width, respectively. Due to the differences in the shape of rice varieties, the grain length of Huahang 15 (Fig. 11 a) was mostly larger than that of Qingyang (Fig. 11 b), while the opposite was true for grain width. Typically, measuring grain size using traditional image processing methods requires threshing first, and it is difficult to accurately measure grain size since contacting grains can easily be mistaken for connected area. However, the grain size measured in our proposed method was not affected by inter-grain contact or the connection between grains and panicle branches. The above results showed the feasibility of the proposed method to directly measure the grain size on the rice panicle. Moreover, since grains in special situations (see Section 2.2.1 for details) were not labelled during image preprocessing, the GSM-Method can automatically filter the grains in special situations without measurement. Figure 12 (a) showed that although the shape feature of second grain from left to right was obvious, GSM-Method can still correctly filter the grains in this situation. That was because the grain length direction deviated significantly from the abscissa direction of image, and was not in a relatively horizontal position. A similar situation can also be observed in Fig. 12 b. The above results showed that GSM-Method developed in this paper can intelligently and accurately filter grains under special situations and only measure grain sizes at relatively horizontal positions. 3.3 Measurement accuracy of GSM-Method To verify the accuracy of GSM-Method for measuring grain size on rice panicle branch, another set of panicle branch images were tested. Since grain morphology varies with rice variety, images taken for experiment were Huahang 15 and Qingyang, respectively. The corresponding numbers of images taken were 30, and 30, totaling to 60 images. Among them, the length and width of 122 grains for Huahang 15 were measured, while those of 140 grains for Qingyang were measured. Meanwhile, the corresponding grain length and grain width were manually measured with a digital caliper for comparison (Fig. 13 ). The grain length of Huahang 15 was between 8.0 and 10.5 mm (Fig. 13 a), and the grain width was between 2.0 and 3.0 mm (Fig. 13 b). The grain length of Qingyang was between 7.0 and 8.5 mm (Fig. 13 c), and the grain width was between 2.5 and 3.5 mm (Fig. 13 d). No matter which rice variety it was, the measurement accuracy of grain length was slightly better than that of grain width. The reason for being slightly better can be attributed to the following points. Since the grains on panicle branch structure were all connected to the panicle branches, the wide surface position of grains was restricted by panicle branches and other grains. It was not easy to get the wide surface of each grain on the rice panicle branch pointing straight up. Therefore, the width of some grains in panicle branch image was slightly smaller than the actual value. However, the overall results showed that the measurement accuracy of grain length and grain width was relatively consistent. That was, the above deficiencies had little impact on the measurement accuracy of GSM-Method and can be ignored. Moreover, the root mean square errors of grain length and grain width for Huahang 15 were respectively 0.26 mm and 0.27 mm, while those of Qingyang were respectively 0.30 mm and 0.31 mm, indicating that the measurement effect of GSM-Method on Huahang 15 was better than that of Qingyang. But overall, the measurement error of the GSM-Method was relatively small, which proved that GSM-Method had good stability in measuring grain size. To more intuitively showed the difference in measurement results between GSM-Method and manual method, the average values were also calculated for comparison (Table 1 ). In addition, the average absolute error and average relative error of GSM-Method in measuring rice grain size were calculated. The average grain length of Huahang 15 and Qingyang measured manually were respectively 9.38 mm and 7.79 mm, while that of the two rice varieties measured by GSM-Method were 9.42 mm and 7.85 mm, respectively. The absolute errors of GSM-Method in measuring grain length of Huahang 15 and Qingyang were 0.14 mm and 0.19 mm, while the relative errors were 1.56% and 2.39%. The above results revealed that GSM-Method had smaller measurement errors and high accuracy for measuring the grain length of two rice varieties, Huahang 15 and Qingyang. Table 1 Comparison of measurement results of GSM-Method and manual method for the average rice grain length Rice variety GSM-Method Manual method Absolute error Relative error Huahang 15 9.42 mm 9.38 mm 0.14 mm 1.56% Qingyang 7.85 mm 7.79 mm 0.19 mm 2.39% Similarly, Table 2 indicated that the average grain widths of Huahang 15 and Qingyang measured manually were respectively 2.72 mm and 3.15 mm, while that of the two rice varieties measured by GSM-Method were respectively 2.63 mm and 3.16 mm. The absolute errors of GSM-Method in measuring grain width of Huahang 15 and Qingyang were 0.18 mm and 0.20 mm, while the relative errors were 7.18% and 6.40%. The above results showed that GSM-Method had smaller measurement errors and high accuracy in the grain width of two rice varieties, Huahang 15 and Qingyang. Table 2 Comparison of measurement results of GSM-Method and manual method for the average rice grain width Rice variety GSM-Method Manual method Absolute error Relative error Huahang 15 2.63 mm 2.72 mm 0.18 mm 7.18% Qingyang 3.16 mm 3.15 mm 0.20 mm 6.40% The above results showed that no matter which rice variety it was, the GSM-Method had a slightly smaller error in measuring rice grain length than grain width. Since the structure of rice panicle branch cannot make the wide surface of each grain vertically upward. However, the overall error of GSM-Method was relatively small, which proved the feasibility of GSM-Method. 4. Conclusion In this study, a high-precision and high-efficiency method, dubbed “GSM-Method”, was proposed based on deep learning convolutional neural network (CNN) model and traditional image processing method for automatically measuring rice grain length and grain width. The following conclusion was drawn. The CNN-based GSM-Method was capable of measuring grain length and grain width based on rice panicle branch. When compared to manual measurement results, the root mean square error (RMSE) of the grain length of two rice varieties (Huahang15 and Qingyang) were respectively 0.26 mm and 0.30 mm, while the corresponding RMSE of grain width was 0.27mm and 0.31mm, respectively. The accuracy of the GSM-Method was not affected by inter-grain contact, the connection between grains and panicle branches and rice variety. The GSM-Method shows great promises as a robust tool for computer-aided measurement of rice grain length and grain width, which will help rice breeders collect large amounts of data, and help agricultural researchers predict crop yield potentials. However, more tests may be required to further verify the GSM-Method. Declarations Additional information Confirmation that all experimental protocols have been approved by the designated institution and/or licensing board. Confirm that all methods were performed under relevant guidelines and regulations Author Contribution Conceptualization, R.D. and L.Q.; Methodology, R.D., J.Z. and M.H.; Software, R.D., Validation, R.D., J.Z., N.Y. and X.X.; Formal analysis, R.D. and X.X.; Investigation, R.D. and M.H.; Resources and data curation, R.D. and L.Q.; Writing-original draft preparation, R.D.; Writing review and editing, L.Q.; Visualization and figures, R.D. and N.Y.; Supervision, R.D.; Project administration R.D., and L.Q.; Funding acquisition, R.D. and L.Q. All authors have reviewed and agreed to the published version of the manuscript. Acknowledgements The authors thank their partners, the Institution of Agricultural Sciences of Jiangmen, Guangdong Province for providing the rice panicles for image collections. The research was supported by Guangdong Basic and Applied Basic Research Foundation (Grant No. 2022A1515110468), the program for scientific research start-up funds of Guangdong Ocean University (Grant No. 060302062106), and the Earmarked Fund for Modern Agro-industry Technology Research System (No. CARS-01-43). References Armstrong, B., Aldred, G., Armstrong, T., Blakeney, A., and Lewin, L. (2005). Measuring rice grain dimensions with an image analyser. Quest. 2: 2-35. http://www.regional.org.au/au/cereals/posters/86armstrong.htm Darrenl (2017). labelImg: labelImg is a graphical image annotation tool and label object bounding boxes in images. https://github.com/tzutalin/labelImg Deng, R., Qi, L., Pan, W., Wang, Z., Fu, D., and Yang, X. (2022). Automatic estimation of rice grain number based on a convolutional neural network. Journal of the Optical Society of America A 39(6): 1034-1044. DOI: 10.1364/josaa.459580. Deng, R., Tao, M., Huang, X., Bangura, K., Jiang, Q., Jiang, Y., et al. (2021). Automated Counting Grains on the Rice Panicle Based on Deep Learning Method. Sensors. 21(1): 281. DOI: 10.3390/s21010281. Fan, C., Xing, Y., Mao, H., Lu, T., Han, B., Xu, C., et al. (2006). GS3, a major QTL for grain length and weight and minor QTL for grain width and thickness in rice, encodes a putative transmembrane protein. Theor Appl Genet. 112(6): 1164-1171. DOI: 10.1007/s00122-006-0218-1. Feng, X., Wang, Z., Zeng, Z., Zhou, Y., Lan, Y., Zou, W., et al. (2023). Size measurement and filled/unfilled detection of rice grains using backlight image processing. Frontiers in plant science. 14: 1213486. DOI: 10.3389/fpls.2023.1213486. Gao, K., White, T., Palaniappan, K., Warmund, M., and Bunyak, F. (2017). Museed: A mobile image analysis application for plant seed morphometry. 2017 IEEE International Conference on Image Processing (ICIP) : 2826-2830. Hinton, G. E., and Salakhutdinov, R. R. (2006). Reducing the dimensionality of data with neural networks. Science. 313(5786): 504-507. DOI: 10.1126/science.11276. Hu, Y., and Zhang, Z. (2021). GridFree: a python package of image analysis for interactive grain counting and measuring. Plant Physiol. 186(4): 2239-2252. DOI: 10.1093/plphys/kiab226. Joseph Redmon, A. F. (2018). Yolov3: An incremental improvement. CVPR. 1080: 02767. DOI: arXiv preprint arXiv:.02767. Krizhevsky, A., Sutskever, I., and Hinton, G. E. (2012). Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems. 25. LeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature. 521(7553): 436-444. DOI: 10.1038/nature14539. Li, N., Xu, R., Duan, P., and Li, Y. (2018). Control of grain size in rice. Plant Reprod. 31(3): 237-251. DOI: 10.1007/s00497-018-0333-6. Li, T., Liu, H., Mai, C., Yu, G., Li, H., Meng, L., et al. (2019). Variation in allelic frequencies at loci associated with kernel weight and their effects on kernel weight-related traits in winter wheat. The Crop Journal. 7(1): 30-37. DOI: 10.1016/j.cj.2018.08.002. Lin, T.-Y., Dollár, P., Girshick, R., He, K., Hariharan, B., and Belongie, S. (2017). Feature pyramid networks for object detection. Proceedings of the IEEE conference on computer vision and pattern recognition. 2117-2125. https://openaccess.thecvf.com/content_cvpr_2017/papers/Lin_Feature_Pyramid_Networks_CVPR_2017_paper.pdf Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C.-Y., et al. (2016). Ssd: Single shot multibox detector. Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14, Springer. 21-37. DOI: 10.1007/978-3-319-46448-0_2. Mahale, B., and Korde, S. (2014). Rice quality analysis using image processing techniques. International Conference for Convergence for Technology-2014, IEEE. 1-5. DOI: 10.1109/I2CT.2014.7092300. Murthy, P., and Govindaswamy, S. (1967). Inheritance of grain size and its correlation with the hulling and cooking qualities. Oryza. 4(1): 12-21. Park, S. E., Eem, S.-H., and Jeon, H. (2020). Concrete crack detection and quantification using deep learning and structured light. Construction Building Materials. 252: 119096. DOI: 10.1016/j.conbuildmat.2020.119096. Rasband, W. S. (2011). Imagej, US National Institutes of Health, Bethesda, Maryland, USA. http://imagej.nih.gov/ij/. Ren, S., He, K., Girshick, R., and Sun, J. (2017). Faster R-CNN Towards Real-Time Object Detection with Region Proposal Network. IEEE Transactions on Pattern Analysis and Machine Intelligence. 39(6): 1137-1149. DOI: arXiv:1506.01497v3. Rezatofighi, H., Tsoi, N., Gwak, J., Sadeghian, A., Reid, I., and Savarese, S. (2019). Generalized intersection over union: A metric and a loss for bounding box regression. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 658-666. https://openaccess.thecvf.com/content_CVPR_2019/papers/Rezatofighi_Generalized_Intersection_Over_Union _A_Metric_and_a_Loss_for_CVPR_2019_paper.pdf Santos, M. V., Cuevas, R. P. O., Sreenivasulu, N., and Molina, L. (2019). Measurement of Rice Grain Dimensions and Chalkiness, and Rice Grain Elongation Using Image Analysis. Rice Grain Quality: Methods Protocols. 1892: 99-108. DOI: 10.1007/978-1-4939-8914-0_6. Singh, A., Ganapathysubramanian, B., Singh, A. K., and Sarkar, S. (2016). Machine learning for high-throughput stress phenotyping in plants. Trends in plant science. 21(2): 110-124. DOI: 10.1016/j.tplants.2015.10.015. Singh, U. (2000). Aromatic rices, Int. Rice Res. Inst. Tanabata, T., Shibaya, T., Hori, K., Ebana, K., and Yano, M. (2012). SmartGrain: high-throughput phenotyping software for measuring seed shape through image analysis. Plant Physiol. 160(4): 1871-1880. DOI: 10.1104/pp.112.205120. Wang, Z., Ding, Y., Zhang, T., and Huang, X. (2023). Automatic real-time fire distance, size and power measurement driven by stereo camera and deep learning. Fire Safety Journal. 140: 103891. DOI: 10.1016/j.firesaf.2023.103891. Whan, A. P., Smith, A. B., Cavanagh, C. R., Ral, J.-P. F., Shaw, L. M., Howitt, C. A., et al. (2014). GrainScan: a low cost, fast method for grain size and colour measurements. Plant methods. 10(1): 23. DOI: 10.1186/1746-4811-10-23. Yin, C., Li, H., Li, S., Xu, L., Zhao, Z., and Wang, J. (2015). Genetic dissection on rice grain shape by the two-dimensional image analysis in one japonica x indica population consisting of recombinant inbred lines. Theor Appl Genet. 128(10): 1969-1986. DOI: 10.1007/s00122-015-2560-7. Zhang, H., Li, Z., Sun, J., Fu, Y., Jia, D., and Liu, T. (2021). Characterization of particle size and shape by an IPI system through deep learning. Journal of Quantitative Spectroscopy Radiative Transfer. 268: 107642. DOI: 10.1016/j.jqsrt.2021.107642. Zhang, S., Liang, X., Huang, X., Wang, K., and Qiu, T. (2022). Precise and fast microdroplet size distribution measurement using deep learning. Chemical Engineering Science. 247: 116926. DOI: 10.1016/j.ces.2021.116926. Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-3972552","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":278577190,"identity":"1993f982-786d-4585-a392-58c6956bc681","order_by":0,"name":"Ruoling Deng","email":"","orcid":"","institution":"Guangdong Ocean University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Ruoling","middleName":"","lastName":"Deng","suffix":""},{"id":278577191,"identity":"28eff118-d4a8-4189-94ff-5e7cafe74d95","order_by":1,"name":"Long Qi","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAy0lEQVRIiWNgGAWjYDACZuYGIGkD5bERpYURpCWNFC0MYC2HSdDCd5yx8XHBr/P2/O1nDBg+lB1m4J/dgF+L5GHGZuOZfbcTZ5zJMWCcce4wg8SdA/i1GBxmbJPm7bmdYMCQY8DM23aYwUAigSgt5+wN+N8YMP8lWgvPjwOMGySAtjASowXsF96G5MQZN54VHOw5l84jcYOAFr7zhw8+5vljZ8/fn7zxwY8yazn+GQS0MBwAYsY2BJuHgHqoMoY/hNWNglEwCkbBCAYANqZCXmb1NUoAAAAASUVORK5CYII=","orcid":"","institution":"South China Agricultural University","correspondingAuthor":true,"submittingAuthor":false,"prefix":"","firstName":"Long","middleName":"","lastName":"Qi","suffix":""},{"id":278577192,"identity":"6389fe2a-4545-40db-8925-ce529693d919","order_by":2,"name":"Jing Zhang","email":"","orcid":"","institution":"Guangdong Ocean University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Jing","middleName":"","lastName":"Zhang","suffix":""},{"id":278577193,"identity":"d54fb140-a2bb-478e-bd96-0e8d19c4979a","order_by":3,"name":"Ningxia Yin","email":"","orcid":"","institution":"Guangdong Ocean University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Ningxia","middleName":"","lastName":"Yin","suffix":""},{"id":278577194,"identity":"5c1c88e0-89c4-4312-84ae-536bd1462b87","order_by":4,"name":"Mingxin Hou","email":"","orcid":"","institution":"Guangdong Ocean University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Mingxin","middleName":"","lastName":"Hou","suffix":""},{"id":278577195,"identity":"0403c7b3-f723-4fd9-a7cc-2e0486513607","order_by":5,"name":"Xiaoming Xu","email":"","orcid":"","institution":"Guangdong Ocean University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Xiaoming","middleName":"","lastName":"Xu","suffix":""}],"badges":[],"createdAt":"2024-02-20 10:47:13","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-3972552/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-3972552/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":52622743,"identity":"6d9908b5-1c52-428b-a0ac-5f3e932d034d","added_by":"auto","created_at":"2024-03-13 17:15:50","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":210037,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eIllustration of GSM-Method\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/bf83de7d816b4f404a295754.png"},{"id":52623942,"identity":"ee35826a-3ec1-4487-9e90-e2ff8739a808","added_by":"auto","created_at":"2024-03-13 17:23:50","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":161031,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eIllustration of the equipment for collecting rice panicle branch images\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/f3323c1c0f7a70918a7a56ad.png"},{"id":52622744,"identity":"303653ae-926e-470e-a958-e52b91b627e7","added_by":"auto","created_at":"2024-03-13 17:15:50","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":134934,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSamples of rice panicle branch: (a) Huahang 15 rice variety; Qingyang rice variety.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/e13a682709dbf01c3804b7b0.png"},{"id":52622749,"identity":"4efe4728-669b-430c-a744-eae89df2c365","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":143405,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eGrain annotation using LabelImg software\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/e9f1de965ecce47f74bc7661.png"},{"id":52622748,"identity":"054083d3-5eb6-4ce4-b3c6-953515c08561","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":190743,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eGrains in special circumstances: (1) grain in slanted position; (b) grain with narrow side up; (c) grain that is mostly shaded at one end.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/c1960989f6fb0d508100bac6.png"},{"id":52622747,"identity":"976c00ef-6cfe-413d-aa69-f1c74c1eb950","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":44896,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFPN structure\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/92ec4b80e46878266a7b98cd.png"},{"id":52622745,"identity":"0ac9cf49-e28e-442b-802b-cf13b2889774","added_by":"auto","created_at":"2024-03-13 17:15:50","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":72660,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eStructure of grain detection model\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/3a538827024411e23ec70231.png"},{"id":52623943,"identity":"4725ca3c-bb5c-4e34-97dd-720e855b42a1","added_by":"auto","created_at":"2024-03-13 17:23:51","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":220747,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSingle grain reference object: (a) origin image; (b) pixel size of single grain\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"8.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/058c58e6fc419f35c449ef40.png"},{"id":52622752,"identity":"de5d6bd7-0b0f-4e37-a6d5-fa60f56d1057","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":254669,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFlowchart for calculating pixel size per millimeter for grain reference object\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"9.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/c58ab816ee067e8aa3aaf64f.png"},{"id":52622750,"identity":"fb148fa3-f6ed-4514-b99c-a5c09ca55a44","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":17538,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eComparison of training result between GSM-Method and Deng et al.(Deng et al., 2021)method: (a) loss curve; (b) accuracy curve.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"10.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/af3fce20b0d22f8e6e51cbf1.png"},{"id":52623944,"identity":"4a4b7be4-3a26-4edd-80d6-1bd9eae07a8b","added_by":"auto","created_at":"2024-03-13 17:23:51","extension":"png","order_by":11,"title":"Figure 11","display":"","copyAsset":false,"role":"figure","size":313279,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eMeasurement results of grain size based on GSM-Method: (a) Huahang 15 rice variety; (b) Qingyang rice variety.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"11.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/d27625689f888fd93b643f33.png"},{"id":52622755,"identity":"e0536a3c-7651-42e9-9912-eb008cf588c8","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":12,"title":"Figure 12","display":"","copyAsset":false,"role":"figure","size":192710,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSchematic diagram of automatic filtering of grains in special situations by the model in this chapter\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"12.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/3740fbb0934997e51ce9591f.png"},{"id":52622754,"identity":"3e07baf2-729e-4f2a-a74a-46f3e906cc9d","added_by":"auto","created_at":"2024-03-13 17:15:51","extension":"png","order_by":13,"title":"Figure 13","display":"","copyAsset":false,"role":"figure","size":31773,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eMeasurement accuracy of GSM-Method: (a) grain length of Huahang 15; (b) grain width of Huahang 15; (c) grain length of Qingyang; (d) grain width of Qingyang.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"13.png","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/b00e79e4a35dce20b6570711.png"},{"id":59646137,"identity":"c627e36f-7430-43eb-bab2-6d7f0af83824","added_by":"auto","created_at":"2024-07-04 08:52:31","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":2454528,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-3972552/v1/c5c36f94-552b-481d-90a3-b66c8cb9a548.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Non-destructive measurement of rice grain size based on panicle structure using deep learning method","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eGrain size is one of the main components for rice yield, as well as being a key agronomic trait for rice breeding (Singh, \u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e2000\u003c/span\u003e; Li et al., \u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e2018\u003c/span\u003e). Grain size is also a very important trait in determining rice quality (Armstrong et al., \u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e2005\u003c/span\u003e; Fan et al., \u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e2006\u003c/span\u003e). Also, grain size is mainly under the polygenic control of grain length and grain width (Murthy and Govindaswamy, \u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e1967\u003c/span\u003e). Therefore, the information on grain length and grain width is of great significance (Mahale and Korde, \u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e2014\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eThe traditional method of measuring grain size mainly relies on manual labor, such as using calipers or micrometers (Santos et al., \u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e2019\u003c/span\u003e), but this method is time-consuming, labor-intensive, error-prone, and low in accuracy (Yin et al., \u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e2015\u003c/span\u003e; Li et al., \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e2019\u003c/span\u003e; Hu and Zhang, \u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Therefore, it is imperative to develop a novel method for efficient and precise measurement of grain length and grain width.\u003c/p\u003e \u003cp\u003eExisting researches on seed size measurement based on traditional image processing methods have made great progress, for example, the ImageJ (Rasband, \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2011\u003c/span\u003e), SmartGrain (Tanabata et al., \u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e2012\u003c/span\u003e), GrainScan (Whan et al., \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e2014\u003c/span\u003e), Museed (Gao et al., \u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e2017\u003c/span\u003e), and GridFree (Hu and Zhang, \u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Moreover, researchers (Feng et al., \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2023\u003c/span\u003e) used blacklight image processing technology for rice grain size measurement and filled/unfilled grain detection. Although these methods have been developed for seed/grain size measurement with reasonable accuracies, they need to be threshed before measurement. Also, seeds will be damaged during threshing process, thereby reducing the measurement accuracy. Direct measuring grain size on the panicle branch before threshing can avoid those deficiencies. However, little research has been done in this regard.\u003c/p\u003e \u003cp\u003eAdvances in computing power and the availability of large amounts of labeled images have promoted convolutional neural network (CNN)-based machine learning methods in the field of computer vision (Hinton and Salakhutdinov, \u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e2006\u003c/span\u003e; LeCun et al., \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2015\u003c/span\u003e). CNNs currently achieve impressive performance in image detection task (Krizhevsky et al., \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2012\u003c/span\u003e; Singh et al., \u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e2016\u003c/span\u003e). Therefore, some methods using CNNs have been explored to measure object size. Wang et al. utilized stereo camera system and deep learning (VGG) method to detect fire region and accurately measure flame height (Wang et al., \u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Zhang et al. proposed a particle detection and size measurement algorithm using deep learning with a CNN (Zhang et al., \u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Park et al. proposed a structural crack detection and quantification method using a deep learning and structured light (Park et al., \u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e2020\u003c/span\u003e). Zhang et al. proposed a CNN-based algorithm for measuring the size distribution of microfluid droplets (Zhang et al., \u003cspan citationid=\"CR31\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). The aforementioned studies demonstrate that CNN-based image analysis holds great promises for accurately and efficiently detecting and measuring rice grain size. However, none of the above studies are aimed at measuring grain size of rice panicle. There is an urgent need in developing an intelligent system for automatic measurement of rice grain size based on panicle structure.\u003c/p\u003e \u003cp\u003eThe main objectives of this research were to (a) establish the grain detection model using convolutional neural network, (b) measure pixel sizes per mm under the fixed shooting height using traditional image process technology, (c) develop the grain size measurement method through integrating the grain detection model and pixel value per mm, and (d) evaluate the measurement stability and accuracy of the proposed method.\u003c/p\u003e"},{"header":"2. Material and methods","content":"\u003cp\u003eThe grain detection and size measurement method, dubbed Grain Size Measurement Method (GSM-Method), proposed in this study is shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e. The improved Faster R-CNN (Ren et al., \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2017\u003c/span\u003e) object detection network and traditional image processing algorithm were used as the main framework to achieve accurate measurement of grain size under the lighting box environment. The main process is as follows. Firstly, the improved Faster R-CNN network was used to recognize and locate the grains on the panicle branch structure. Subsequently, the traditional image processing method was taken to calculate the pixel size per millimeter of the image at the same height. Finally, based on the obtained grain position information, the actual size of grain was calculated using the pixel size per millimeter.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003e2.1 Materials and dataset\u003c/h2\u003e \u003cdiv id=\"Sec4\" class=\"Section3\"\u003e \u003ch2\u003e2.1.1 Description of image collecting equipment\u003c/h2\u003e \u003cp\u003eTo automatically measure rice grain size on the panicle branches using deep learning method, a lighting box embedded with an industrial camera and LED lens was used to collect the images of rice panicle branches under a fixed height. The image collecting equipment used in this study is shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e. Since the details of image collection equipment can be seen in our previously published article (Deng et al., \u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e2022\u003c/span\u003e), only the image collection steps and the parameter settings during image collection process were described here. The image collection process can be divided into 5 steps. Firstly, the assembly line workbench and lighting box controller were started. Subsequently, the panicle branches were removed from rice panicle and placed on the sample presentation board, which will be placed at the entrance of conveyor belt. When the sample presentation board was transferred to below of industrial camera, it would be lifted to a pre-set height by the linear slider and stopped. Next, the startup software of industrial camera in the computer workstation was enabled to collect the image of rice panicle branch. Finally, the sample presentation board was lowered by the linear slider and then transferred to the outlet by conveyor belt. Among them, the lifting height of lifting mechanism is 330 mm, the residence time of lifting plate is 6 second, the conveying speed of conveyor belt is first gear, and the brightness of digital controller is 186. The finally collected images of rice panicle branches in the lighting box is shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section3\"\u003e \u003ch2\u003e2.1.2 Image set\u003c/h2\u003e \u003cp\u003eRice panicle branch samples were harvested in a paddy field, located at the Institute of Agricultural Sciences in Jiangmen, Guangdong province, China (22\u0026deg; 34' 49.404'' N, 113\u0026deg; 4' 48.036'' E). A total of 478 panicle branch images were collected, including two rice varieties, Qingyang and Huahang 15. These two rice varieties were chosen because of the obvious differences in morphological characteristics of their grains. The grain shape of Huahang 15 is slender (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003ea), while that of Qingyang is relatively shorter and oval (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003eb). Among them, the image numbers of Qingyang and Huahang panicle branches were 252 and 226, respectively. Moreover, to test the accuracy of GS-Method, another 30 images of rice panicle branches for Huahang 15 and Qingyang rice varieties were collected for experiment. The resolution of panicle branch images was 2688 pixels \u0026times; 2000 pixels.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e2.2 Grain size measurement method\u003c/h2\u003e \u003cdiv id=\"Sec7\" class=\"Section3\"\u003e \u003ch2\u003e2.2.1 Image preprocessing\u003c/h2\u003e \u003cp\u003eThe grain detection task based on deep learning relies on labeled data, so it is necessary to label the precise area containing grains in the collected panicle branch images. As shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e, the LabelImg Open-Source software (Darrenl, \u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2017\u003c/span\u003e) was used to label the bounding box around grain, and the labeling format is PASCAL VOC. The PASCAL VOC annotation format consists of four values: the abscissa and ordinate of the upper-left and lower-right corners of bounding box. After the annotation was completed, the coordinates of the upper-left and lower-right corners of bounding box and grain label would be stored in the XML format document.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eTo improve the accuracy of GS-Method for automatically measuring rice grain size, the grains in special cases were not annotated in this study. Special cases include grain in slanted position (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003ea), grain with narrow side up (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003eb), and grain that is mostly shaded at one end (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003ec). When the grain length direction deviates too much from the abscissa direction of the image, the measured grain length will be smaller than the actual value. The grain width with wide side up is the true grain width. So, when the narrow side of grain faces up, the measured grain width will be less than the true value. Also, when most of the area at one end of the grain is shaded too much, the grain length will be smaller than the actual grain length. Finally, the collected 478 images were randomly separated into the training, validation and testing sub-sets with the ratio to the total images of 0.56, 0.24, and 0.2, respectively.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section3\"\u003e \u003ch2\u003e2.2.2 Grain detection with Faster R-CNN\u003c/h2\u003e \u003cp\u003eThe object detection algorithm based on deep learning can be divided into two types: single-stage and multi-stage object detection algorithm according to the generation of candidate frames. The single-stage object detection network represented by YOLO (Joseph Redmon, \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e2018\u003c/span\u003e), and SSD (Liu et al., \u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e2016\u003c/span\u003e), etc. is characterized by fast detection speed, but slightly lower detection accuracy. Faster R-CNN belongs to the representative of multi-stage object detection network, which is characterized by low recognition error rate and low miss recognition rate. In this study, the detection accuracy of grains is required to be high, so it is reasonable to choose Faster R-CNN network model to realize the recognition and location of grains.\u003c/p\u003e \u003cp\u003eSince a single grain occupies a small size of the entire image, the grain recognition by Faster R-CNN belongs to small object detection. After multiple pooling of feature extraction, the feature information of grains will be significantly weakened. Therefore, the Feature Pyramid Network (FPN) (Lin et al., \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e2017\u003c/span\u003e) was introduced, as shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e. Through the fusion of multi-layer feature information of feature layers of different scales, FPN provides the possibility for the generation of candidate frames, the classification and regression of detection frames, and thus effectively improves the detection accuracy of the Faster R-CNN model.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eWhen there is no overlap between the predicted box and the real box, the value of IoU is 0, resulting in the gradient of optimization loss function being 0, which means that it cannot be optimized. Also, even if the IoU is the same, the predicted bounding box and ground truth bounding box will coincide in different ways, resulting in different detection results. Generalized Intersection over Union (GIoU) (Rezatofighi et al., \u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e2019\u003c/span\u003e) is optimized for the problem that IoU cannot reflect the distance between two non-overlapping frames and the alignment of overlapping frames, thereby improving the detection accuracy. The grains on the rice panicle branch may overlap, so the GIoU algorithm was introduced to improve the detection accuracy of the grain model.\u003c/p\u003e \u003cp\u003eThe above two methods were used to optimize the Faster R-CNN network structure and reasoning process. The ResNet 50 was used as the feature extraction network, and the structure of grain detection model was shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003c/div\u003e \u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003e2.3 Calculation of unit pixel size based on traditional image processing\u003c/h2\u003e \u003cdiv id=\"Sec10\" class=\"Section3\"\u003e \u003ch2\u003e2.3.1 Image acquisition of grain reference object\u003c/h2\u003e \u003cp\u003eSince the grain actual size was measured based on panicle-branch structure using deep learning, the pixel value of the unit size of grain image at the same height needed to be calculated first. In doing so, a single grain was selected as a reference object, where the actual length and width were manually measured by electronic vernier calipers in advance. The image of the single grain (Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003ea) was captured using the equipment described in Section \u003cspan refid=\"Sec4\" class=\"InternalRef\"\u003e2.1.1\u003c/span\u003e.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec11\" class=\"Section3\"\u003e \u003ch2\u003e2.3.2 Measurement of pixel size for grain reference object\u003c/h2\u003e \u003cp\u003eThe process of measuring pixel size of grain reference object using traditional image processing methods was shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e. The programming language used was Python, and the main algorithms used were Opencv, Numpy, Scipy, and Imutils. The specific measurement process (Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e) was as follows. Firstly, the RGB image of grain reference object was read by the program and converted into a grayscale image. The Canny operator was used to perform edge detection on the grayscale image. Then, dilation and erosion were performed to close and refine the contours in the edge map. Subsequently, the coordinate points of the contour were sorted from left to right. The contours were looped individually. If the contour area was large enough, the minimum bounding rectangle of contour was computed, otherwise, the previous step was returned to continue. The coordinate points of the minimum bounding rectangle were computed and sorted in the order of upper left, upper right, lower right and lower left. The minimum bounding rectangle of the contour was draw in the image. The midpoint between the upper-left and upper-right coordinates of the minimum bounding rectangle and the midpoint between the lower-left and lower-right coordinates of the minimum bounding rectangle were calculated. The midpoint between the upper-left and lower-left coordinates of the minimum bounding rectangle and the midpoint between the upper-right and lower-right coordinates of the minimum bounding rectangle were calculated. The midpoints and the lines between midpoints were respectively plotted on the image (Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003eb). Finally, the Euclidean distances between the midpoints were calculated.\u003c/p\u003e \u003cp\u003eThe calculated pixel size of grain reference object was shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003eb. Figure\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003eb showed that the yellow grain was surrounded by a green rectangular frame, which was essentially the minimum bounding rectangle of the grain. Also, the four red points in the figure were the coordinate points of minimum bounding rectangle. The four blue points were the midpoints of the four sides of the minimum bounding rectangle. The Euclidean distance between the purple lines connecting the upper and lower midpoints in Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003eb was the grain width. Similarly, the Euclidean distance between the purple lines connecting the left and right midpoints was the grain length. Therefore, the finally obtained grain length and grain width were 422.6 pixels and 107.0 pixels, respectively.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec12\" class=\"Section3\"\u003e \u003ch2\u003e2.3.3 Measurement of actual size for grain reference object\u003c/h2\u003e \u003cp\u003eIn this study, the digital caliper was used to measure the actual size of grain reference object. The measurement procedure was as follows. The grain length was obtained by clamping the left and right endpoints of grain with digital caliper. Similarly, the grain width was obtained by clamping the middle part of the widest surface of grain with digital caliper. Finally, the actual grain length and grain width were 9.60 mm and 2.43 mm, respectively. Therefore, by combining the grain pixel size measured through traditional image processing method in Section \u003cspan refid=\"Sec9\" class=\"InternalRef\"\u003e2.3\u003c/span\u003e, the image unit size under the fixed shooting height of the lighting box can be calculated to be 44.03 pixels/mm.\u003c/p\u003e \u003c/div\u003e \u003c/div\u003e \u003cdiv id=\"Sec13\" class=\"Section2\"\u003e \u003ch2\u003e2.4 Evaluation metrics\u003c/h2\u003e \u003cp\u003eTo verify the performance of GS-Method, the coefficient of determination (R\u003csup\u003e2\u003c/sup\u003e), the root mean square error (RMSE), the relative RMSE (rRMSE), the Bias (BIAS), and the mean absolute error (MAE) were used to evaluate the consistency between the GS-Method measurement result and the manual measurement standard value. Also, the absolute error and the relative error were used to evaluate the accuracy of GS-Method. The above indicators were calculated using the equations (\u003cspan refid=\"Equ1\" class=\"InternalRef\"\u003e1\u003c/span\u003e)-(\u003cspan refid=\"Equ7\" class=\"InternalRef\"\u003e7\u003c/span\u003e), respectively.\u003cdiv id=\"Equ1\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ1\" name=\"EquationSource\"\u003e\n$${R^2}=1 - \\frac{{\\sum\\nolimits_{{i=1}}^{n} {{{\\left( {{m_i} - {a_i}} \\right)}^2}} }}{{\\sum\\nolimits_{{i=1}}^{n} {{{\\left( {{m_i} - \\bar {m}} \\right)}^2}} }}$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e1\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ2\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ2\" name=\"EquationSource\"\u003e\n$$RMSE=\\sqrt {\\frac{{\\sum\\nolimits_{{i=1}}^{n} {{{\\left( {{a_i} - {m_i}} \\right)}^2}} }}{n}}$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e2\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ3\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ3\" name=\"EquationSource\"\u003e\n$$rRMSE=\\sqrt {\\frac{1}{n}\\sum\\nolimits_{{i=1}}^{n} {{{\\left( {\\frac{{{m_i} - {a_i}}}{{{m_i}}}} \\right)}^2}} }$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e3\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ4\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ4\" name=\"EquationSource\"\u003e\n$$BIAS=\\frac{1}{n}\\sum\\nolimits_{{i=1}}^{n} {\\left( {{m_i} - {a_i}} \\right)}$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e4\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ5\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ5\" name=\"EquationSource\"\u003e\n$$MAE=\\frac{{\\sum\\nolimits_{{i=1}}^{n} {\\left| {{a_i} - {m_i}} \\right|} }}{n}$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e5\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ6\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ6\" name=\"EquationSource\"\u003e\n$$V=a - m$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e6\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Equ7\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ7\" name=\"EquationSource\"\u003e\n$$\\delta =\\frac{V}{m} \\times 100\\%$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e7\u003c/div\u003e\u003c/div\u003e\u003c/p\u003e \u003cp\u003eWhere \u003cem\u003en\u003c/em\u003e is the number of the tested sample images, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\({a_i}\\)\u003c/span\u003e\u003c/span\u003e and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\({m_i}\\)\u003c/span\u003e\u003c/span\u003e are respectively the automatically measurement result and manually measurement result of image \u003cem\u003ei\u003c/em\u003e, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\bar {m}\\)\u003c/span\u003e\u003c/span\u003e is the average value of all manually measurement results for tested sample images, V is absolute error, and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\delta\\)\u003c/span\u003e\u003c/span\u003e is relative error.\u003c/p\u003e \u003c/div\u003e"},{"header":"3. Results and discussion","content":"\u003cdiv id=\"Sec15\" class=\"Section2\"\u003e \u003ch2\u003e3.1 Training results of GSM-Method\u003c/h2\u003e \u003cp\u003eThe loss function and accuracy curves obtained through GSM-Method were plotted and compared with another existing method: Deng et al.(Deng et al., \u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). As the number of epochs increased, the loss function values decreased (Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003ea). The loss function values of GSM-Method were generally lower than that of another method. After approximately 8 epochs in training, the loss function of GSM-Method fluctuated less and less. After 33 epochs, the loss function converged. The accuracy curves showed that GSM-Method had better accuracy consistently over the epoch range of 0 to 225 (Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003eb). Considering all these performance indicators, the GSM-Method was used for grain size measurement in this study.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec16\" class=\"Section2\"\u003e \u003ch2\u003e3.2 Measurement results of GSM-Method\u003c/h2\u003e \u003cp\u003eThe GSM-Method was tested on the RGB images of the testing set. Figure\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003e showed some examples of the measured grain size with green detection frame and red number. The green rectangular frame tightly wrapped each grain on the panicle branch image, and the position of the rectangular frame was almost the same as the position of the smallest circumscribed rectangle of the grain. These results demonstrated that the proposed method could almost accurately detect and measure all grains at relative levels on the panicle branch image. Among them, the red number on the long side and short side represented the grain length and grain width, respectively. Due to the differences in the shape of rice varieties, the grain length of Huahang 15 (Fig.\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003ea) was mostly larger than that of Qingyang (Fig.\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003eb), while the opposite was true for grain width. Typically, measuring grain size using traditional image processing methods requires threshing first, and it is difficult to accurately measure grain size since contacting grains can easily be mistaken for connected area. However, the grain size measured in our proposed method was not affected by inter-grain contact or the connection between grains and panicle branches. The above results showed the feasibility of the proposed method to directly measure the grain size on the rice panicle.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eMoreover, since grains in special situations (see Section \u003cspan refid=\"Sec7\" class=\"InternalRef\"\u003e2.2.1\u003c/span\u003e for details) were not labelled during image preprocessing, the GSM-Method can automatically filter the grains in special situations without measurement. Figure\u0026nbsp;\u003cspan refid=\"Fig12\" class=\"InternalRef\"\u003e12\u003c/span\u003e(a) showed that although the shape feature of second grain from left to right was obvious, GSM-Method can still correctly filter the grains in this situation. That was because the grain length direction deviated significantly from the abscissa direction of image, and was not in a relatively horizontal position. A similar situation can also be observed in Fig.\u0026nbsp;\u003cspan refid=\"Fig12\" class=\"InternalRef\"\u003e12\u003c/span\u003eb. The above results showed that GSM-Method developed in this paper can intelligently and accurately filter grains under special situations and only measure grain sizes at relatively horizontal positions.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec17\" class=\"Section2\"\u003e \u003ch2\u003e3.3 Measurement accuracy of GSM-Method\u003c/h2\u003e \u003cp\u003eTo verify the accuracy of GSM-Method for measuring grain size on rice panicle branch, another set of panicle branch images were tested. Since grain morphology varies with rice variety, images taken for experiment were Huahang 15 and Qingyang, respectively. The corresponding numbers of images taken were 30, and 30, totaling to 60 images. Among them, the length and width of 122 grains for Huahang 15 were measured, while those of 140 grains for Qingyang were measured. Meanwhile, the corresponding grain length and grain width were manually measured with a digital caliper for comparison (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003e). The grain length of Huahang 15 was between 8.0 and 10.5 mm (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003ea), and the grain width was between 2.0 and 3.0 mm (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003eb). The grain length of Qingyang was between 7.0 and 8.5 mm (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003ec), and the grain width was between 2.5 and 3.5 mm (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003ed).\u003c/p\u003e \u003cp\u003eNo matter which rice variety it was, the measurement accuracy of grain length was slightly better than that of grain width. The reason for being slightly better can be attributed to the following points. Since the grains on panicle branch structure were all connected to the panicle branches, the wide surface position of grains was restricted by panicle branches and other grains. It was not easy to get the wide surface of each grain on the rice panicle branch pointing straight up. Therefore, the width of some grains in panicle branch image was slightly smaller than the actual value. However, the overall results showed that the measurement accuracy of grain length and grain width was relatively consistent. That was, the above deficiencies had little impact on the measurement accuracy of GSM-Method and can be ignored. Moreover, the root mean square errors of grain length and grain width for Huahang 15 were respectively 0.26 mm and 0.27 mm, while those of Qingyang were respectively 0.30 mm and 0.31 mm, indicating that the measurement effect of GSM-Method on Huahang 15 was better than that of Qingyang. But overall, the measurement error of the GSM-Method was relatively small, which proved that GSM-Method had good stability in measuring grain size.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eTo more intuitively showed the difference in measurement results between GSM-Method and manual method, the average values were also calculated for comparison (Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). In addition, the average absolute error and average relative error of GSM-Method in measuring rice grain size were calculated. The average grain length of Huahang 15 and Qingyang measured manually were respectively 9.38 mm and 7.79 mm, while that of the two rice varieties measured by GSM-Method were 9.42 mm and 7.85 mm, respectively. The absolute errors of GSM-Method in measuring grain length of Huahang 15 and Qingyang were 0.14 mm and 0.19 mm, while the relative errors were 1.56% and 2.39%. The above results revealed that GSM-Method had smaller measurement errors and high accuracy for measuring the grain length of two rice varieties, Huahang 15 and Qingyang.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eComparison of measurement results of GSM-Method and manual method for the average rice grain length\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"5\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eRice variety\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eGSM-Method\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eManual method\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAbsolute error\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eRelative error\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHuahang 15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e9.42 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e9.38 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.14 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e1.56%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eQingyang\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e7.85 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e7.79 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.19 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e2.39%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003eSimilarly, Table \u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e indicated that the average grain widths of Huahang 15 and Qingyang measured manually were respectively 2.72 mm and 3.15 mm, while that of the two rice varieties measured by GSM-Method were respectively 2.63 mm and 3.16 mm. The absolute errors of GSM-Method in measuring grain width of Huahang 15 and Qingyang were 0.18 mm and 0.20 mm, while the relative errors were 7.18% and 6.40%. The above results showed that GSM-Method had smaller measurement errors and high accuracy in the grain width of two rice varieties, Huahang 15 and Qingyang.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eComparison of measurement results of GSM-Method and manual method for the average rice grain width\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"5\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eRice variety\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eGSM-Method\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eManual method\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAbsolute error\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eRelative error\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHuahang 15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e2.63 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e2.72 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.18 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e7.18%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eQingyang\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e3.16 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e3.15 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.20 mm\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e6.40%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003eThe above results showed that no matter which rice variety it was, the GSM-Method had a slightly smaller error in measuring rice grain length than grain width. Since the structure of rice panicle branch cannot make the wide surface of each grain vertically upward. However, the overall error of GSM-Method was relatively small, which proved the feasibility of GSM-Method.\u003c/p\u003e \u003c/div\u003e"},{"header":"4. Conclusion","content":"\u003cp\u003eIn this study, a high-precision and high-efficiency method, dubbed \u0026ldquo;GSM-Method\u0026rdquo;, was proposed based on deep learning convolutional neural network (CNN) model and traditional image processing method for automatically measuring rice grain length and grain width. The following conclusion was drawn. The CNN-based GSM-Method was capable of measuring grain length and grain width based on rice panicle branch. When compared to manual measurement results, the root mean square error (RMSE) of the grain length of two rice varieties (Huahang15 and Qingyang) were respectively 0.26 mm and 0.30 mm, while the corresponding RMSE of grain width was 0.27mm and 0.31mm, respectively. The accuracy of the GSM-Method was not affected by inter-grain contact, the connection between grains and panicle branches and rice variety. The GSM-Method shows great promises as a robust tool for computer-aided measurement of rice grain length and grain width, which will help rice breeders collect large amounts of data, and help agricultural researchers predict crop yield potentials. However, more tests may be required to further verify the GSM-Method.\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch2\u003eAdditional information\u003c/h2\u003e \u003cp\u003eConfirmation that all experimental protocols have been approved by the designated institution and/or licensing board. Confirm that all methods were performed under relevant guidelines and regulations\u003c/p\u003e\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eConceptualization, R.D. and L.Q.; Methodology, R.D., J.Z. and M.H.; Software, R.D., Validation, R.D., J.Z., N.Y. and X.X.; Formal analysis, R.D. and X.X.; Investigation, R.D. and M.H.; Resources and data curation, R.D. and L.Q.; Writing-original draft preparation, R.D.; Writing review and editing, L.Q.; Visualization and figures, R.D. and N.Y.; Supervision, R.D.; Project administration R.D., and L.Q.; Funding acquisition, R.D. and L.Q. All authors have reviewed and agreed to the published version of the manuscript.\u003c/p\u003e\u003ch2\u003eAcknowledgements\u003c/h2\u003e \u003cp\u003eThe authors thank their partners, the Institution of Agricultural Sciences of Jiangmen, Guangdong Province for providing the rice panicles for image collections. The research was supported by Guangdong Basic and Applied Basic Research Foundation (Grant No. 2022A1515110468), the program for scientific research start-up funds of Guangdong Ocean University (Grant No. 060302062106), and the Earmarked Fund for Modern Agro-industry Technology Research System (No. CARS-01-43).\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eArmstrong, B., Aldred, G., Armstrong, T., Blakeney, A., and Lewin, L. (2005). Measuring rice grain dimensions with an image analyser. Quest. 2: 2-35. http://www.regional.org.au/au/cereals/posters/86armstrong.htm\u003c/li\u003e\n\u003cli\u003eDarrenl (2017). labelImg: labelImg is a graphical image annotation tool and label object bounding boxes in images. https://github.com/tzutalin/labelImg\u003c/li\u003e\n\u003cli\u003eDeng, R., Qi, L., Pan, W., Wang, Z., Fu, D., and Yang, X. (2022). Automatic estimation of rice grain number based on a convolutional neural network. Journal of the Optical Society of America A 39(6): 1034-1044. DOI: 10.1364/josaa.459580.\u003c/li\u003e\n\u003cli\u003eDeng, R., Tao, M., Huang, X., Bangura, K., Jiang, Q., Jiang, Y., et al. (2021). Automated Counting Grains on the Rice Panicle Based on Deep Learning Method. Sensors. 21(1): 281. DOI: 10.3390/s21010281.\u003c/li\u003e\n\u003cli\u003eFan, C., Xing, Y., Mao, H., Lu, T., Han, B., Xu, C., et al. (2006). GS3, a major QTL for grain length and weight and minor QTL for grain width and thickness in rice, encodes a putative transmembrane protein. Theor Appl Genet. 112(6): 1164-1171. DOI: 10.1007/s00122-006-0218-1.\u003c/li\u003e\n\u003cli\u003eFeng, X., Wang, Z., Zeng, Z., Zhou, Y., Lan, Y., Zou, W., et al. (2023). Size measurement and filled/unfilled detection of rice grains using backlight image processing. Frontiers in plant science. 14: 1213486. DOI: 10.3389/fpls.2023.1213486.\u003c/li\u003e\n\u003cli\u003eGao, K., White, T., Palaniappan, K., Warmund, M., and Bunyak, F. (2017). Museed: A mobile image analysis application for plant seed morphometry. 2017 IEEE International Conference on Image Processing (ICIP)\u003cstrong\u003e: \u003c/strong\u003e2826-2830.\u003c/li\u003e\n\u003cli\u003eHinton, G. E., and Salakhutdinov, R. R. (2006). Reducing the dimensionality of data with neural networks. Science. 313(5786): 504-507. DOI: 10.1126/science.11276.\u003c/li\u003e\n\u003cli\u003eHu, Y., and Zhang, Z. (2021). GridFree: a python package of image analysis for interactive grain counting and measuring. Plant Physiol. 186(4): 2239-2252. DOI: 10.1093/plphys/kiab226.\u003c/li\u003e\n\u003cli\u003eJoseph Redmon, A. F. (2018). Yolov3: An incremental improvement. CVPR. 1080: 02767. DOI: arXiv preprint arXiv:.02767.\u003c/li\u003e\n\u003cli\u003eKrizhevsky, A., Sutskever, I., and Hinton, G. E. (2012). Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems. 25.\u003c/li\u003e\n\u003cli\u003eLeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature. 521(7553): 436-444. DOI: 10.1038/nature14539.\u003c/li\u003e\n\u003cli\u003eLi, N., Xu, R., Duan, P., and Li, Y. (2018). Control of grain size in rice. Plant Reprod. 31(3): 237-251. DOI: 10.1007/s00497-018-0333-6.\u003c/li\u003e\n\u003cli\u003eLi, T., Liu, H., Mai, C., Yu, G., Li, H., Meng, L., et al. (2019). Variation in allelic frequencies at loci associated with kernel weight and their effects on kernel weight-related traits in winter wheat. The Crop Journal. 7(1): 30-37. DOI: 10.1016/j.cj.2018.08.002.\u003c/li\u003e\n\u003cli\u003eLin, T.-Y., Doll\u0026aacute;r, P., Girshick, R., He, K., Hariharan, B., and Belongie, S. (2017). Feature pyramid networks for object detection. Proceedings of the IEEE conference on computer vision and pattern recognition. 2117-2125. https://openaccess.thecvf.com/content_cvpr_2017/papers/Lin_Feature_Pyramid_Networks_CVPR_2017_paper.pdf\u003c/li\u003e\n\u003cli\u003eLiu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C.-Y., et al. (2016). Ssd: Single shot multibox detector. Computer Vision\u0026ndash;ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11\u0026ndash;14, 2016, Proceedings, Part I 14, Springer. 21-37. DOI: 10.1007/978-3-319-46448-0_2.\u003c/li\u003e\n\u003cli\u003eMahale, B., and Korde, S. (2014). Rice quality analysis using image processing techniques. International Conference for Convergence for Technology-2014, IEEE. 1-5. DOI: 10.1109/I2CT.2014.7092300.\u003c/li\u003e\n\u003cli\u003eMurthy, P., and Govindaswamy, S. (1967). Inheritance of grain size and its correlation with the hulling and cooking qualities. Oryza. 4(1): 12-21.\u003c/li\u003e\n\u003cli\u003ePark, S. E., Eem, S.-H., and Jeon, H. (2020). Concrete crack detection and quantification using deep learning and structured light. Construction Building Materials. 252: 119096. DOI: 10.1016/j.conbuildmat.2020.119096.\u003c/li\u003e\n\u003cli\u003eRasband, W. S. (2011). Imagej, US National Institutes of Health, Bethesda, Maryland, USA. http://imagej.nih.gov/ij/.\u003c/li\u003e\n\u003cli\u003eRen, S., He, K., Girshick, R., and Sun, J. (2017). Faster R-CNN Towards Real-Time Object Detection with Region Proposal Network. IEEE Transactions on Pattern Analysis and Machine Intelligence. 39(6): 1137-1149. DOI: arXiv:1506.01497v3.\u003c/li\u003e\n\u003cli\u003eRezatofighi, H., Tsoi, N., Gwak, J., Sadeghian, A., Reid, I., and Savarese, S. (2019). Generalized intersection over union: A metric and a loss for bounding box regression. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 658-666. https://openaccess.thecvf.com/content_CVPR_2019/papers/Rezatofighi_Generalized_Intersection_Over_Union\u003cbr\u003e_A_Metric_and_a_Loss_for_CVPR_2019_paper.pdf\u003c/li\u003e\n\u003cli\u003eSantos, M. V., Cuevas, R. P. O., Sreenivasulu, N., and Molina, L. (2019). Measurement of Rice Grain Dimensions and Chalkiness, and Rice Grain Elongation Using Image Analysis. Rice Grain Quality: Methods Protocols. 1892: 99-108. DOI: 10.1007/978-1-4939-8914-0_6.\u003c/li\u003e\n\u003cli\u003eSingh, A., Ganapathysubramanian, B., Singh, A. K., and Sarkar, S. (2016). Machine learning for high-throughput stress phenotyping in plants. Trends in plant science. 21(2): 110-124. DOI: 10.1016/j.tplants.2015.10.015.\u003c/li\u003e\n\u003cli\u003eSingh, U. (2000). Aromatic rices, Int. Rice Res. Inst.\u003c/li\u003e\n\u003cli\u003eTanabata, T., Shibaya, T., Hori, K., Ebana, K., and Yano, M. (2012). SmartGrain: high-throughput phenotyping software for measuring seed shape through image analysis. Plant Physiol. 160(4): 1871-1880. DOI: 10.1104/pp.112.205120.\u003c/li\u003e\n\u003cli\u003eWang, Z., Ding, Y., Zhang, T., and Huang, X. (2023). Automatic real-time fire distance, size and power measurement driven by stereo camera and deep learning. Fire Safety Journal. 140: 103891. DOI: 10.1016/j.firesaf.2023.103891.\u003c/li\u003e\n\u003cli\u003eWhan, A. P., Smith, A. B., Cavanagh, C. R., Ral, J.-P. F., Shaw, L. M., Howitt, C. A., et al. (2014). GrainScan: a low cost, fast method for grain size and colour measurements. Plant methods. 10(1): 23. DOI: 10.1186/1746-4811-10-23.\u003c/li\u003e\n\u003cli\u003eYin, C., Li, H., Li, S., Xu, L., Zhao, Z., and Wang, J. (2015). Genetic dissection on rice grain shape by the two-dimensional image analysis in one japonica x indica population consisting of recombinant inbred lines. Theor Appl Genet. 128(10): 1969-1986. DOI: 10.1007/s00122-015-2560-7.\u003c/li\u003e\n\u003cli\u003eZhang, H., Li, Z., Sun, J., Fu, Y., Jia, D., and Liu, T. (2021). Characterization of particle size and shape by an IPI system through deep learning. Journal of Quantitative Spectroscopy Radiative Transfer. 268: 107642. DOI: 10.1016/j.jqsrt.2021.107642.\u003c/li\u003e\n\u003cli\u003eZhang, S., Liang, X., Huang, X., Wang, K., and Qiu, T. (2022). Precise and fast microdroplet size distribution measurement using deep learning. Chemical Engineering Science. 247: 116926. DOI: 10.1016/j.ces.2021.116926.\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Rice grain size, Deep learning, Convolutional neural network, Automatic measurement, Image","lastPublishedDoi":"10.21203/rs.3.rs-3972552/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-3972552/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eRice grain size, grain length and grain width, are very important traits directly related to rice yield. The accurate measurement of these parameters is quite significant in research such as breeding, yield evaluation and variety improvement for rice. Traditional measurement methods still mainly rely on manual labor, which is time-consuming, labor-intensive, and error-prone. In this study, a novel method, dubbed \u0026ldquo;GSM-Method\u0026rdquo;, based on convolutional neural network and traditional image processing technology was developed for efficient and precise measurement of rice grain size parameters on rice panicle structure. Firstly, primary branch images of rice panicles were collected at the same height to build image database. Then, the grain detection model using convolutional neural network was established for grain recognition and localization. Subsequently, the calibration value was obtained through traditional image processing technology. Finally, the \u0026ldquo;GSM-Method\u0026rdquo; integrated with grain detection model and calibration value was developed for automatic measurement of grain size. The performance of the developed GS-Method was evaluated through testing 60 primary branch images. The test results showed that the root mean square error (RMSE) of grain length for two rice varieties (Huahang15 and Qingyang) were respectively 0.26 mm and 0.30 mm, while the corresponding RMSE of grain width was 0.27mm and 0.31mm, respectively. The proposed algorithm can provide an effective, convenient and low-cost tool for yield evaluation and breeding research.\u003c/p\u003e","manuscriptTitle":"Non-destructive measurement of rice grain size based on panicle structure using deep learning method","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-03-13 17:15:46","doi":"10.21203/rs.3.rs-3972552/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"694474e8-6244-4582-80c4-d9f472fb955d","owner":[],"postedDate":"March 13th, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":29339945,"name":"Biological sciences/Computational biology and bioinformatics/Computational platforms and environments"},{"id":29339946,"name":"Biological sciences/Computational biology and bioinformatics/Image processing"},{"id":29339947,"name":"Biological sciences/Computational biology and bioinformatics/Machine learning"},{"id":29339948,"name":"Biological sciences/Computational biology and bioinformatics/Software"},{"id":29339949,"name":"Physical sciences/Engineering/Mechanical engineering"}],"tags":[],"updatedAt":"2024-07-04T08:44:22+00:00","versionOfRecord":[],"versionCreatedAt":"2024-03-13 17:15:46","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-3972552","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-3972552","identity":"rs-3972552","version":["v1"]},"buildId":"FbvkV6FR0MCFSLy54lSbu","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.