# High-Throughput Online Visual Detection Method of Cracked Preserved Eggs Based on Deep Learning
## 5 Optimization and Discussion of the Detection Model  
### Effect of Image Resolution on Model Detection  
The size of the image obtained by the sequential splicing scheme and the matrix splicing scheme is 170 \(\times\) 444 and 340 \(\times\) 222 pixels, respectively. When the image size is reduced to 224 \(\times\) 224 pixels, the image height and direction information is lost too much, leading to the low accuracy of the model on the data set obtained by the sequential splicing scheme. To investigate the relationship between image size and model accuracy, this paper adjusts the image size to test the accuracy of the MobileNetV3_large model. The test results are shown in Figure 9.  
It can be seen from Figure 9 that the running time of the model has a quadratic relationship with the image size, and its correlation coefficient R\({}^{2}\) is as high as 0.99. Meanwhile, the two splicing methods have little impact on the running time of the model. When the matrix splicing scheme is used, the image size has little effect on the detection accuracy of the model, and the model accuracy fluctuates slightly between 95% and 97%. When the matrix splicing scheme is used, the image size has an obvious impact on the detection accuracy of the model, and the model accuracy increases with the image size. Generally, the matrix splicing scheme contributes to a better model detection effect than the sequential splicing scheme. Therefore, the matrix splicing scheme is finally selected in this paper, and  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{\begin{tabular}{c} **Splicing** \\ **Scheme** \\ \end{tabular} } & \multirow{2}{*}{**Network**} & \multicolumn{3}{c}{**Precision/\%**} & \multicolumn{3}{c}{**Recall/\%**} & \multirow{2}{*}{**Accuracy/\%**} & \multirow{2}{*}{\begin{tabular}{c} **Detection** \\ **Time/s** \\ \end{tabular} } \\ \cline{3-3} \cline{5-10}  & & **Crack** & **Intact** & **None** & **Crack** & **Intact** & **None** & & **Time/s** \\ \hline \multirow{4}{*}{\
\begin{tabular}{c} Sequential \\ splicing \\ scheme \\ \end{tabular} } & ResNet18 & 79.1 & 71.0 & 100 & 66.3 & 82.5 & 100 & 74.4 & 43.118 \\  & ResNet34 & 84.6 & 73.7 & 100 & 68.8 & 87.5 & 100 & 78.1 & 82.917 \\  & DenseNet121 & 88.2 & 78.3 & 100 & 75.0 & 90.0 & 100 & 82.5 & 67.991 \\  & DarkNet53 & 92.1 & 77.3 & 100 & 72.5 & 93.8 & 100 & 83.1 & 162.138 \\  & MobileNetV3_large & 93.2 & 75.3 & 100 & 68.8 & 95 & 100 & 81.9 & 14.389 \\  & MobileNetV3_small & 91.5 & 74.3 & 100 & 67.5 & 93.8 & 100 & 80.6 & 7.179 \\ \hline \multirow{4}{*}{
\begin{tabular}{c} Matrix \\ splicing \\ scheme \\ \end{tabular} } & ResNet18 & 96.1 & 91.7 & 100 & 91.3 & 97.3 & 100 & 93.8 & 43.462 \\  & ResNet34 & 97.4 & 95.1 & 100 & 95.0 & 97.5 & 100 & 96.3 & 83.225 \\  & DenseNet121 & 98.7 & 94.0 & 100 & 93.8 & 98.8 & 100 & 96.3 & 69.131 \\  & DarkNet53 & 97.4 & 94.0 & 100 & 93.8 & 97.5 & 100 & 95.6 & 163.938 \\  & MobileNetV3_large & 98.7 & 95.2 & 100 & 95.0 & 98.8 & 100 & 96.9 & 14.825 \\  & MobileNetV3_small & 94.9 & 92.7 & 100 & 92.5 & 95 & 100 & 93.8 & 7.332 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The training results of different models under the two splicing schemes.  
the image size is set to 224 \(\times\) 224 pixels. In this way, high detection accuracy and improved detection speed can be ensured.