## 4 Conclusions  
In this article, the maxIOU algorithm was proposed (Equation (4)), which could be used to calculate the image segmentation threshold with inconspicuous double peak feature. The maxIOU method drew on the idea of the Otsu method enumerating all segmentation threshold comparison effects, but made two important improvements: (1) Inter-class variance was replaced by intersection over union (IOU) as a function for evaluating the image segmentation effect. (2) The threshold corresponding to the maximum average IOU of the training set image was used as the image segmentation threshold instead of the Otsu adaptive threshold. The maxIOU method was applied in the substrate and seedling region segmentation. After image segmentation, the area of the substrate area, the area of the seedling area, and the filling ratio of the lower part of the substrate area were calculated, and the defect identification  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Group** & **The Total Number** &
\begin{tabular}{c} **The Number of Samples** \\ **Correctly Identified** \\ \end{tabular} \\ \hline Normal & 431 & 420 \\ Empty conveyor belt & 20 & 20 \\ Seedling deficiency & 15 & 14 \\ Multiple seedling & 6 & 6 \\ Skew & 16 & 16 \\ Seedling damaged & 12 & 12 \\ Total & 500 & 488 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Experiment result.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**TP** & **TN** & **FP** & **FN** & **Accuracy** & **Precision** & **Recall** & **Processing Time (ms)** \\ \hline
420 & 68 & 11 & 1 & 97.6\% & 97.4\% & 99.8\% & 71.4 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Experiment analysis.  
threshold was calculated using the feature scatter plot. Finally, the five defects of empty conveyor belt, seedling deficiency, multiple seedling, skew, and seedling damaged were identified by the algorithm. Based on the condition of the automatic cabbage transplanter, an experiment was designed to test the segmentation effect of the maxIOU algorithm on the substrate and seedling region and the defects' identification result. The conclusion of the experiment is shown as follows: the maxIOU algorithm had high accuracy in the segmentation of the substrate and seedling region. The defect identification algorithm had high accuracy for defect identification of cabbage seedlings, and the algorithm had good real-time performance. which could be applied to high speed transplanters. The image acquisition system used a light box to block external light sources and used a strip light source to illuminate the field of view. Field external light does not affect field brightness. The industrial camera adopted fast exposure mode to reduce the impact of conveyor movement and mechanical vibration on image acquisition sharpness. The algorithm in this article could be well applied to the detection of defective seedlings in high speed field transplanters.  
All authors contributed to the research. Conceptualization, Y.T., T.Y. and J.Z.; data curation, G.Z., J.T. and Y.Z.; investigation, S.Z.; resources, Y.W.; software, G.Z.; supervision, T.Y.; validation, Y.W. and D.D.; writing, original draft, G.Z.; writing, review and editing, Y.C. All authors have read and agreed to the published version of the manuscript.  
This work was funded by the High Speed Planting Technology and Equipment of Vegetable Seedlings (2017 YFD0701303).  
We declare that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted