## 3 Comparative Experiment
### Comparative Experiment
#### 3.3.1 Comparative Experiment of Patch-Level Segmentation  
Comparison on Training and Validation Sets  
To compare the classification performance of the CNNs and ViT models, we calculated the precision, recall, F1-Score, and maximum accuracy to evaluate the models. The segmentation results of the \(8\times 8\) pixel patches in the validation set are presented in Table 4. Overall, the Pre of the deep learning network that classifies the transparent image  
Figure 5: A comparison of the image segmentation results of the loss curves of deep learning on pixel-level training and validation sets. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Metrics** & **Formula** & **Metrics** & **Formula** \\ \hline Acc & \(\frac{\text{TP}+\text{TN}}{\text{TP}+\text{TN}+\text{FP}+\text{FN}}\) & Dice & \(\frac{2\times|V_{pred}|/V_{pe}|}{|V_{pe}|+|V_{pe}|}\) \\ Pre (\(P\)) & \(\frac{\text{TP}}{\text{TP}+\text{FP}}\) & Jaccard & \(\frac{|V_{pe}|/V_{pe}|}{|V_{pe}|+|V_{pe}|}\) \\ Rec (\(R\)) & \(\frac{\text{TP}}{\text{TP}+\text{FN}}\) & F1 & \(\frac{2\times|P_{c}|/V_{pe}|}{\text{TP}+\text{R}}\) \\ Spe & \(\frac{\text{TN}}{\text{TN}+\text{FP}}\) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Evaluation metrics. background was higher than that of the foreground image. In addition, the Pre of the five models for classifying transparent image backgrounds was approximately 97%; the highest was the VGG-16 value of 97.6%, and the lowest was the Xception and ViT value of 96.7%. The Pre rate of foreground classification VGG-16 was the best, and the Pre rate was 63.1%. Inception-V3 showed the lowest value (53.3%). For transparent image foreground classification, the highest Rec rate was obtained with Xception (89.2%), and the lowest was ViT (84.1%). For transparent image background classification, the highest Rec rate was the ViT value of 90.3%, and the lowest was the Xception value of 85.0%. The Spe obtained by the five models in the classification background was opposite to the Rec rate obtained in the classification foreground. Among the five models, the highest Acc was ResNet50 with 92.87%, and the lowest was ViT with 89.26%. Comparison on Test Set  
Table 5 summarizes the results of the five network predictions. We found that the Acc of ResNet50 was the highest (90.00%), and that of Xception was the lowest at 85.85%. Furthermore, the lowest predicted Acc of the transparent foreground was the Xception with 51.8%, and the highest was the ResNet50 (62.2%). To express the classification results of the CNN and ViT models for transparent image patches more intuitively, we summarize the confusion matrices predicted by the five models, as presented in Figure 6. Inception-V3 correctly classified 2509 more foreground patches than the ViT model. However, Inception-V3 correctly classified only 260 more foreground patches than Xception. In classifying background patches, the Resnet50 model exhibited the best performance, correctly classifying 165,369 background patches. Resnet50 correctly classifies 10,183 background patches better than the Xception model, but only 625 more background patches than ViT. The classification details are shown in Figure 6. In addition, the number of correctly classified backgrounds in ResNet50 was 165,369, accounting for 90.57% of the total correct background patches, and the Pre of the classified background patches was 97.55%. Among the five models, ResNet50 exhibited the highest prediction accuracy rate of 90.06%. The classification accuracies of the Xception and Inception models were lower than those of the other five models at 85.85% and 86.30%, respectively. Moreover, we found that the Xception and Inception models exhibited poor background, but better foreground recognition performances. The Inception-V3 model correctly classified approximately 29,688 foreground patches, accounting for 91.50% of the total number of foreground patches. The Xception model misclassified a maximum of 27,409 background patches, accounting for 15.01% of the total background patches.