# Research on Defect Detection Method for Composite Materials Based on Deep Learning Networks
## 4 Results and Discussion
### Comparison of Experimental Results  
Figure 6 displays the predicted output values for all models on the test set. The output values range from 0 to 1. It can be observed that the predicted values from ECAGhostCNN and Resnet-18 are relatively scattered, indicating a clear and meaningful distinction. In contrast,  
Figure 4: Composite material image dataset. Figure 5: Positive and negative samples of industrial dataset. the predicted value distributions obtained by other algorithms, such as AlexNet, are not as distinct. There are overlapping predicted values, which indicate less precise predictions. During the experiments, a binary cross-entropy loss function was used for each model. The initial learning rate was 0.001 and the Adam optimizer was used for model training with a training batch size of 20. The final performance of each model on the validation set (160 images in total) is shown in the Table 1.  
It can be observed that the introduction of the attention mechanism has resulted in a significant improvement in the performance of the classification model on the composite dataset in this paper. The F1 score [30] metric is used to evaluate the classification performance of the model. In the presence of an imbalance between positive and negative samples, the results indicate that the model utilized in this paper greatly enhances the classification performance. In a standardized hardware and software environment, the running time of each model is compared individually for every sample in the test set. The results show that the running time of each image fluctuates. But, in general, the model based on the improved ECAGhost module has a relatively faster runtime than the other models. The average run time per image in the same environment is used to indicate the average speed at which the models operate. The comparison of the run speed of each model is shown in the Table 2. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model Name** & **Classification Accuracy** \\ \hline Alexnet [27] & 81.25\% \\ VGGnet [28] & 80.00\% \\ Resnet-18 [29] & 92.50\% \\ ECAGhostCNN & 93.75\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of classification accuracy of rapid classification methods. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model Name** & **Running Time** \\ \hline Alexnet & 45.32 ms \\ VGGnet & 37.34 ms \\ Resnet-18 & 16.65 ms \\ ECAGhostCNN & 10.17 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of running time of fast classification methods. Figure 6: t-SNE 2D distribution plot. It can be seen that the average running speed of the ECAGhostCNN model is faster than that of other models. The other models obviously have more arithmetic operations and a longer running time. This shows that the Ghost module plays a significant role in reducing the weight of the model and improving its operational efficiency. After conducting experimental analysis, each specific value in the model is presented in the Table 3.  
From the above data, it can be observed that the ECAGhostCNN model has an FLOPs value of 110.56 M, with 2,108,179 parameters, and it occupies 24.37 MB of memory. It can be seen that the ECAGhostCNN model, which incorporates the Ghost module and ECA module, has improved accuracy. While enhancing processing speed, it also ensures classification accuracy, making it valuable for practical applications. This article presents a statistical analysis of the classification accuracy and average processing time per image for the model across various industrial datasets. The results indicate that the classification performance of the attention-based Ghost module is consistently stable across different datasets. It demonstrates superior accuracy and processing speed on diverse industrial datasets, making it well suited for rapid classification tasks involving industrial material images. This suggests that the model exhibits a certain level of scalability in industrial material applications.