# Enhanced Curvature-Based Fabric Defect Detection:
## 5 Ablation Study on Deep Learning-Based Defect Detection  
This section analyzes the performance of deep learning-based approaches for defect detection, focusing on the use of pre-trained CNN models and transfer learning. The aim is to compare traditional machine learning methods with state-of-the-art deep learning techniques in terms of accuracy, training efficiency, and robustness to challenging conditions. Traditional machine learning methods for defect detection are effective but often rely on manual feature extraction, which requires expert knowledge and limits the generalizability  
Figure 16: Gabor filter on local fabric image. Figure 14: Fabric image captured on experimental setup. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Predicted**} & & \\ \hline \multirow{3}{*}{Actual} & \multirow{3}{*}{non-faulty} & non-faulty & faulty & \(\sum\) \\  & & 132 & 20 & 152 \\  & faulty & 1 & 73 & 74 \\  & \(\sum\) & 133 & 93 & 226 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Gabor Transform Confusion Matrix. Figure 15: Gabor filter on fabric with defect. of these methods [30; 31]. In recent years, convolutional neural networks (CNNs) have garnered increasing attention due to their ability to automatically extract features [32; 33]. Designing a compact and efficient CNN model capable of capturing low-level features while detecting surface defects quickly and accurately is essential [34]. One potential solution is to employ a pre-trained model as the backbone architecture and apply transfer learning or fine-tuning to adapt it to the specific task [35]. Transfer learning or fine-tuning involves transferring parameters, such as weights and biases, from a previously trained model to a new model [36]. This approach enables the development of high-performance models in a relatively short time [37]. Moreover, pre-trained models, when trained on large datasets, can achieve high performance when applied to different datasets [38]. Examples of pre-trained models include SqueezeNet, GoogLeNet, InceptionV3, and ResNet50V2 [39; 40]. In test datasets containing various surface defects, such as those influenced by challenging conditions like strong diffuse illumination, camera noise, and motion blur, only a small number of training samples with defects are required to achieve highly accurate detection results [41; 42; 43; 44; 45]. The proposed model must satisfy real-time processing requirements and match the camera's image acquisition rate (fps) [46]. The software used to process the captured images should be aligned with the hardware's processing time [47]. Given that defects may vary in size, ranging from small to medium, the model must be adapted to detect features at multiple scales. In the initial layers, smaller convolutional filters are applied to capture fine, detailed anomalies, while larger filters are employed in deeper layers to detect broader, more pronounced defects. Horizontal and vertical directional defects are more effectively captured by incorporating elongated, direction-sensitive filters in the early layers, enhancing the model's sensitivity to distinct linear patterns. Additionally, the integration of residual blocks enables the construction of a deeper network, facilitating the learning of complex, multi-layered features while simultaneously improving the efficiency of error backpropagation, thus optimizing the overall learning process [48]. This model was designed to allow for a fair comparison with other methods while demonstrating comparable performance [49; 50]. Experimental results confirm that the proposed method is simple, effective, and robust in detecting fabric surface defects. A batch size of 32 was selected to balance memory usage and training efficiency. Smaller batch sizes, like the one chosen, tend to allow more frequent updates to the model's weights, which can lead to faster convergence, as discussed in [51]. The model was trained for 20 epochs, which was found to be sufficient for the model to learn meaningful patterns from the data without overfitting.