## 4 Experimental Results and Analysis
### Model Training  
In this paper, we use the Adam optimizer because it combines the advantages of both AdaGrad and RMSProp optimization algorithms, featuring simple implementation, efficient computation, low memory requirements, stable parameters, and an automatic adjustment of learning rate [40]. During the training process, the role of the Adam optimizer is to change the trainable parameters in a way that minimizes the loss function in order to obtain the optimal solution of the model.  
Figure 11: Structured light three-dimensional measurement experiment platform.  
Figure 10: The evaluation steps.  
In addition, binary cross-entropy is used as a loss function to measure the performance of neural networks. Binary cross-entropy is a commonly used loss function in binary classification tasks, and the expression is shown below.  
\[\text{Loss}\ =-\frac{1}{\text{N}}\sum_{i=1}^{\text{N}}y_{i}\log(\text{p}(y_{i}))+(1- y_{i})\log(1-\text{p}(y_{i})) \tag{1}\]  
where y is the binary label 0 or 1; p(y) is the probability that the output belongs to label y. As a loss function, the binary cross-entropy is used to judge how well a binary classification model predicts the outcome. For example, for a label y of 1, if the predicted value p(y) tends to 1, then the value of the loss function should tend to 0. Conversely, if the predicted value p(y) tends to 0 at this point, then the value of the loss function should be very large.  
The residual neural network model was trained, and the experimental environment was specified as follows.  
Operating system: Windows 10  
CPU: Intel (R) Core (TM) i5-11300H  
RAM: 16. 0 GB  
First, to further verify the performance of the residual neural network with different layers in this study, this paper first conducted a test training of the dataset with 34-layer, 50-layer, and 101-layer ResNets, respectively. The initial learning rate of the algorithm and its exponential decay rate were set to \(10^{-4}\) and 0.9, respectively. The network input size was 480 \(\times\) 320, the batch size was set to 20, the epoch was set to 15. After 15 generations of training, the performance of different layer residual neural network models was tested and compared, as shown in Table 5.  
Top-1 accuracy is the accuracy the category ranked first in probability with the actual result. As can be seen in Table 5, the top-1 accuracy of the 50-layer ResNet is significantly improved compared to the 34-layer ResNet. Compared with the 50-layer ResNet, the top-1 accuracy of the 101-layer ResNet is slightly improved. However, its training time consumption is greatly increased. This also confirms the analysis in Table 2 for the performance of different layers of residual neural networks.  
Therefore, in this paper, we choose to continue training the model with a 50-layer residual neural network. The initial learning rate of the algorithm and its exponential decay rate were set to \(10^{-4}\) and 0.9, respectively. The network input size is 480 \(\times\) 320, the batch size is set to 20, the epoch is set to 60, and the current phase of training is stopped when the loss is no longer decreasing. After testing, this can ensure a better training effect based on this hardware configuration.  
As shown in Figure 12, with the loss of the training set and the val loss of the validation set gradually decreasing, the loss tends to stabilize after 60 iterations, and the fluctuation is around 0.124 and 0.121, respectively. It can be seen that the loss at the end of training converged, which means the model achieved a high classification accuracy in the test set.  
After testing, the Top-1 accuracy of the neural network model trained in this paper is 95.27%.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Performance** & **34-Layer** & **50-Layer** & **101-Layer** \\ \hline Top-1 Accuracy on Validation Set (\%) & 90.16 & 92.95 & 93.72 \\ Elapsed Time for Each Epoch (s) & 1500 & 2880 & 4035 \\ \hline \end{tabular}
\end{table}
Table 5: Performance Comparison of 34-Layer, 50-Layer, and 101-Layer ResNets in this Study.