# Few-Shot Steel Defect Detection Based on a Fine-Tuned Network with Serial Multi-Scale Attention
## 4 Experimental Results and Analysis
### Comparative Analysis of Backbone Networks
[42] employed a classifier built on cosine similarity, facilitating effective learning of classification features within a few-shot setting, reducing inter-class variance, and thereby improving classification accuracy. In this investigation, fine-tuned few-shot steel defect detection was conducted utilizing a small dataset, employing ResNet50, ResNet101, and VGG16 within the Faster R-CNN framework, alongside YOLOv4. The selection of YOLOv4 was based on its demonstrated high accuracy and versatility in diverse settings compared to its successors such as YOLOv5. A range of shot quantities, including 1-shot, 3-shot, 5-shot, 7-shot, and 10-shot, was assessed within these frameworks, each with multiple random selections and evaluations of sample quantities for each category, and the pertinent outcomes are illustrated in Figure 4. The analysis was conducted through three aspects: the effect of sample quantity on model performance, comparison of different backbones, and performance of 7-shot relative to 10-shot. The selection of training sample size was based on the theoretical proxy learning curve of the Bayes classifier [45]. This curve provides a method for estimating the required sample size by illustrating how the classifier's performance improves with an increasing number of samples. It helps determine the minimum sample size needed to achieve a specific classification error probability. This is particularly important for applications involving small datasets, as a reasonable estimation can enhance classification performance and reduce resource waste. In this study, accurate sample size estimation optimized the training process for few-shot object detection, leading to higher detection accuracy and efficiency in practical applications. (a) Effect of sample quantity on model performance: With an increase in the number of samples per class, the model's mean Average Precision (mAP) also improved. This aligns with our assumption, as more samples provide additional information to train the model, enabling it to detect targets with increased accuracy. For instance, under the Res-Net101 backbone, we observed a progressive increase in mAP from 1-shot to 10-shot, with values of 38.57%, 51.81%, 62.97%, and 72.28%, respectively. This strongly emphasizes the significance of sample quantity on model performance. (b) Comparison of different backbones: Under the same sample quantity (except in the case of 3-shot, where it ranked second), ResNet101 consistently achieved the highest mAP values. This indicates that in this task, ResNet101 exhibited relatively stronger feature extraction capabilities, contributing to enhanced model performance. Compared to other backbones such as VGG16, CSPDarknet53, and ResNet50, ResNet101 consistently outperformed in all scenarios. (c) Performance of 7-shot relative to 10-shot: Within the ResNet101 backbone, the mAP of 7-shot slightly outperformed that of 10-shot. This suggests that, in this task, surpassing 7 samples per class may not significantly enhance model performance. The reason is that with 7 samples, the model has already acquired sufficient features to perform accurate target detection, and further addition of samples does not yield substantial benefits. From the comparative experiments, we drew two key conclusions:  
(1) Regardless of the frameworks and backbones employed, the number of shots per class significantly influenced the mean Average Precision (mAP). The mAP was observed to be at its lowest with a single sample (1-shot). As the shot quantity increased, there was a corresponding rise in mAP. Notably, there was little to no improvement in mAP values between 7-shot and 10-shot, with 7-shot occasionally outperforming 10-shot. This suggested that beyond 7 shots, model accuracy did not improve significantly, and thus, 7-shot was more aligned with the principles of few-shot object detection. (2) Through a comparative analysis of various frameworks and backbones at 7-shot, we observed that the model with Faster R-CNN framework and ResNet101 backbone was optimal.