# Improved Mask R-CNN Combined with Otsu Preprocessing for Rice Panicle Detection and Segmentation
## 4 Conclusions  
Based on the basic Mask R-CNN instance segmentation algorithm, this research proposes an improved Mask R-CNN combined with Otsu algorithm preprocessing for detecting and segmenting rice panicles, and compared the results among the three methods. Compared to the image produced by the component, the binary image obtained using the proposed method after detection, transformation and calculation is more comparable to the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Paper** & **Algorithm** & **Evaluation Indicators** & **Performance** \\ \hline [PERSON]. & SLIC, SegNet, entropy rate & \(p\) = 0.82 & Segmentation and nondestructive \\ et al., 2017 [11] & superpixel optimization & R = 0.73 & estimation; time-consuming \\  & & F1-score = 76.73\% & processing and training \\ \hline [PERSON] & Best subset selection, multiple & & Accurate extraction of rice panicle \\ et al., 2020 [14] & linear regression, & & number, difficulty in dataset \\ et al., 2020 [14] & BP neural network & & \\  & & & \\  & & & \\  & & & \\ \hline [PERSON] et al., 2018 [32] & Deep full CNN, SegNet & \(p\) = 0.83, & \begin{tabular}{c} High segmentation accuracy and \\ fast processing speed for rice \\ panicles in the field; verbose \\ image edge filling and manual \\ annotation in Photoshop \\ \end{tabular} \\  & & & & \\  & & & \\  & & & \\ \hline [PERSON] et al., 2021 [33] & 3-D recognition, Mask R-CNN, & \begin{tabular}{c} Count accuracy \\ (grain) \\ \(\geq\)99\%. \\ \end{tabular} & \begin{tabular}{c} Effectively identifies and counts \\ individual rice panicles \\ photographed at close range; \\ inapplicable to actual \\ field environments \\ \end{tabular} \\ \hline This article & \begin{tabular}{c} An improved \\ Mask R-CNN; \\ Otsu preprocessing \\ \end{tabular} & \
\begin{tabular}{c} \(p\) = 0.84, \\ R = 0.80, \\ F1-score = 81.95\% \\ Count accuracy (panicle) =83.27\%. \\ RMSE = 11.08 \\ \end{tabular} &
\begin{tabular}{c} Detection and segmentation of \\ rice panicles in actual field \\ environment, rice growth \\ monitoring and yield estimation; \\ verbose labelling process \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison between Panicle-Mask and other methods for rice panicle detection and segmentation. real image, and information on the number and positions of rice panicles can be obtained with less interference from the background. After the rice image is segmented, the number of rice panicles and their relative proportional area can be calculated, and the rice panicle quality can be judged by color, texture and other features. Therefore, this method is of great value for monitoring rice growth and estimating yield. Compared with prior methods, the present method has several advantages:  
1. The classical Mask R-CNN model has been improved and optimized by combining the KL divergence and the soft NMS algorithm with the best RPN anchor box size, which makes the model more accurate and efficient in detecting rice panicles, and improves the long training time, low detection accuracy and fuzzy boundaries of the original algorithm;
2. Before the actual images are inputted into the detection model, the ExG is calculated based on the dataset features. Then, the traditional Otsu threshold segmentation method is used for preprocessing, which reduces the influence of background interference and improves the model detection accuracy to a certain extent;
3. This method can operate well in a field environment and is of great value for monitoring rice growth and estimating yield. The detection and segmentation accuracy of this method needs to be further improved; the next steps will involve improving both the dataset and model optimization. In terms of the dataset, we plan to improve the diverseness with an automatic data enhancement algorithm to better match the statistics of actual field environments. For model optimization, the network structure will be changed to automatically search for the best module for training to improve the accuracy of model detection and segmentation.